Current location: Hot Scripts Forums » General Web Coding » JavaScript » a href link change


a href link change

Reply
  #1 (permalink)  
Old 01-30-04, 10:13 AM
ljwonline ljwonline is offline
New Member
 
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question a href link change

afternoon peeps,...

I am currently working on a site that has lots of reports.

When a visitor clicks on the report, instead of viewing the report
they get a banner advert and a message asking them to continue to the
report.

I have duplicated all of the reports and changed the names so all the
reports now have the number1 prefixed before the file name. i.e
report.html is now contained in 1report.html, reportlong.html is now
found in 1reportlong.html and so on.

I need a script that will view the filename, (report.html) and add
the number 1 to the start then either create the link or put the
filename in the link.

I dont really want to create hundreds of links and have to change all
of the filenames manually, I'd like to be able to copy and paste the
same script in the source code and have it link to the new page.

any suggestion?

thanks

Ljw
Reply With Quote
  #2 (permalink)  
Old 01-30-04, 03:43 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
there is another way instead of this !
you could get an editor that allows Search & Replace in a group of files!
in your case you may use anyother way because the files were renamed in a fixed way (mean prefixing 1)... but in case you wanted to change the whole name to something really diffirent what would you do ?

try conTEXT, very good and has some neat options :
http://www.fixedsys.com/context/
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP script to change URL link weekly hculbert Script Requests 0 01-23-04 03:48 PM
$ in http:// link via email? GG Dart PHP 2 01-15-04 11:23 AM
Best way to link images and swf for banner tracking Xtremist JavaScript 2 12-14-03 12:00 PM
Passing a table or variable through a link? chinablack1480 PHP 1 12-07-03 03:55 AM
Different type of link counter mdhall Script Requests 2 10-10-03 01:19 PM


All times are GMT -5. The time now is 01:59 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.