400 Bad Request Newbie error

Discussion in 'Javascript' started by pincopallo_it@yahoo.it, Oct 23, 2007.

  1. Guest

    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 ?
     
    , Oct 23, 2007
    #1
    1. Advertising

  2. 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
     
    Bart Van der Donck, Oct 25, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sushil Prasad

    400 bad request error --- help

    Sushil Prasad, Jan 26, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    427
    Sushil Prasad
    Jan 26, 2005
  2. =?Utf-8?B?U2F0aHlhIHNoYW5rYXI=?=

    FIX: "HTTP 400 - Bad request" error message in the .NET Framework

    =?Utf-8?B?U2F0aHlhIHNoYW5rYXI=?=, Mar 30, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    3,857
    =?Utf-8?B?U2F0aHlhIHNoYW5rYXI=?=
    Mar 30, 2005
  3. archana
    Replies:
    0
    Views:
    711
    archana
    Dec 18, 2006
  4. icarreon
    Replies:
    0
    Views:
    1,751
    icarreon
    Jan 10, 2012
  5. Justin
    Replies:
    1
    Views:
    222
    A. Sinan Unur
    Mar 14, 2005
Loading...

Share This Page