mikemessiah Posted April 1, 2008 Share Posted April 1, 2008 Hi we are trying to make a form that has multiple comboboxes that need to display different data depending on what is selected in the previous ones. The problem is we dont want a submit button after each selection so it needs to change based on a click event with java ? Any ideas or example code on how to do this. Much appreciated Link to comment https://forums.phpfreaks.com/topic/98991-how-to-create-dynamic-html-forms-with-php-and-java/ Share on other sites More sharing options...
metrostars Posted April 1, 2008 Share Posted April 1, 2008 Just put onchange="form1.submit()" in the tag of each select , making sure you replace form1 with the name of your form. Link to comment https://forums.phpfreaks.com/topic/98991-how-to-create-dynamic-html-forms-with-php-and-java/#findComment-506554 Share on other sites More sharing options...
discomatt Posted April 1, 2008 Share Posted April 1, 2008 I think what you want is this http://javascript.internet.com/forms/dropdown-box-population.html Link to comment https://forums.phpfreaks.com/topic/98991-how-to-create-dynamic-html-forms-with-php-and-java/#findComment-506572 Share on other sites More sharing options...
discomatt Posted April 1, 2008 Share Posted April 1, 2008 An alternative way to do this is with AJAX... it's good if you have many, many selections and dont want to prebuffer them. There are plenty of AJAX tutorials online, and integrating them with the above snippet isn't too difficult. Link to comment https://forums.phpfreaks.com/topic/98991-how-to-create-dynamic-html-forms-with-php-and-java/#findComment-506575 Share on other sites More sharing options...
mikemessiah Posted April 1, 2008 Author Share Posted April 1, 2008 Thanks for replies. The one link doesnt seem to open though ? Link to comment https://forums.phpfreaks.com/topic/98991-how-to-create-dynamic-html-forms-with-php-and-java/#findComment-506582 Share on other sites More sharing options...
mikemessiah Posted April 1, 2008 Author Share Posted April 1, 2008 Just put onchange="form1.submit()" in the tag of each select , making sure you replace form1 with the name of your form. I am not 100% sure what you mean by this? Do I make the onchange="VALUE" the name of the selection I want it to show after it is selected? Link to comment https://forums.phpfreaks.com/topic/98991-how-to-create-dynamic-html-forms-with-php-and-java/#findComment-506588 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.