Menu
Hello all,
im abit stuck, i have an iframe and i want to run a certain script dependant to the domain (‘
For example, i want to run a script if the iframes domain is on google, currently in using:
[CODE]
if1=document.getElementById(‘my_iframe’).src;
as1=if1.match(‘google.com/’);
if (as1==”google.com/”) {
alert(‘good’);
}
else {
alert(‘bad’);
}
the problem with that is that it isnt the best way to get the domain and you cant have multiple domains (eg if google or yahoo).
So does anyone know of a way to get around this thanks ?
aNdreW