html - Passing javascript variable to popup DIV -


i have html main page div popup. when user click button in main html page, hidden value collected javascript. , javascript open popup. can value collect javascript sent popup?

in following code, value apple need display echo $abcd.

<div class="pages"> <input type="button" name="addquestion" value="click" />  <input type="hidden" value="apple" name="cellname" /> <div>  <div class="popup" id="popupid"> <?php echo $abcd; ?> <div> 

java script

 var cell = document.getelementsbyname("cellname");     (var = 0; < cell.length; i++) {         cell[i].strcell = cell[i].value;         cell[i].onclick = popupmenu;      }  function popupmenu() {       var abcd = this.strcell;  // need send value popup div.     document.getelementbyid("popupid").style.display = 'block';   } 


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -