HTML How do I pass parameters between pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NewGuy
    New Member
    • Nov 2006
    • 14

    HTML How do I pass parameters between pages

    Heres what I'm trying to do.

    THIS PIECE
    <html>
    <iframe src="small.html " frameborder="0" width="800" height="290">
    </iframe>
    </html>


    OPENS Bigger.html Page 1 and has a text box for user input.

    Input your message:
    <input type="text" name="Part Number" value="11111" size="20">

    THEN after user has typed something they hit a button
    <input type="text" value="Submit" />

    WHICH calls some.html
    <form action="some.ht ml" method="get">


    SOME.HTML is generic and pops up.
    How do I get the text that was entered in by the user from the Bigger.html

    This is the NewGuy so any code would be great.
    Thanks.
  • sabesneit
    New Member
    • Nov 2006
    • 4

    #2
    Originally posted by NewGuy
    Heres what I'm trying to do.

    THIS PIECE
    <html>
    <iframe src="small.html " frameborder="0" width="800" height="290">
    </iframe>
    </html>


    OPENS Bigger.html Page 1 and has a text box for user input.

    Input your message:
    <input type="text" name="Part Number" value="11111" size="20">

    THEN after user has typed something they hit a button
    <input type="text" value="Submit" />

    WHICH calls some.html
    <form action="some.ht ml" method="get">


    SOME.HTML is generic and pops up.
    How do I get the text that was entered in by the user from the Bigger.html

    This is the NewGuy so any code would be great.
    Thanks.
    1st: add an id to your textbox in Bigger.html

    <input type="text" id="part" name="Part Number" value="11111" size="20">

    2nd: in Some.html, get the value from your textbox like this:

    alert(parent.document .getElementById ("part").val ue);

    ** will work only if Bigger.html opens Some.html like a pop up

    Comment

    • roshancaptain1
      New Member
      • Oct 2006
      • 14

      #3
      Originally posted by sabesneit
      1st: add an id to your textbox in Bigger.html

      <input type="text" id="part" name="Part Number" value="11111" size="20">

      2nd: in Some.html, get the value from your textbox like this:

      alert(parent.document .getElementById ("part").val ue);

      ** will work only if Bigger.html opens Some.html like a pop up

      *************** *************** *********
      bigger.html
      <input type=text name="a" >
      some.html
      string c=req.getParame ter("a");//using servlets program in java

      Comment

      • cassbiz
        New Member
        • Oct 2006
        • 202

        #4
        You can also create your pages in PHP.

        Check out this for a simple tutorial

        Comment

        Working...