Thanks for the help guys but im still having problems. If this could be done 'server side' that would be great but i have very little experience with this. Does anyone know how to do it in php?
If poss i would like to vary the iframe content depending on the URL typed into the address bar. For example i have been using the script:
"
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
function gup( name ) {
name = name.replace(/[[]/,"\[").replace(/[]]/,"\]");
var regexS = "[\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
addLoadEvent(function() {
var targetURL = gup("iframe");
document.all.myIframe.src=targetURL;
})
"
In the address bar i can type "http://mysite.com/page11.html?&iframe=page12.html" so that the iframe on page 11 would contain page 12.
The prob is this script works in safari and IE but not FF :(
As I said, any tips on doing it in php would be fantastic.
Thanks! Matt