Jump to content

hidden form - getElementById


lilman

Recommended Posts

I am trying to change a hidden form's value with this code:

 

function togglePhoto(formname)

{

  document.getElementById('hiddenformname').value = 'My Value';

}

 

and trigger by:

 

<a onclick="togglePhoto('name');" href="javascript:void('')">

 

If anyone could help me out.  I just want to be able to change it's value upon clicking a link.

 

 

Link to comment
https://forums.phpfreaks.com/topic/49377-hidden-form-getelementbyid/
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.