Forum Moderators: open

Message Too Old, No Replies

Search Question

Somebody throw me a friggen bone here ;)

         

MikeinSD

5:49 pm on Mar 1, 2005 (gmt 0)

10+ Year Member



Hey Peeps,

New to the forums :)

I'm curious if anyone has any experience or advice on finding documents that do not contain snippets of code. I'm trying to ensure that an inline JavaScript is included on every page of a website that has several thousand pages (of course it was decided not to insert it into an SSI grrr...)

And I'm not sure where to start. Any help or direction would be greatly appreciated.

Thanks! :)

Corey Bryant

8:17 pm on Mar 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums MikeinSD!

I take it that you have included this JS on some webpages but not others? Would it harm the site if you put it in twice (some JS would just overwrite it).

Doing a Search and replace you can easily add the coding to your website if you have not added the JS to some pages / some folders even?

-Corey

MikeinSD

10:27 pm on Mar 2, 2005 (gmt 0)

10+ Year Member



>Welcome to the forums MikeinSD!
Thanks :)

>I take it that you have included this JS on some >webpages but not others? Would it harm the site if >you put it in twice (some JS would just overwrite >it).

The way the JS is setup this would throw an Over Stack Error.

>Doing a Search and replace you can easily add the >coding to your website if you have not added the JS >to some pages / some folders even?
>-Corey

The code has been customized a bit for the pages it's already on so removing it with a find replace would be near impossible.

I may just be up a **** creek without a paddle :p

Thanks for your help though :)

Corey Bryant

11:31 pm on Mar 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Unfortunately, with FP it does not offer that type of Search and replace.

Have you thought about doing it as an external script? You can easily add that to the pages via S&R. But before you do that, you can do an S&R a few times, deleting all the old JS

-Corey

Reid

1:26 am on Mar 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would do a search first so I could make a list of pages to leave alone. Then you may find some way to insert it in all the other pages like an 'invert selection' or something.

Reid

1:46 am on Mar 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or if you can find all the 'done' pages easily then make a backup copy of those pages, search and replace the whole site and then repair those pages with the backup copy.