|
Post by CD on Jun 8, 2005 13:45:43 GMT -8
<script> // Links that open in a new window now open in the same window var aAH = document.getElementsByTagName("A"); for(a=0;a<aAH.length;a++){ if(aAH[a].target=="_blank"){ aAH[a].target="_top"; }} </script> No editing, just put it in your footers. This will not effect the ads at the very bottom. Just everything above those. Both PBv3 and PBv4 compatiable. Edit: And before anyone says anything about it being too simple, Naruto said we needed some simple codes, to make the PBv4 database larger.
Last Edit: Jun 8, 2005 13:46:36 GMT -8 by CD
|
|
|
Post by CrAzY_J on Jun 11, 2005 7:53:10 GMT -8
This code kinda annoying
|
|
|
Post by CD on Jun 11, 2005 11:14:29 GMT -8
It just has them open in the same window. You can always just middle click them for a new tab Crazy.
|
|
|
Post by CrAzY_J on Jun 11, 2005 11:38:54 GMT -8
It just has them open in the same window. You can always just middle click them for a new tab Crazy. oh crap i thought i was "All links open in new window" lmao. that would be annoying XD
|
|
100%
|
Post by Aaron on Jun 11, 2005 14:31:56 GMT -8
^ That's what I thought at first =P
I've never heard of target="_top" though. Should it be _self?
|
|
|
Post by CD on Jun 11, 2005 16:25:02 GMT -8
Its for frame causes. If the page loads in a frame/iframe, and you click that, it makes the window load above the frame >_> Its just a coding habit.
|
|
|
Post by CrAzY_J on Jun 11, 2005 20:01:35 GMT -8
Its for frame causes. If the page loads in a frame/iframe, and you click that, it makes the window load above the frame >_> Its just a coding habit. did you try using it like Naruto said? maybe itll replace the ads with the link you clicked that would be freaking awesome XD
|
|
|
Post by CD on Jun 11, 2005 20:10:09 GMT -8
Actually, since they are an iFrame... yes, yes it would XD But only if you click the ad link. XD But you could set target to the name of the iFrame XD
|
|
|
Post by CrAzY_J on Jun 11, 2005 20:38:57 GMT -8
Actually, since they are an iFrame... yes, yes it would XD But only if you click the ad link. XD But you could set target to the name of the iFrame XD the iframe has a name? wait....i dont get it. put the code in my test forum and lemme see. btw, i used to use document.links. i wonder why nobody uses it anymore, not cross browser i guess?!
|
|
|
Post by CD on Jun 12, 2005 15:03:06 GMT -8
It should. All iframes SHOULD have a name, but it probably doesn't. You add the code if you want to test it.
|
|