Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
How to disable JS for Firefox?
Old 11-10-2007, 07:56 PM How to disable JS for Firefox?
Novice Talker

Posts: 13
Name: Elena
Trades: 0
I have a popup calendar for form field, and it works great in IE but FF tells me "Error ! The current browser is either too old or too modern (usind DOM document structure)." and shows part of this calendar in the bottom of the page permanently. Is there any way to disable execution of this script if user is in FF browser so he can just manualy enter the dates? Appreciate any help!
smelena is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-10-2007, 08:15 PM Re: How to disable JS for Firefox?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Why not simply make the outdated script work in all browsers?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-10-2007, 09:09 PM Re: How to disable JS for Firefox?
vangogh's Avatar
Post Impressionist

Posts: 10,688
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Elena I agree with Chris that the best solution is to recode the script itself so it does work.

However the easiest solution might be to use conditional comments to only include the script when the browser is IE. You could also try some browser detecting JavaScript to only display the script for IE. The conditional comments will probably be easiest, though.

But again the best solution is to rework the script so it works across browsers.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 11-11-2007, 11:17 PM Re: How to disable JS for Firefox?
Novice Talker

Posts: 13
Name: Elena
Trades: 0
Guys, thank you for the advice, I'd love to do it, I just don't know HOW!!! I'm kinda new at all this... Would you be willing to help?
smelena is offline
Reply With Quote
View Public Profile
 
Old 11-12-2007, 02:25 AM Re: How to disable JS for Firefox?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
I'm sure we could.
However we need the location of the code, so a URL would be handy.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-12-2007, 10:47 AM Re: How to disable JS for Firefox?
Novice Talker

Posts: 13
Name: Elena
Trades: 0
Cool!

There is a script in the bottom of this page:
http://www.fishbigusa.com/prices.html
(oh, one more thing: Tour field glitches in IE but looks fine in FF & NN, any ideas why?) Yeah, I also installed Netscape

The calendar itself is here:
http://www.fishbigusa.com/pupdate.js

