![]() Topic awaiting preservation: Two behaviors from one form? (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: New Jersey, USA |
![]() 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 |
![]() Sure all you want to do is create funtion that handles the form. |
Paranoid (IV) Inmate From: New Jersey, USA |
![]() Thanks Bitdamaged! |
Bipolar (III) Inmate From: dk's house of love |
![]() Of hand I would do something like this: code: <form onSubmit="return pdfcheck(this)">
|
Paranoid (IV) Inmate From: New Jersey, USA |
![]() 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 |
![]() 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 |
![]() Thanks Bitdamaged code: <form method="post" action="/schedules/scheduletest.php">
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() 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 |
![]() 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 |
![]() Here you go... |
Paranoid (IV) Inmate From: New Jersey, USA |
![]() Thanks mr.maX and Bitdamaged!! |