I'm asking about my Myspace account. I'd like to know if there's one piece of code
that i can put in that will allow all links clicked from my site to open and load in a new page.
Well I know about that... but i'm trying to keep from not putting that behind every single link...
In other words isn't there something that would say links 1 2 3 4 & 5 will open in new windows when
1
2
pic
3
text
4
5
because i can't control all the html on my page... if someone clicks on someone else's profile from mine, it'll open in the same window, and i'm trying to change that
Do you want all of the links to open in a new window?
If so, can you edit the document's HEAD element.
If not, are they all in one section?
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
Yes, that's what i'm trying to accomplish... ALL THE LINKS
Except the catch is, it's myspace so i don't have complete control over all the html. I am able to change the way it looks by adding this code to a section, and i want to add something to open a new window evertime any and every link is clicked... maybe i'm dreaming
Well if you can add a STYLE element to the HEAD then you should be able to add a BASE element.
HTML Code:
<base target="_blank">
Otherwise you might try a little JavaScript.
HTML Code:
<script type="text/javascript">
onload = function () {
var l, i = 0
while (l = document.links[i++]) {
l.onclick = function () {window.open (this.href, 'child'); return false}
}
}
</script>
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
Funny that, it looks like a regular link. I think you've reached the point where you have to accept that myspace is screwy and not everything is going to work the way you want it to.
Bookmarks