Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > 400 Bad Request Newbie error

Reply
Thread Tools

400 Bad Request Newbie error

 
 
pincopallo_it@yahoo.it
Guest
Posts: n/a
 
      10-23-2007
I have a frameset like this :

<FRAMESET FRAMEBORDER ="no" scrolling ="no" COLS="30%,*">
<FRAME name ="frameA" scrolling ="no" SRC="NHXNWI017b.jsp">
<FRAMESET FRAMEBORDER ="no" scrolling ="no" ROWS="15%,85%">
<FRAME scrolling ="no" SRC="NHXNWI017a.jsp">
<FRAME name ="frameB" noresize="noresize" scrolling ="no" SRC="../
pathjsp/map_36.html#C3">

In NHXNWI017b.jsp there is a :

<table width="40%" class="color" border="0" cellPadding="3"
cellSpacing="1">
<tr>
<td nowrap><span class="obbligatorio">Forecast:</span></td>
<td nowrap colspan ="2"><select
OnChange="parent.getSelect(this.options[this.selectedIndex].value)"
name="fore">
<option value="12"selected >12
<option value="24">24
<option value="36">36
<option value="48">48
<option value="60">60
<option value="72">72
</select></td>

What I want is that changing the select on th the frame frameb i
change the html to be in frame frameB

im able to see the value with an alert but if i change the frameset in
this way i get 400 bad request !!!


<FRAMESET FRAMEBORDER ="no" scrolling ="no" COLS="30%,*">
<FRAME name ="framea" scrolling ="no" SRC="NHXNWI017b.jsp">
<FRAMESET FRAMEBORDER ="no" scrolling ="no" ROWS="15%,85%">
<FRAME scrolling ="no" SRC="NHXNWI017a.jsp">
<FRAME name ="frameb" noresize="noresize" scrolling ="no" SRC="../
icone/map_
<SCRIPT>
function getSelect(s) { alert(s) }
document.write(s)
</script>
..html#C3">
</FRAMESET>



Any idea ?

 
Reply With Quote
 
 
 
 
Bart Van der Donck
Guest
Posts: n/a
 
      10-25-2007
(E-Mail Removed) wrote:

> I have a frameset like this :
>
> <FRAMESET FRAMEBORDER ="no" scrolling ="no" COLS="30%,*">
> <FRAME name ="frameA" scrolling ="no" SRC="NHXNWI017b.jsp">
> <FRAMESET FRAMEBORDER ="no" scrolling ="no" ROWS="15%,85%">
> <FRAME scrolling ="no" SRC="NHXNWI017a.jsp">
> <FRAME name ="frameB" noresize="noresize" scrolling ="no" SRC="../
> pathjsp/map_36.html#C3">
>
> In NHXNWI017b.jsp there is a :
>
> <table width="40%" class="color" border="0" cellPadding="3"
> cellSpacing="1">
> <tr>
> <td nowrap><span class="obbligatorio">Forecast:</span></td>
> <td nowrap colspan ="2"><select
> OnChange="parent.getSelect(this.options[this.selectedIndex].value)"
> name="fore">
> <option value="12"selected >12
> <option value="24">24
> <option value="36">36
> <option value="48">48
> <option value="60">60
> <option value="72">72
> </select></td>
>
> What I want is that changing the select on th the frame frameb i
> change the html to be in frame frameB
>
> im able to see the value with an alert but if i change the frameset in
> this way i get 400 bad request !!!
>
> <FRAMESET FRAMEBORDER ="no" scrolling ="no" COLS="30%,*">
> <FRAME name ="framea" scrolling ="no" SRC="NHXNWI017b.jsp">
> <FRAMESET FRAMEBORDER ="no" scrolling ="no" ROWS="15%,85%">
> <FRAME scrolling ="no" SRC="NHXNWI017a.jsp">
> <FRAME name ="frameb" noresize="noresize" scrolling ="no" SRC="../
> icone/map_
> <SCRIPT>
> function getSelect(s) { alert(s) }
> document.write(s)
> </script>
> .html#C3">
> </FRAMESET>
>
> Any idea ?


I'm afraid your code design is highly unusual and error-prone, but
I'll refrain from that now.

Error 400 ('Bad Request') is in HTTP/1.1 defined as follows (RFC2616):
"The request could not be understood by the server due to malformed
syntax. The client SHOULD NOT repeat the request without
modifications."

The following setup should get you started:

-------------------------------------------------------
Page FRAMESET.html
-------------------------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd">
<HTML>
<TITLE>My frameset</TITLE>
<FRAMESET COLS="30%,*">
<FRAME NAME="frameA" SRC="A.htm">
<FRAMESET ROWS="15%, 85%">
<FRAME NAME="frameX" SRC="X.htm">
<FRAME NAME="frameB" SRC="B.htm">
</FRAMESET>
</FRAMESET>
</HTML>

-------------------------------------------------------
Page A.htm
-------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>Page A.html</TITLE>
<SCRIPT TYPE="text/javascript">
var pathHead = '../ cone/map_';
var pathFoot = '.html#C3';
function changeLoc(newUrl) {
parent.frames['frameB'].location.href =
pathHead + newUrl + pathFoot;
}
</SCRIPT>
</HEAD>
<BODY>
<FORM ACTION="A.htm" METHOD="GET" ONSUBMIT="return false;">
<P>
<SELECT SIZE="1"
ONCHANGE="changeLoc(this.options[this.selectedIndex].value);">
<OPTION VALUE="1" SELECTED>1</OPTION>
<OPTION VALUE="2">2</OPTION>
<OPTION VALUE="8">8</OPTION>
</SELECT>
</P>
</FORM>
</BODY>
</HTML>


-------------------------------------------------------
Pages B.htm and X.htm
-------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>Blanco page</TITLE>
</HEAD>
<BODY><P>&nbsp;</P></BODY>
</HTML>

-------------------------------------------------------

Hope this helps,

--
Bart

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help on HTTP 400 Bad Request syntax error on urllib2.urlopen icarreon Python 0 01-10-2012 02:37 AM
The remote server returned an error: (400) Bad Request. archana ASP .Net 0 12-18-2006 12:54 PM
FIX: "HTTP 400 - Bad request" error message in the .NET Framework =?Utf-8?B?U2F0aHlhIHNoYW5rYXI=?= ASP .Net 0 03-30-2005 06:25 AM
ISS 5 Perl CGi script and 400 Bad Request Error Justin Perl Misc 1 03-14-2005 10:38 PM
400 bad request error --- help Sushil Prasad ASP .Net 0 01-26-2005 12:31 AM



Advertisments