Jump to content

*sigh* can someone tell a first-time coder what she's doing wrong ?


Nicky_Pot

Recommended Posts

Okay, here's what i've got so far - but it keeps looking for the local file "Adress2$" rather than opening Adress2$ as an URLAnd yes, i know this isn't the most elegant bit of code out there. Give me a break, will you? it's the first JavaScript i've -EVER- written.

<html><head><script type="text/javascript">var tvar ivar adress$var adress2$function timedCount(){document.getElementById('txt').value=idocument.getElementById('Adress2$').value=adress$+idocument.frame.location.href=adress2$i = Math.round(99999*Math.random())adress$="http://www.forumname.com/forum/viewtopic.php?t="adress2$="http://www.forumname.com/forum/viewtopic.php?t="t=setTimeout("timedCount()",15000)}</script></head><body onLoad="timedCount()"><form><input type="text" id="txt"><input type="button" id="adress2$"><iframe src="adress2$" height="980%" width="100%" name="frame"></form></body></html>Edit - Nevermind, i've cracked it. Now to find a way for this sucker to keep track of the fact i'm logged in to those forums
Link to comment
Share on other sites

One thing, end all things with the semi colon ( ; ), this signals that the function or declaration or whatever has ended.Oh yeah, Imframes are supposed to be ended with the </iframe> tag.And please, we have kids in here, dont cuss!

Link to comment
Share on other sites

One thing, end all things with the semi colon ( ; ), this signals that the function or declaration or whatever has ended.Oh yeah, Imframes are supposed to be ended with the </iframe> tag.And please, we have kids in here, dont cuss!
Okay :) done and done.Still, my problem remains - i would like to open the URL in a new Window, rather than in a frame, as i strongly suspect it'll keep track of my cookies then. Any idea's ?
Link to comment
Share on other sites

Okay :) done and done.Still, my problem remains - i would like to open the URL in a new Window, rather than in a frame, as i strongly suspect it'll keep track of my cookies then. Any idea's ?
i dont reli not much bout javascript but cant u jus use da
 target='blank'

?????????????

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...