Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Changing all links to open in new window
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redbrad0
Advanced Member

USA
3725 Posts

Posted - 18 February 2005 :  10:37:43  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
I have a bunch of html code stored in the database that I would like to replace all html links to open in a new window (target="_blank"). Currently I just search for <a href and replace it with <a target="_blank" href but if they have other tags between the a and href then it gets missed. I know I should be using Expressions but have never been able to get that to work so I am hoping someone here could help me out.

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 18 February 2005 :  19:05:51  Show Profile
Have you just tried looking for href= and replacing it with target="_blank" href=? That way you do not miss the ones with other stuff in between. Just a thought.

Cheers,

David Greening
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 20 February 2005 :  18:17:56  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
Well I could do that but what if the links already have a target in them?

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 20 February 2005 :  23:55:41  Show Profile
Your in a catch 22 situation then. There is no other way than going to each href= as they are listed and looking at them. Going to be a boring job for someone. You got children that are old enough who like to know about programming, if so give it to them to do, I know when I have a boring job to do, I pass it off to my children. *ROTFLMARO*

Cheers,

David Greening
Go to Top of Page

-gary
Development Team Member

406 Posts

Posted - 23 February 2005 :  19:22:01  Show Profile
Update the links to remove the target first and then reapply to all. If there's nothing abnormal about the links, this shouldn't be a problem.

KawiForums.com


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07