Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Dom / html forms / loops?

    Hi everyone,

    ‘dest1.php’ is a PHP script which includes JavaScript to validate a form client side.

    Using a wildcard search method the script queries the database for a destination.

    Once ‘dest1.php’ is displayed becuase some journeys may incur an additional surcharge the user has to make a selection from either a YES or NO radio button option displayed within a HTML form. The JavaScript code on the page is meant to check whether a selection has been made so the customer will be quoted the correct amount.

    If only one result is displayed the client side validation works fine, however, if more than one result is displayed it does not work at all.

    I know it is probably due to the fact that I have referred to the form using the DOM method but I am not sure how to correct it, can anyone help?

    I have included the script dest1.php as an attachment,

    cheekyChicken xxx
    Attached Files Attached Files

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    It may be easier for folks to help if you could instead show the source html code from a page that has returned multiple results.

  • #3
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi babe,

    I've attached a multiple results page.

    I know the problem is that all the forms are called the same but as I am relatively new to programming I am having trouble sorting it out.

    It's for my dad and he wants the site online ASAP,

    cheekyChicken xxx
    Attached Files Attached Files


  •  

    Posting Permissions

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