php - Iframe cannot get its parent's URL parameter -


the parent url looks this

http://exampledomain.com/~somename/index.php/en/pagename.html?parameter1=1

in above page, there iframe stored on same domain. url of iframe looks this

http://exampledomain.com/~somename/form/index1.php

inside index1.php, there javascript code parent's url parameter. this

var $_get=parent.get; var voucher=0; if ($_get['parameter1']==1) voucher=1; 

console window return error @ if line

uncaught typeerror: cannot read property 'parameter1' of undefined

please advice, thank much.

there nothing parent.get in php

use this

 echo $_server['http_referer']; 

this return referer of page.. hope wil work


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -