Hi Guys,
I’m doing some work on a clients site that was developed using iFrames and I’m having a bit of an issue with getting external links to bring up the desired pages.
Eg. A mail out is sent to a group with a direct link to an individual page ([url]www.myurlxxx.commyotherpage.html[url]www.myurlxxx.com
I’m not familiar with iFrames so it may well be a simple thing to sort out but my initial thought was to use the script:
function direct(){
var url= (location.href);
var homepage= “homepage.html”;
var navigate= “
if (url == navigate)
{
document.getElementById(“mainWindow”).src = homepage;
}
else {
document.getElementById(“mainWindow”).src = url;
}
}
On page load, in order to parse the desired url into the src of the iFrame.
However whenever I try this I get errors when the else statement is called.
Anyone got any ideas……
Do I need to split the url so just the html page is loaded rather than the entire url?
Or am I going about this in an altogether too elaborate (or stupid) way and making things difficult for myself?
Any help would be appreciated as I feel like I’m going round in circles.
Thanks