OZONE Asylum
Forums
Stupid Basic HTML
a couple of ?'s
This page's ID:
9603
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I merely took the first argument to window.open, which was 'sterling575.html', and replaced it with this.href. The keyword "this" refers to the object that the onclick event is inside - the <a> tag. the .href part gets the "href" property of that object, which happens to be what's inside the href="...". This makes it so that you can change the href property of the <a> tag, and the window.open will still work correctly with the changed href. My programming experience came first from C++, which I hardly understood, followed by Visual Basic, which I understood a little better, then JavaScript, which was the first language I *really* understood, thanks to O'Reilly's "JavaScript: The Definitive Guide," which I still occasionally use as a reference. The general syntax of the language is second nature to me now, after... what is it... 6 years of programming, I think. The specifics (like, "what function do I use to open a new window") I still have to look up from time to time (although you start to memorize it before long). I've been working with JavaScript for slightly over 3 years now.
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »