Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to put 2 scripts together

Status
Not open for further replies.

shedlord

IS-IT--Management
Jan 13, 2005
14
0
0
GB
Hi, easy newbie question for you (hopefully)

I have a form with 2 select lists. One drop down allows the user to select a directory, the other lets them select a file. Once you press the form button an URL is built using these 2 selections using a bit of javascript. So far, so good.

I also need to validate the form, so that the user selects something from the select lists, rather than leaving it on the default, which is just the list title. I use the popular Yaromat check form behaviour to do this. This part also works ok.

However, I need to make the script which generates the URL conditional upon the validation being ok, so that if the user hasn't selected something from both lists the URL building and redirect doesn't happen.

At the moment, the validation error message pops up but the user is forwarded to the incorrect URL regardless.

If this makes little sense, check a quick demo I put online here...

How do I join 2 scripts together?

thanks
 
Looks like I've drawn a blank there.
Just have to assume this isn't going to work with an input=image and revert to buttons then.

thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top