SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast Jujubee's Avatar
    Join Date
    Mar 2001
    Location
    Canada
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Multiple img submits in a form?

    Ok, I've got a form that calls a PHP script.

    What I'd like to do is list 5 images, and have the visitors choose and image by clicking on the image.

    Each image is in an <input> tag that has name="Submit".

    My problem is that HTTP returns the variables "Sumbit_x" and "Submit_y" which are the coordinates of the click - not the value attached to the INPUT tags.

    I could change the name of each input tag then do mulitple IF ISSET in the script to check for each, but that's plain clumsy.

    Is there some way around this? Ideally the value= would be returned as a variable. That coordinate 'feature' of HTTP is dumb.
    Last edited by Jujubee; Jun 8, 2001 at 01:04.

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I don't believe the value attribute of an image button is supported by any browser.

  3. #3
    SitePoint Enthusiast Jujubee's Avatar
    Join Date
    Mar 2001
    Location
    Canada
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, does anyone know of another way to accomplish this?

    I just want the user to click on an image and for the script to know which image was clicked.

    Thanks for the help.

  4. #4
    SitePoint Guru DenverDave's Avatar
    Join Date
    Feb 2001
    Location
    Denver, Colorado
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure if this will work for you and it seems a little silly, but I created multiple "mini" forums on one html page - each with there own submit button.

    The reason for this is that I wanted to open a new window and I wanted to pass (?name=nobody) parameters to the action and also form variables and I could not figure out how to do this with JavaScript images. (Any suggestions?)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •