PDA

View Full Version : frame-link issues



AmenKa
10-17-2007, 06:01 AM
hey this is my second topic but everyone seems to have ignored the first so here it goes again, does anyone know how to dynamically adjust a page on load via js, etc so that only external links load in the window, but internal links load in the frame?

any help would be much appreciated...

djr33
10-17-2007, 06:11 AM
Nope. Manually.

Or, I suppose, you could write a javascript thing that would run through the source code and guess which links should be external (ie starting with "http"), but that seems like a hassle.

AmenKa
10-17-2007, 06:16 AM
that is what i was thinking, i want to know if you can use js to specify links outside my domain and recode them to open in the window instead of the frame

edit1: i dont know js so a tutorial or samples that i can work with would be great...

edit2: i dont know how hard it would be, but i want the js to sniff through the source and say apply a attribute to each of the links not starting with http://www.mydomain.net/

edit3: that isnt my domain its an example but w.e it can link lol i am cool with that...

tech_support
10-17-2007, 06:42 AM
http://www.dynamicdrive.com/dynamicindex8/newwindow2.htm

AmenKa
10-18-2007, 12:35 AM
thanks for the input, but I don't want the links to open in a new window, i just want them to open outside of the frame...

i would do this myself but the site encompasses a forum so i want a script to do it automatically when people view any links the users post...

edit1: after looking at that file i think i can change it a tad and it will accomplish what i want...

thanks for the help tech_support

edit2: never mind it didn't work out like i was thinking... if you look at the script it has a thing to specify what attribute you apply... i thought _top would force it out of the frame but not out of the window... so much for that.

it could also be that i didnt place the script where i need to... i put it in the html file that seems to contain each messages body and title..