button passed to URL

Discussion in 'ASP General' started by middletree, Oct 13, 2003.

  1. middletree

    middletree Guest

    I've never seen this before. I am new to querystrings, as just using hidden
    fields and the POST method has been more than adequate for me until
    recently. But I started using the GET method, and I noticed that when I
    clicked the submit button, it gave me this for a URL:

    http://localhost/DisplayTickets.ASP?selectTSE=271&Status=2&btnsearchTSE.x=28&btnsearchTSE.y=11

    The thing is, selectTSE and Status are the two <SELECT> boxes, so I
    understand them being there. But why is is telling me the x and y
    coordinates of where I clicked the button to submit the form?

    I should add that the submit button is an image, not a regular button.

    This doesn't hurt anything, just wondering why it's there. And maybe it will
    hurt something later on; I don't know enough to say.
     
    middletree, Oct 13, 2003
    #1
    1. Advertising

  2. middletree

    Ray at Guest

    That's the x/y coordinates of where you click on the type=image submit
    button. This is just the nature of the input type=image and GET. Try not
    naming the input. Just do <input type="image" src="image.gif">

    Ray at work

    "middletree" <> wrote in message
    news:...
    > I've never seen this before. I am new to querystrings, as just using

    hidden
    > fields and the POST method has been more than adequate for me until
    > recently. But I started using the GET method, and I noticed that when I
    > clicked the submit button, it gave me this for a URL:
    >
    >

    http://localhost/DisplayTickets.ASP?selectTSE=271&Status=2&btnsearchTSE.x=28&btnsearchTSE.y=11
     
    Ray at, Oct 13, 2003
    #2
    1. Advertising

  3. middletree

    middletree Guest

    Removing the name of the button didn't change the fact that the x and y
    showed up in the URL. Oh well. It doesn't hurt anything.

    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:...
    > That's the x/y coordinates of where you click on the type=image submit
    > button. This is just the nature of the input type=image and GET. Try not
    > naming the input. Just do <input type="image" src="image.gif">
    >
    > Ray at work
    >
    > "middletree" <> wrote in message
    > news:...
    > > I've never seen this before. I am new to querystrings, as just using

    > hidden
    > > fields and the POST method has been more than adequate for me until
    > > recently. But I started using the GET method, and I noticed that when I
    > > clicked the submit button, it gave me this for a URL:
    > >
    > >

    >

    http://localhost/DisplayTickets.ASP?selectTSE=271&Status=2&btnsearchTSE.x=28&btnsearchTSE.y=11
    >
    >
     
    middletree, Oct 13, 2003
    #3
  4. "Ray at <%=sLocation%>" wrote:
    >
    > That's the x/y coordinates of where you click on the
    > type=image submit button. This is just the nature of
    > the input type=image and GET. Try not naming the input.
    > Just do <input type="image" src="image.gif">


    Just a note, Ray. The x/y coordinates are there for POST submissions as
    well. And not naming the input just means there will be unnamed x and y
    coordinate in the request:

    ...myURL.asp?x=12&y=34

    And I agree that it hurts nothing to be there. I use unnamed image inputs
    whenever I want to allow submission on [Enter] in a form with more than one
    text input. In my case, they're usually 1x1 transparent images that are
    incidental to the page design (we mostly use stylized text links in place of
    graphical submit buttons).


    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Oct 13, 2003
    #4
  5. middletree

    Ray at Guest

    What shows up then? Just an x and y without any name? Huh. The
    coordinates thing also irritates me. :] If it bothers you very much, you
    could always do a "onclick=document.formname.submit();" and just make it a
    normal image. This is if you want to rely on client-side scripting of
    course.

    Ray at work

    "middletree" <> wrote in message
    news:...
    > Removing the name of the button didn't change the fact that the x and y
    > showed up in the URL. Oh well. It doesn't hurt anything.
    >
    > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > news:...
    > > That's the x/y coordinates of where you click on the type=image submit
    > > button. This is just the nature of the input type=image and GET. Try

    not
    > > naming the input. Just do <input type="image" src="image.gif">
    > >
    > > Ray at work
    > >
    > > "middletree" <> wrote in message
    > > news:...
    > > > I've never seen this before. I am new to querystrings, as just using

    > > hidden
    > > > fields and the POST method has been more than adequate for me until
    > > > recently. But I started using the GET method, and I noticed that when

    I
    > > > clicked the submit button, it gave me this for a URL:
    > > >
    > > >

    > >

    >

    http://localhost/DisplayTickets.ASP?selectTSE=271&Status=2&btnsearchTSE.x=28&btnsearchTSE.y=11
    > >
    > >

    >
    >
     
    Ray at, Oct 13, 2003
    #5
  6. middletree

    middletree Guest

    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:O$...
    > What shows up then? Just an x and y without any name?


    Yes.

    > Huh. The
    > coordinates thing also irritates me. :] If it bothers you very much, you
    > could always do a "onclick=document.formname.submit();" and just make it a
    > normal image. This is if you want to rely on client-side scripting of
    > course.
    >



    I do have the option of relying on client-side scripting, since this is an
    Intranet app. Probably just leave things as they are, though. Thanks.

    > Ray at work
    >
    > "middletree" <> wrote in message
    > news:...
    > > Removing the name of the button didn't change the fact that the x and y
    > > showed up in the URL. Oh well. It doesn't hurt anything.
    > >
    > > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > > news:...
    > > > That's the x/y coordinates of where you click on the type=image submit
    > > > button. This is just the nature of the input type=image and GET. Try

    > not
    > > > naming the input. Just do <input type="image" src="image.gif">
    > > >
    > > > Ray at work
    > > >
    > > > "middletree" <> wrote in message
    > > > news:...
    > > > > I've never seen this before. I am new to querystrings, as just using
    > > > hidden
    > > > > fields and the POST method has been more than adequate for me until
    > > > > recently. But I started using the GET method, and I noticed that

    when
    > I
    > > > > clicked the submit button, it gave me this for a URL:
    > > > >
    > > > >
    > > >

    > >

    >

    http://localhost/DisplayTickets.ASP?selectTSE=271&Status=2&btnsearchTSE.x=28&btnsearchTSE.y=11
    > > >
    > > >

    > >
    > >

    >
    >
     
    middletree, Oct 13, 2003
    #6
  7. middletree

    middletree Guest

    Thanks. This in interesting. Never heard of using text links for submission
    before. Got a tutorial for this?
     
    middletree, Oct 13, 2003
    #7
  8. "middletree" wrote:
    >
    > Thanks. This in interesting. Never heard of using text
    > links for submission before. Got a tutorial for this?


    It's the same as Ray's image suggestion, only you have to cancel the click
    event:

    <A HREF=""
    ONCLICK="document.myForm.submit();return false">

    FWIW, ONCLICK is not supported for <IMG> in some legacy browsers (like NN4),
    so if you care about that kind of thing, use <A> instead, or stay with
    <INPUT TYPE="image">.


    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Oct 13, 2003
    #8
    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. Jacob Crossley
    Replies:
    0
    Views:
    420
    Jacob Crossley
    Apr 2, 2004
  2. Jacob Crossley
    Replies:
    0
    Views:
    344
    Jacob Crossley
    Apr 6, 2004
  3. dee
    Replies:
    9
    Views:
    529
    Joseph Byrns
    Apr 15, 2005
  4. Fernie
    Replies:
    10
    Views:
    5,956
    Jukka K. Korpela
    Dec 21, 2004
  5. Anand
    Replies:
    2
    Views:
    925
    Anand
    Sep 11, 2003
Loading...

Share This Page