Hey friends, I would like to be intrsucted on how to retrieve the url value of the current page. I operate a page with an iframe inside it, and the iframe url is the url value I will need to retrieve. I am trying to create a "Full Screen" button which retrieves the value of of the iframe url and opens it up in a new window. I have been struggling with many different options but have had no luck so far. Any assistance would be greatly appreciated. Thanks
That should be all thats needed to get the current URL of that iframe.
Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08) Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08) I want to leave this world the same way I came into it, Screaming, Incontinent & No memory! I laughed that hard I burst my colostomy bag... (\\.\ May03) Life for some is like a car accident... Mine is like a motorway pile up... Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?
I greatly appreciate your help. In fact the code you provided was perfect... except for one small issue. The code only allows me to open the original value of the iframe url, and not the url of the framed page as it changes, say from google.com to yahoo.com. I've been testing this out in a 'test page' so I'll include the head to body code here, as well as the the test page (in txt format as htm isn't allowed) so you can better understand my problem.
PHP Code:
<head>
<SCRIPT LANGUAGE="JavaScript">
function getURL()
{
iframeurl = document.getElementById("myiframe").src;
}
function Start(page)
{
OpenWin = this.open(page, "CtrlWindow", "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes");
}
I believe there may be an error in the way I implemented the getElement parametre, but you guys are the experts so I'll leave the expertise to you.
Thanks again,
What he said was the issue is the iframe and your browser security, I think, dont quote me but its built in security feature of the browser not to allow access beyond what you already have access to.
I could be totally wrong but I think its that reason too.
Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08) Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08) I want to leave this world the same way I came into it, Screaming, Incontinent & No memory! I laughed that hard I burst my colostomy bag... (\\.\ May03) Life for some is like a car accident... Mine is like a motorway pile up... Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?
Bookmarks