Results 1 to 5 of 5

Thread: Help with form problem

  1. #1
    Join Date
    Jul 2005
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with form problem

    Hi there
    Can i just start by saying that as a noob I dont know if this is the right place to post this question so please feel free to move this post to the right place if necessary

    I am creating a form to collect information for my mums website. One of the select options requires them to choose from a range of images that are set up on another page of the site (there are to many of them to have the images on the same page as the form). I have assigned all the images a code lettering eg GSA01 etc. So thats basically make a selection choice on page x and post the information in the form selection box on page y

    Is there a way that I can either make the images clickable so that the image code will then appear in the selection box or maybe use a click box and select button to do the same so they can only assign one code to the selection - this is important.

    i have looked thru the forms scripts on the site and also had a browse thru the forum and cant find anything that seems to fit the bill and am at my wits end, pulling what little hair I have out of my head.

    I am new to Java and website building so any help or advice you can give would be very gratefully recieved

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Right.
    1) Yes this is in the wrong place, it should be in the JavaScript forum.
    2) Java and JavaScript are two very different languages. Don't confuse them.
    3) The code you want is:
    HTML Code:
    <img src="image1.jpg" onclick="document.getElementById('imgcode').value='GSA01';"/>
    <img src="image2.jpg" onclick="document.getElementById('imgcode').value='GSA02';"/>
    <!-- ... more images ... -->
    <form action="pagey.cgi">
    <select id="imgcode">
    <option value="GSA01">First image</option>
    <option value="GSA02">Second image</option>
    <!-- ... more options ... -->
    </select>
    </form>
    Last edited by Twey; 07-16-2005 at 11:55 AM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2005
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thankyou so much for that and for the speedy response.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Welcome
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jul 2005
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Twey

    I dont know if this is the only section of the forum you monitor or not, but have moved this thread to the javascript forum as requested and have put some follow on questions.

    If at all possible, could you have a look for me

    Many thanks again

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
  •