fri3ndly Posted April 9, 2008 Share Posted April 9, 2008 Basically I have a form which is validated using PHP. When a user selects an option and hits submit, they are taken to step 2 of the process, but I also need a new browser window to open depending on what option they selected. Can anyone help me as I am terrible at javascript? Link to comment Share on other sites More sharing options...
fri3ndly Posted April 9, 2008 Author Share Posted April 9, 2008 OK I dont think this can be done, so what about one submit button is disabled until they click the first one, then it becomes undisabled? Link to comment Share on other sites More sharing options...
Angarak Posted April 9, 2008 Share Posted April 9, 2008 http://www.programmersheaven.com/2/FAQ-JavaScript-Disable-Enable-Form-Elements There are pitfalls to such an approach. You can by default disable a submit button without script - but if for some reason the users browser doesnt support Javascript, they have no way of enabling the submit button. Therefore, it would be wise to disable the submit button on page load via the onload() event handler, then use the onclick() event handler of the 'enabled' submit button to trigger the function that enables the other submit button. Link to comment Share on other sites More sharing options...
fri3ndly Posted April 9, 2008 Author Share Posted April 9, 2008 http://www.programmersheaven.com/2/FAQ-JavaScript-Disable-Enable-Form-Elements There are pitfalls to such an approach. You can by default disable a submit button without script - but if for some reason the users browser doesnt support Javascript, they have no way of enabling the submit button. Therefore, it would be wise to disable the submit button on page load via the onload() event handler, then use the onclick() event handler of the 'enabled' submit button to trigger the function that enables the other submit button. Cool, thanks il give that a try Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now