Web Analytics Made Easy -
StatCounter Submit Button X,Y - CodingForum

Announcement

Collapse
No announcement yet.

Submit Button X,Y

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Submit Button X,Y

    I'm passing text field values to another page in a simple form. But when I use Image as a submit button it adds x & y values too in the address bar...

    Instead of...
    http://any_site.com/page.htm?s=some+value
    It shows...
    http://any_site.com/page.htm?s=some+value&x=42&y=14

    & if I use a button, it then shows button name in the end.

    Please help me removing X,Y & Button Name.

    Here is my code...
    PHP Code:
    <form action="result.htm" method="get"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                                    <
    tr>
                                      <
    td height="13" colspan="2" valign="top" style="padding-left:5px;"><strong>Search </strong></td>
                                    </
    tr>
                                    <
    tr>
                                      <
    td width="333" height="24" valign="top" style="padding-left:6px;"><input type="text" name="s" size="48" maxlength="90">
                                        <
    br></td>
                                    <
    td width="111" valign="top" style="padding-left:5px;"><input type="image" src="images/getbtn.jpg"></td>
                                    </
    tr>                                                        </table></form

  • #2
    You can style a submit button to look like an image using CSS. Attach the image you are using and I can see what I can do.
    Last edited by _Aerospace_Eng_; Oct 6, 2006, 05:39 PM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

    Comment


    • #3
      here is the image button, download it & check my form page locally...

      Here s the Form page code...
      Code:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">
      <html>
      <head>
      <title>Untitled Document</title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      </head>
      
      <body>
      <form name="form1" method="get" action="result.htm">
        <input name="1" type="text" id="1">
        <input name="2" type="text" id="2">
        <input name="3" type="text" id="3">
        <a href="#" onClick="javascript:document.form1.submit()">Submit
        </a>
        <input type="submit" name="Submit Button" value="Submit" />
        <input type="image" src="getmapbtn.jpg" name="Image Button" />
        <input type="image" src="getmapbtn.jpg" name="" />
      </form>
      <p>4 different ways to submit this form &amp; these 4 buttons give different values in the address bar.<br>
      While I only want the text fields results in the address bar(as text submit link do). Click each &amp; see ! </p>
      </body>
      </html>
      Here is the result page code...
      Code:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">
      <html>
      <head>
      <title>Untitled Document</title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      </head>
      
      <body>
      <p>Thanks
      </p>
      <p><a href="javascript:history.go(-1)">Go Back</a> </p>
      </body>
      </html>

      Comment


      • #4
        Code:
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
        <html>
        <head>
        <title>Untitled Document</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <style type="text/css">
        input.submit {
        width:103px;
        height:24px;
        border:0;
        cursor:pointer;
        background:url(getmapbtn.jpg) no-repeat;
        }
        </style>
        </head>
        
        <body>
        <form name="form1" method="get" action="result.htm">
          <input name="1" type="text" id="1">
          <input name="2" type="text" id="2">
          <input name="3" type="text" id="3">
          <input class="submit" type="submit" value="" />
        </form>
        </body>
        </html>
        ||||If you are getting paid to do a job, don't ask for help on it!||||

        Comment


        • #5
          Thank You very much.

          Comment

          Working...
          X