Form Submit quiz

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Savas Ates

    Form Submit quiz

    <form action="a.asp" method="get" >



    <input type="image" border="0" src="IMAGES/oklar.jpg">


    </form>

    im usnig this codes to submit form when a user click on oklar.jpg(an image)
    ... but it submits form ***a.asp?x=6&y= 8*** like this.. x and y takes
    randomize values... how can i remove x and y variables from my string... if
    it cant be possible how can submit a form when a user click my image file...


  • Martin Honnen

    #2
    Re: Form Submit quiz



    Savas Ates wrote:
    [color=blue]
    > <form action="a.asp" method="get" >
    >
    >
    >
    > <input type="image" border="0" src="IMAGES/oklar.jpg">
    >
    >
    > </form>
    >
    > im usnig this codes to submit form when a user click on oklar.jpg(an image)
    > .. but it submits form ***a.asp?x=6&y= 8*** like this.. x and y takes
    > randomize values... how can i remove x and y variables from my string... if
    > it cant be possible how can submit a form when a user click my image file...[/color]

    These are not random values but the click coordinates. If you want to
    submit the form data use
    <input type="submit">
    If you need an image there are some choices, with JavaScript
    <form name="formName" ...>
    ...
    <a href="#"
    onclick="docume nt.forms.formNa me.submit(); return false;"><img
    border="0" src="IMAGES/oklar.jpg" alt="submit"></a>
    or in modern browsers
    <button type="submit">< img border="0" src="IMAGES/oklar.jpg"
    alt="submit"></button>


    --

    Martin Honnen


    Comment

    • Jeff Cochran

      #3
      Re: Form Submit quiz

      On Sat, 17 Jul 2004 12:24:14 +0300, "Savas Ates"
      <savas@indexint eractive.com> wrote:
      [color=blue]
      ><form action="a.asp" method="get" >
      >
      >
      >
      > <input type="image" border="0" src="IMAGES/oklar.jpg">
      >
      >
      > </form>
      >
      >im usnig this codes to submit form when a user click on oklar.jpg(an image)
      >.. but it submits form ***a.asp?x=6&y= 8*** like this.. x and y takes
      >randomize values... how can i remove x and y variables from my string... if
      >it cant be possible how can submit a form when a user click my image file...[/color]

      You're getting the coordinates of the mouse submitted. You don't want
      to use an input type of "image" you wnat an input type of "submit".

      Jeff

      Comment

      • Greg Griffiths

        #4
        Re: Form Submit quiz

        just do something like :

        <form name="myForm" action="a.asp" method="post">
        <a href="javascrip t:document.myFo rm.submit()"><i mg border="0"
        src="IMAGES/oklar.jpg"></a>
        </form>

        Savas Ates wrote:
        [color=blue]
        > <form action="a.asp" method="get" >
        >
        > <input type="image" border="0" src="IMAGES/oklar.jpg">
        >
        > </form>
        >
        > im usnig this codes to submit form when a user click on oklar.jpg(an image)
        > .. but it submits form ***a.asp?x=6&y= 8*** like this.. x and y takes
        > randomize values... how can i remove x and y variables from my string... if
        > it cant be possible how can submit a form when a user click my image file...[/color]

        Comment

        Working...