Topic awaiting preservation: Two behaviors from one form? |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: New Jersey, USA |
posted 02-04-2002 19:49
I have a drop down box that I'm using for navigation choices. When the user selects an option it uses a php script to reload the page with the proper content using a php include(). |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 02-04-2002 20:01
Sure all you want to do is create funtion that handles the form. |
Paranoid (IV) Inmate From: New Jersey, USA |
posted 02-04-2002 20:26
Thanks Bitdamaged! |
Bipolar (III) Inmate From: dk's house of love |
posted 02-04-2002 21:35
Of hand I would do something like this: code: <form onSubmit="return pdfcheck(this)">
|
Paranoid (IV) Inmate From: New Jersey, USA |
posted 02-04-2002 23:30
Okay, I may be twisting this more than I'm allowed to but take a look if you will please. I don't want to have a submit button, so I added the onChange handler in the select tag. Does this mean I should change the function from return true to submit()? code: <form onSubmit="return pdfcheck(this)" method="post" action="/schedules/scheduletest.php">
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 02-05-2002 01:08
in that case you can remove all the return stuff, that only applies wtih submit. (including in the onChange. |
Paranoid (IV) Inmate From: New Jersey, USA |
posted 02-05-2002 01:32
Thanks Bitdamaged code: <form method="post" action="/schedules/scheduletest.php">
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 02-05-2002 02:18
hmm.. I think if you pu the onChange in the select then the "this" is reffering to the select instead of the form which is making things difficult. |
Paranoid (IV) Inmate From: New Jersey, USA |
posted 02-05-2002 02:31
What if I do onChange="submit()" in the select and then do onSubmit="return pdfcheck(form)" in the form tag? |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 02-05-2002 08:07
Here you go... |
Paranoid (IV) Inmate From: New Jersey, USA |
posted 02-05-2002 13:58
Thanks mr.maX and Bitdamaged!! |