3 Replies - 801 Views - Last Post: 08 March 2009 - 04:37 PM

#1 HowdeeDoodee  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 78
  • Joined: 17-June 08

How Do I Add Javascript Code To Thousands Of Pre-existing Web Pages

Posted 04 March 2009 - 01:41 PM

I have thousands of html web pages in various sites and sub sites. I want to add the following code to nearly all of the pages in the sites and sub sites. The html pages were all written with FP 2000. I use FP on a daily basis. How do I add the following code without pasting into each page, one by one? Some pages have borders, some do not.

<!-- ADDTHIS BUTTON BEGIN -->
<script type="text/javascript">
		var addthis_pub = "YOUR-ACCOUNT-ID";
</script>

<a href="http://www.addthis.com/bookmark.php" 
		onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]');" 
		onmouseout="addthis_close();" 
		onclick="return addthis_sendto();"><img 
		src="http://s7.addthis.com/static/btn/lg-bookmark-en.gif" 
		width="125" height="16" border="0" alt="Share" /></a>

<script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script>
<!-- ADDTHIS BUTTON END -->



Thank you in advance for your replies.

Is This A Good Question/Topic? 0
  • +

Replies To: How Do I Add Javascript Code To Thousands Of Pre-existing Web Pages

#2 HowdeeDoodee  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 78
  • Joined: 17-June 08

Re: How Do I Add Javascript Code To Thousands Of Pre-existing Web Pages

Posted 04 March 2009 - 03:49 PM

I have found an html search and replace utility that fills my need as described above.

Thank you.
Was This Post Helpful? 0
  • +
  • -

#3 gregwhitworth  Icon User is offline

  • Tired.
  • member icon

Reputation: 219
  • View blog
  • Posts: 1,604
  • Joined: 20-January 09

Re: How Do I Add Javascript Code To Thousands Of Pre-existing Web Pages

Posted 04 March 2009 - 09:30 PM

Ctrl - H is Find and Replace in Front Page. But be careful with this, if it isn't the exact same then you should write an irregular expression to track it down within the pages. Also, switch over to Dreamweaver - HA! :)
Was This Post Helpful? 0
  • +
  • -

#4 Arenlor  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 34
  • View blog
  • Posts: 389
  • Joined: 26-April 06

Re: How Do I Add Javascript Code To Thousands Of Pre-existing Web Pages

Posted 08 March 2009 - 04:37 PM

This is why everyone should use some type of included file.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1