Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-11-2012, 03:25 PM   PM User | #1
cheekyChicken
New to the CF scene

 
Join Date: Oct 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
cheekyChicken is an unknown quantity at this point
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
File Type: txt dest1.txt (8.2 KB, 41 views)
cheekyChicken is offline   Reply With Quote
Old 10-11-2012, 04:17 PM   PM User | #2
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
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.
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Old 10-11-2012, 04:43 PM   PM User | #3
cheekyChicken
New to the CF scene

 
Join Date: Oct 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
cheekyChicken is an unknown quantity at this point
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
File Type: txt multipleresults.txt (4.3 KB, 24 views)
cheekyChicken is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:28 AM.


Advertisement
Log in to turn off these ads.