Jump to content

Passing value from menu


Canman2005

Recommended Posts

Hi all

 

I found this super cool script

 

http://www.mredkj.com/tutorials/tableaddrow.html

 

instead of a button called "add" I have replaced it with

 

<select name="" onChange="addRowToTable();">
  <option value="111">111</option>
  <option value="222">222</option>
  <option value="333">333</option>
</select>

 

so that when you select something from the menu, it inserts a new row for you.

 

My question is.

 

How can I carry the value from the menu to the new row?

 

So for example, if I selected the menu item "222", it would carry over and  insert "222" into the new row added.

 

Is that possible and if so, can anyone help please?

 

Thanks in advance

 

Dave

Link to comment
https://forums.phpfreaks.com/topic/171972-passing-value-from-menu/
Share on other sites

Archived

This topic is now archived and is 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.