PDA

View Full Version : News Bar script not compatible with FF although it is coded as compatible.



SueW
06-07-2006, 01:03 AM
Hello:

I have a question about the News Bar script as seen on this page,
http://www.dynamicdrive.com/dynamicindex2/newsbar.htm

Although it says the script works with FF1+, when I view that page with
the Firefox browser, the previous and next buttons appear as numbers,
ie. "3" and "4" - instead of [Next] & [Previous]

I tried Firefox 1.0 and then the latest build 1.5.4 - but no luck.

I'd love to use this script - if there is a way around this in
Firefox.

Any suggestions? I tried emailing the author, but it bounced back.

Hope someone can help. Thanks

Twey
06-07-2006, 01:23 AM
See here:
if (ie4||ns6){
document.write('<form name="news_bar"><input type="button" value="3" onclick="moveit(0)" class="scrollerstyle" style="width:22px; height:22px; border-right-width:0px;" name="prev" title="Previous News"><input type="button" name="news_bar_but" onclick="goURL();" style="color:#000000;background:#FFFFFF; width:'+barwidth+'; height:22px; border-width:1; border-color:#000000; cursor:hand" onmouseover="this.style.background=mouseover_color" onmouseout="this.style.background=mouseout_color"><input type="button" value="4" onclick="moveit(1)" class="scrollerstyle" style="width:22px; height:22px; border-left-width:0px;" name="next" title="Next News"></form>');The buttons are explicitly defined as saying "3" and "4". Change them if you will.

SueW
06-07-2006, 01:30 AM
Simple enough! :eek: I hadn't gotten to the code, I was just looking with the various browsers. That's kind of weird that it's scripted that way - hope I'm not the only one with that question.

Twey
06-07-2006, 01:32 AM
It is...

SueW
06-14-2006, 04:04 PM
The problem with the numbers "3" and "4" appearing isn't that the script says <input type="button" value="3" or <input type="button" value="4" onclick="moveit(1)"

I tried changing them to previous/next and the buttons became symbols on the IE browser and squished text on Firefox.

It was then I discovered this text in the script, <style> <!-- .scrollerstyle{ font-family:webdings;

So... it would seem that Firefox isn't recognizing the webdings.

I've changed the fontfamily to arial and changed the buttons to <input type="button" value="<" & value=">". I did the same for Opera because, although it displayed the text previous/next, it distorted the size of the bar.

The news bar now looks better on Opera/Firefox. I liked the webdings for IE, but this will have to do - unless someone else has a better idea.

Twey
06-14-2006, 04:28 PM
You can always substitute several images to create a button, of course.