Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/263987-changing-text-in-a-form/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.