Getting the url of the parent iframe

#1
[eluser]saidai jagan[/eluser]
Hai,
Iam using code igniter for my website(social networking site).And i have implemented crazy egg tool to get the total clicks of my web site.In crazy egg they are calling my website through iframe.

Here comes the problem i cant able to take the url which calls my site as iframe.
Can any one tell how to get the url of the parent iframe in CI of js ??
Thanks.

#2
[eluser]n0xie[/eluser]
Have you tried using javascript?
Code:
top.location.href
parent.location.href

#3
[eluser]saidai jagan[/eluser]
I tried this in my helper
but it displays an error (seesion already start)

if (parent.frames.length != 0) {
alert('yes');
}
else {
alert('no');
}

#4
[eluser]saidai jagan[/eluser]
This is the error
Message: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\xampp\htdocs\jagan\pokervibez_new\application\helpers\user_helper.php:1)

Filename: libraries/AI_Session.php

#5
[eluser]n0xie[/eluser]
That's a PHP error, which shouldn't have anything to do with javascript. It seems you have a session_start() in your helper file.

#6
[eluser]saidai jagan[/eluser]
Then how to fix this problem ??
or can u suggest me a new method ?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.