Jump to content

how to do this...if possible


eduardo_consolacion

Recommended Posts

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

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.