missing rollover effects....

A

Andrew Murray

Using Frontpage 2002......viewing site in IE 6.0

I have my index page, which is actually a template for output from a cgi script
(delivers news articles to the index.htm page).

Problem is the links on the lefthand side have dhtml rollover effects applied -
blue 'background' for each link on the mouseover action.

This particular file is missing the dhtml effect.

Page is here: http://members.iinet.net.au/~admurray/cgi-bin/csvnews.pl


csvnews.pl generates the news-article content from a flat-text (CSV) file.....try
the hyperlinks on the left they should be not-underlined in the first instance,
then on mouseover, the stylesheet I have makes them underlined with the mouseover
action, but they should also have the blue-bar background for each.

check this page for what I mean http://members.iinet.net.au/~admurray/main.htm

I figured it is because the perl script is running from cgi-bin, but the template
file is in my home (public_html) directory, but it behaves as if cgi-bin (where
the perl script is) is the current directory, and I need to point to the
'animate.js' (which does the rollover effects) which lies in public_html.

How can I make the rollover effects work in the same manner as the rest of the
site - copy the js file to cgi-bin, so it is there for the page to reference to
it?

the code fragment for the js file is

<script language="JavaScript1.2" fptype="dynamicanimation" src="animate.js">

normally if I had a file for instance two-directories in from the public_html,
the src= would be src=../../animate.js" or similar, which tells it to backstep
two directories to where the animate.js is located.

With the index.htm and the perl script, it doesn't seem to want to do this. In
HTML view, I tried to change it to ../animate.js but FP changes it back to just
"animate.js" because technically, index.htm is actually in public_html, but when
the news content is generated in the index.htm, it screws up the rollovers for
some reason? I have the same problem with things like images and so - the
relative paths get mixed up and it thinks they are located in a directory off the
cgi-bin like cgi-bin/images/etc rather than public_html/images......

Basically it can't run the function "dynamicanimation();" because it can't locate
the external javascript file.
The other thing is it doesn't even bring up errors about 'source not found' or
anything like that,it just ignores it as if it weren't there.

Any suggestions? Thanks in advance....
 
R

Ronx

I usually ensure links used by Perl scripts are root-relative ie. of the
form <img src="/images/tp.gif> etc. With a FP webbot this is usually not
possible.
You could try
1) placing a copy of the .js file in the cgi-bin
2) placing a copy of the index.htm page in the cgi-bin, and using this as
the template. You will have to correct the links on this page, assuming the
cgi-bin is a subweb. If the cgi-bin is not a subweb (bad practice, IMHO)
the new page could use the index.htm as an include page - need to copy the
<head>...</head> and <body...> tags manually, though.
3) Change the .pl script to parse the template and change links dynamically
4) Have the .pl script add its own link to the .js file
5) Make your own copy of animate.js and point index.htm to this using
root-relative link.

Make all links on the index page root-relative or absolute will fix your
graphics problems (though FP will no longer manage them, and may change them
back) and, probably 1) or 5) will fix the DHTML.

I use 3) and 4). This adds processing overhead, but never had a problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

about rollover affect in FP 2003 2
WIERD GLITCHED/ERROR IMAGE HELP APRECIATED! 1
disappearing code 7
AddPicturesToShapes 0
Rollover button addition 5
Script Error 7
CGI Bin question 1
FP 2002 and animate.js 2

Top