eduardo_consolacion Posted September 6, 2007 Share Posted September 6, 2007 how can you do this: if i have a page called edit.php having: Edit Appliances Appliances: <select><option>Computer</option></select> // this is the selection box not the code itself <select><option>Hard Disk</option></select> <select><option>Mouse</option></select> this is the only one that can be seen for the first time. As, i want this one to be like almost "a submit button" where once i will click the names inside the option box, it will direct me to the same page having all the blank information to be filled up by the administrator like this one: Appliances: Computer // assuming this turned gray and cannot be touched or edit anymore Serial Number: <input type=text> //this will be type by the administrator to edit the necessary information that was in the database Model Number: <input type=text> // same as this one will be inputted Type: <input type=text> after the admin type the information it should look like this one: Appliances: Computer Serial Number: 123-456 Model Number: 123-456 question: 1) could this one be done? if so please help me otherwise tell me still 2) should i use a flash or any sort of multimedia to do this or just pure html code and php alone? Type: abc-def and so on Link to comment Share on other sites More sharing options...
Wuhtzu Posted September 6, 2007 Share Posted September 6, 2007 This can't be done in html and php unless you want to have an actual submit button <input type="submit" value="Submit">. You have to use some javascript. It will allow you to submit the form as soon as an option is selected. This article / tutorial explain form submitting with javascript: http://www.javascript-coder.com/javascript-form/javascript-form-submit.phtml http://www.willmaster.com/possibilities/archives/wmp20031230001.shtml * pay attention to parts with onClick=doSomething() Beside the javascript you need to make your script show the select boxes if no option has been selected (the first time the user sees the page) and "fill in the blanks" if an option has been selected (when the user selects something - this probably involve connecting to a database ect.) Link to comment Share on other sites More sharing options...
Barand Posted September 6, 2007 Share Posted September 6, 2007 Do NOT double post. Link to comment Share on other sites More sharing options...
Recommended Posts