PDA

View Full Version : Find in Page script doesnt work on Geocities?



serendipity
08-21-2005, 07:44 PM
http://dynamicdrive.com/dynamicindex11/findpage.htm

Hi,

I can't seem to make it work when I upload the page to my Geocities site (ok, so maybe coz its a freebie site?). Anyhoo the only "change" I did on the script was instead of targetting the search to its "self", I changed it to "find in another iframe (which I named as var frametosearch = 'centercontent';).

The problem is when I click on the Find in Frame button, the entire webpage just reloads itself, instead of highlighting text within the iframe...

Now I know it works offline without any script errors....and I know it works online coz I uploaded it into another website...so any ideas on how to make it work?...or should I just not try it on Geociites? I think the extra space it eats up for ads messes up the whole thing :confused: Come to think of it...i've got a couple of other jscripts that dont work either...

Thanks in advance for any replies!

jscheuer1
08-21-2005, 08:12 PM
Geocities (as are many free hosts) is a poor hosting choice when you are planning on using much javascript. Free hosts generally, Geocities in particular, put many of their own scripts on your page automatically when you upload them. These scripts often conflict with some or all of your own scripts on your page rendering them nonfunctional or dysfunctional. The real test is, if it works locally but, not on Geocities, it could well be script conflicts, there are other possibilities. Two of the biggest conflicts arise when your script uses i or j as variables (Geocities hi-jacks those for its own scripts) or if your scripts attempt to put offsite material inside a frame or iframe on Geocities (they've got scripts designed to prevent that). In the first case you can change all i's used as variables to other more complex variable names, same with j's but, of course, use a different name for all the j's used as variables. The second problem has no work around that I know of.

serendipity
08-23-2005, 12:12 PM
Thanks for the reply. Actually, I may have spoken too soon...as I find that my "Find" script now works...go figure...dunno, maybe like you said, there would be certain times that Geocities also loads their own javascripts that conflicts with my existing ones...but hey, free is free...its just "fun to find the work arounds"...