And one more (sure not the las one ) question: I'm using this code in the page to have gradiend background:
Code:
{body} style for a gradiend background:
filter: progid:DXImageTransform.Microsoft.gradient(enabled='true' ,startColorstr=#FFF9AF, endColorstr=#78AEFF, gradientType=0)
It works only in IE, are there any ways to have something like this in other browsers?

Last edited by smelena; 11-13-2007 at 07:18 AM.. Reason: code tags added
smelena is offline
Reply With Quote
View Public Profile
 
Old 11-12-2007, 10:49 AM Re: How to disable JS for Firefox?
Novice Talker

Posts: 13
Name: Elena
Trades: 0
ok, that green face is not part of a code, it should be ":" followd by "D"
smelena is offline
Reply With Quote
View Public Profile
 
Old 11-12-2007, 10:51 AM Re: How to disable JS for Firefox?
Novice Talker

Posts: 13
Name: Elena
Trades: 0
and to prevent next question: I tried to e-mail the person, who wrote this script, the letter came back undelivered...
smelena is offline
Reply With Quote
View Public Profile
 
Old 11-12-2007, 05:15 PM Re: How to disable JS for Firefox?
Novice Talker

Posts: 13
Name: Elena
Trades: 0
Code:
<script language="JavaScript">
if (document.all) {
 document.writeln("<div id=\"PopUpCalendar\" style=\"position:absolute; left:0px; top:0px; z-index:7; width:200px; height:77px; overflow: visible; visibility: hidden; background-color: #FFFFFF; border: 1px none #000000\" onMouseOver=\"if(ppcTI){clearTimeout(ppcTI);ppcTI=false;}\" onMouseOut=\"ppcTI=setTimeout(\'hideCalendar()\',500)\">");
 document.writeln("<div id=\"monthSelector\" style=\"position:absolute; left:0px; top:0px; z-index:9; width:181px; height:27px; overflow: visible; visibility:inherit\">");}
else if (document.layers) {
 document.writeln("<layer id=\"PopUpCalendar\" pagex=\"0\" pagey=\"0\" width=\"200\" height=\"200\" z-index=\"100\" visibility=\"hide\" bgcolor=\"#FFFFFF\" onMouseOver=\"if(ppcTI){clearTimeout(ppcTI);ppcTI=false;}\" onMouseOut=\"ppcTI=setTimeout('hideCalendar()',500)\">");
 document.writeln("<layer id=\"monthSelector\" left=\"0\" top=\"0\" width=\"181\" height=\"27\" z-index=\"9\" visibility=\"inherit\">");}
else {
 document.writeln("<p><font color=\"#FF0000\"><b>Error ! The current browser is either too old or too modern (usind DOM document structure).</b></font></p>");}
</script>
<noscript><p><font color="#FF0000"><b>JavaScript is not activated !</b></font></p></noscript>
<table border="1" cellspacing="1" cellpadding="2" width="200" bordercolorlight="#000000" bordercolordark="#000000" vspace="0" hspace="0"><form name="ppcMonthList"><tr><td align="center" bgcolor="#CCCCCC"><a href="javascript:moveMonth('Back')" onMouseOver="window.status=' ';return true;"><font face="Arial, Helvetica, sans-serif" size="2" color="#000000"><b>< </b></font></a><font face="MS Sans Serif, sans-serif" size="1"> 
<select name="sItem" onMouseOut="if(ppcIE){window.event.cancelBubble = true;}" onChange="switchMonth(this.options[this.selectedIndex].value)" style="font-family: 'MS Sans Serif', sans-serif; font-size: 9pt"><option value="0" selected>2000 • January</option><option value="1">2000 • February</option><option value="2">2000 • March</option><option value="3">2000 • April</option><option value="4">2000 • May</option><option value="5">2000 • June</option><option value="6">2000 • July</option><option value="7">2000 • August</option><option value="8">2000 • September</option><option value="9">2000 • October</option><option value="10">2000 • November</option><option value="11">2000 • December</option><option value="0">2001 • January</option></select></font><a href="javascript:moveMonth('Forward')" onMouseOver="window.status=' ';return true;"><font face="Arial, Helvetica, sans-serif" size="2" color="#000000"><b> ></b></font></a></td></tr></form></table>
<table border="1" cellspacing="1" cellpadding="2" bordercolorlight="#000000" bordercolordark="#000000" width="200" vspace="0" hspace="0"><tr align="center" bgcolor="#CCCCCC"><td width="20" bgcolor="#FFFFCC"><b><font face="MS Sans Serif, sans-serif" size="1">Su</font></b></td><td width="20"><b><font face="MS Sans Serif, sans-serif" size="1">Mo</font></b></td><td width="20"><b><font face="MS Sans Serif, sans-serif" size="1">Tu</font></b></td><td width="20"><b><font face="MS Sans Serif, sans-serif" size="1">We</font></b></td><td width="20"><b><font face="MS Sans Serif, sans-serif" size="1">Th</font></b></td><td width="20"><b><font face="MS Sans Serif, sans-serif" size="1">Fr</font></b></td><td width="20" bgcolor="#FFFFCC"><b><font face="MS Sans Serif, sans-serif" size="1">Sa</font></b></td></tr></table>
<script language="JavaScript">
if (document.all) {
 document.writeln("</div>");
 document.writeln("<div id=\"monthDays\" style=\"position:absolute; left:0px; top:52px; z-index:8; width:200px; height:17px; overflow: visible; visibility:inherit; background-color: #FFFFFF; border: 1px none #000000\"> </div></div>");}
else if (document.layers) {
 document.writeln("</layer>");
 document.writeln("<layer id=\"monthDays\" left=\"0\" top=\"52\" width=\"200\" height=\"17\" z-index=\"8\" bgcolor=\"#FFFFFF\" visibility=\"inherit\"> </layer></layer>");}
else {/*NOP*/}
</script>

Last edited by chrishirst; 11-13-2007 at 05:37 AM.. Reason: code tags added for clarity
smelena is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to disable JS for Firefox?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.33878 seconds with 12 queries