Setting the value of hidden field

anubis 11 Feb, 2011
Hi, I was wondering how I would go about setting the value of a hidden field to the url of the referring site?

EDIT: I think I figured it out! I just looked at this and changed it to what I needed it to

window.addEvent('domready', function() {
  $('hidden_12').value=document.referrer;
});


I think its working properly lol
GreyHead 11 Feb, 2011
Hi anubis,

Please try this:
<input type='hidden' name='referer' id='referer' value='<?php echo JRequest::getString('HTTP_REFERER', 'HTTP_REFERER not set', 'server'); ?>' /> 

Bob
This topic is locked and no more replies can be posted.