Gossamer Forum
Home : General : Internet Technologies :

Javascript Question

Quote Reply
Javascript Question
Hi everyone... first time here... hope I can get some help with my issue I am having.

I have a .js file that contains the following code:

============================

function openlink() {
perfectwidth = screen.availwidth - 5;
window.open('http://www.websiteaddress.com/frameset.html?' + this.href, this.host.replace(/\./gi, '').replace(/:/gi, ''), 'width='+perfectwidth+',height='+screen.availheight+',scrollbars=no,resizable=yes,status=no');
return false;
}

function setlinkfunction() {
for (temp=0; temp<document.links.length; temp++) {
document.links[temp].onclick = openlink;
}
}

window.onload = setlinkfunction;

============================

I use the code above to open the following links on my page to another window that contains a small frame. The links that open up into the new window look like this:

<a target=_new onMouseOver="window.status='Click here for more information.';return true" onMouseOut="window.status='';return true"
href=http://www.websiteaddress.com><i>Website Title</i></a></b><br><font size=-1>Website Description</font>

Works great.... however, there are some links on the page that I have as regular html, i.e. <a HREF="http://www.websiteaddress.com">Link Description</a> that I DO NOT want to open up to the frame.

Is there something I need to add to the .js file, or is there something I can simply add to the links I do not want to open up into the new window and frame?

Thank you for your help.

Michael
Subject Author Views Date
Thread Javascript Question michael26 5834 Jan 26, 2003, 5:31 AM
Thread Re: [michael26] Javascript Question
Paul 5617 Jan 26, 2003, 6:07 AM
Post Re: [Paul] Javascript Question
michael26 5568 Jan 26, 2003, 6:20 AM
Thread Re: [Paul] Javascript Question
michael26 5564 Jan 26, 2003, 6:25 AM
Thread Re: [michael26] Javascript Question
michael26 5570 Jan 27, 2003, 3:55 PM
Thread Re: [michael26] Javascript Question
Paul 5579 Jan 27, 2003, 5:01 PM
Thread Re: [Paul] Javascript Question
michael26 5547 Jan 27, 2003, 9:21 PM
Post Re: [michael26] Javascript Question
Paul 5543 Jan 28, 2003, 2:25 AM