Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making a Javascript assignable to certain links

Status
Not open for further replies.

kylebellamy

Programmer
Jan 24, 2002
398
US
I'm guessing this is a class thing but I wondered if Dreamweaver CS3 could make it easier.

I have a script currently that goes inline with a link so that the link opens in the parent browser window.

Code:
<a href="#" onClick="window.opener.location.href='somelink.htm';">Link text</a>

I am updating a newsletter each week with a lot of links in it but not all the links need the javascript so I currently use find and replace to fix all the links and then go back through and change the ones back that didn't need it such as ones that update Outlook calendars, for instance. Very tedious.

What is my best approach? (here's where my terminology will break down)

A DW script where I select a link and run it to revert it to the standard link style?

A class that will change the link to the parent open style link one by one?

Thanks for any help you can offer,

Kyle



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top