gerkintrigg Posted June 11, 2012 Share Posted June 11, 2012 This is driving me bonkers! I want to be able to dynamically change the value of a text field using this function: function popup_blanket(ID2Delete) { document.getElementById("blanket").style.visibility = "visible"; document.getElementById("confirmation_centre_screen").style.visibility = "visible"; //alert('ID: '+ID2Delete); document.forms['DeletePageForm'].elements['Page2Delete'].value=ID2Delete; } Then I will simply call it using this link: <a href="javascript: popup_blanket(<?php echo $rpages['page_id'];?>)"><img src="<?php echo $root;?>furniture/delete.jpg" alt="Delete This Page" width="30" height="30" border="0" title="Delete This Page" /></a> The problem is that the value of the text box is not responding. I have set up a test alert to check that the function is being called correctly (now commented out above) but that worked fine. What am I doing wrong? Quote Link to comment https://forums.phpfreaks.com/topic/263987-changing-text-in-a-form/ Share on other sites More sharing options...
Illusion Posted June 13, 2012 Share Posted June 13, 2012 You figured it out or you still need help ? Quote Link to comment https://forums.phpfreaks.com/topic/263987-changing-text-in-a-form/#findComment-1353473 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.