1) Script Title:
Pausing up-down Scroller
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex2/crosstick.htm
3) Describe problem:
Before I begin, I'm a beginner at JavaScript but know a little PHP.
Our current site www.altmore.co.uk uses "Cross Browser marquee II" but because of performance issues on FF (see bug report at
) I want to move to the Pausing up-down scroller, which only causes CPU usage to go to ~10-20%.Code:http://www.dynamicdrive.com/forums/showthread.php?t=41987
I read with interest a related though different problem in
However, as you can see from www.altmore.co.uk and view page source the generated HTML we want to put into the scroller is massive (1000 lines ?) so I don't want to put that into the <head> as it will kill our site for SEO, as the text we want the SE's to find is near the top of <body>, and search engines won't bother reading down that far, if they have tons of HTML in <head>.Code:http://www.dynamicdrive.com/forums/showthread.php?t=33460&highlight=Pausing+up-down+Scroller.
Interesting! I've just read
"Everything between <script type="text/javascript"> and </script> that is in Step 1 on the demo page may be placed in an external file."Code:http://www.dynamicdrive.com/forums/showthread.php?t=14259&highlight=Pausing+up-down+Scroller
Now I'm already familiar with external .js files as you can see from our site, but now I'm thinking about running PHP from within the EXTERNAL javascript to generate the content as per the FIRST post above !! (I've never tried running PHP from javascript before and didn't know one could do it... till now)
Or, is it too late to run PHP from within the external javascript because the external javascript won't be executed until it gets loaded into the client ?
I suspect yes.....
:-(
But now I'm at the bottom of this last post and John says:
"Notes: The pausecontent array can be defined in the second block on the page (before the new pausescroller() call) instead of in the external script,"
..so if we do our PHP in here, we should be able to generate the 1000+ lines of HTML down the page and after the content we want the SE's to index ?
...or maybe there's an easier way to do this that my untutored eye is missing (in which case pls enlighten)



Reply With Quote
And you can always just backslash any quotations within your string, for example:
Bookmarks