|
Page 1 of 1 |
ollax
VIP Member
Posts: 2154
Location: Here today, Hell tomorrow!
|
Posted: Thu, 1st Nov 2007 00:06 Post subject: Need some help with window.open |
|
 |
I'm trying to learn my nine year old god daughter some basic programming so never mind the cheesy "log in". How do i get the window.open to open the credence.html in an iframe or in "itself"?
Thanks dudes!
<SCRIPT>
function passWord() {
var testV = 1;
var pass1 = prompt('Skriv in ditt lösenord',' ');
while (testV < 3) {
if (!pass1)
history.go(-1);
if (pass1.toLowerCase() == "foggerty") {
alert('Tack!!');
window.open('credence.html');
break;
}
testV+=1;
var pass1 =
prompt('Access Denied - Lösenordet var felaktigt, Var snäll och försök igen.','Lösenord');
}
if (pass1.toLowerCase()!="password" & testV ==3)
history.go(-1);
return " ";
}
</SCRIPT>
Of all the things i've lost, i miss my mind the most!
"Ozzy Osbourne"
_ _ _ _ _

|
|
Back to top |
|
 |
|
Posted: Thu, 1st Nov 2007 00:24 Post subject: |
|
 |
window.open is for opening popups
i cant remember exactly but the JS for opening in the current window would be something like:
getURL('url here');
and the code for an iframe would be something like:
iframename.src = 'url here';
with the iframe declared with a name, for eg:
<iframe name="iframename" src="url before click">
now i can guarantee that these are not right, but hit google up and u should find ur answers.
Cohen wrote: | I'm a troll! well done, you caught me lying my ass off on a forum. I post pictures so that it makes you angry and that you wish you could have my awesome material things  |
|
|
Back to top |
|
 |
ollax
VIP Member
Posts: 2154
Location: Here today, Hell tomorrow!
|
Posted: Thu, 1st Nov 2007 00:42 Post subject: |
|
 |
KaiKo wrote: | window.open is for opening popups
i cant remember exactly but the JS for opening in the current window would be something like:
getURL('url here');
and the code for an iframe would be something like:
iframename.src = 'url here';
with the iframe declared with a name, for eg:
<iframe name="iframename" src="url before click">
now i can guarantee that these are not right, but hit google up and u should find ur answers. |
Thanks man!
Any suggestions on how to implement it in the code, i'm at a complete standstill here and have been googeling for hours (been 7 years since i last programmed JS) LOL
Of all the things i've lost, i miss my mind the most!
"Ozzy Osbourne"
_ _ _ _ _

|
|
Back to top |
|
 |
Page 1 of 1 |
All times are GMT + 1 Hour |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group
|
|
 |
|