473,624 Members | 2,637 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

java script code not working with firefox

15 New Member
this is my code and i call this code from code behinde file on page load
like this
useragree.Attri butes.Add("oncl ick", "CheckSelection ();")

this is working fine with IE but not working with fire fox.

in firefox i got error :
Error: CheckSelection is not defined




Expand|Select|Wrap|Line Numbers
  1. <script language="javascript" type="text/jscript">
  2.   function CheckSelection()
  3.    {
  4.         var chk1 = document.getElementById("useragree");
  5.         var button =document.getElementById("signup");
  6.         if (chk1.checked == true)
  7.         { 
  8.          button.disabled=false;
  9.         }
  10.         else
  11.         {
  12.         button.disabled=true;
  13.         }
  14.    }
  15.  
</script>
Jul 5 '07 #1
5 6588
acoder
16,027 Recognized Expert Moderator MVP
The script tag's type attribute should be "text/javascript", not "text/jscript". JScript only works in IE.
Jul 5 '07 #2
CoolForU
15 New Member
The script tag's type attribute should be "text/javascript", not "text/jscript". JScript only works in IE.

Thanks
it's working.
again thank u very much.:)
Jul 6 '07 #3
CoolForU
15 New Member
this code also not working with fire fox can u plz help me.


Expand|Select|Wrap|Line Numbers
  1. <script language="javascript" type="text/javascript">
  2.  
  3. function CheckSelection()
  4.     {
  5.  
  6.         var txt =document.getElementById("txtnewemail")
  7.         var rd =document.getElementById("rdYes")
  8.        if (rd.checked==true)
  9.     {
  10.         document.getElementById("divtxt").style.visibility = "visible";
  11.         document.getElementById("divtxt").style.display = "block";
  12.     } 
  13.     else
  14.     {
  15.         document.getElementById("divtxt").style.visibility = "hidden";
  16.         document.getElementById("divtxt").style.display = "none";
  17.     }
  18.     }
  19.  
  20.  
i call function like this

[HTML]<tr>
<td class="contentT ext" colspan="2">
<b>Do you want to earn commission selling your home?</b>
<input id="rdyes" onclick="CheckS election()" type="radio" value="1" name="rd" runat="server" />Yes
<input id="rdno" onclick="CheckS election()" type="radio" value="0" name="rd" runat="server" />No
</td>
</tr>[/HTML]
Jul 6 '07 #4
gits
5,390 Recognized Expert Moderator Expert
hi ...

at a first look i see that you have a typo with id="rdyes" ... you try to getElementById( 'rdYes') ... but the ids are case sensitive ... getElementById will not find your element and var rd will be undefined ...

kind regards
Jul 6 '07 #5
CoolForU
15 New Member
hi ...

at a first look i see that you have a typo with id="rdyes" ... you try to getElementById( 'rdYes') ... but the ids are case sensitive ... getElementById will not find your element and var rd will be undefined ...

kind regards

Thanks it's working ..
Jul 6 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

23
16127
by: Loony | last post by:
I have got a code like this in HTML section in ASP file which includes javascript file! The script works under MS IE but doesn't with Firefox! Can anybody tell me what is wrong? <HTML> <HEAD><TITLE></TITLE> <SCRIPT LANGUAGE="JavaScript" SRC="../inc/JSfile.js"><SCRIPT> <SCRIPT> <!-- other javascript scripts working propely
9
8552
by: whitgurley | last post by:
I've searched the web as well as I can for a solution to this problem but have found nothing and just don't know enough about JavaScript to figure out what's going. What I'm trying to do is convert this script: <a href="#" onclick="MM_goToURL('parent.frames','color2.html');return document.MM_returnValue">TEST</a> ....to something that I can use within a Flash movie, which as far as I can tell means that it needs to reside in the...
6
2267
by: Toby Inkster | last post by:
Does anyone have any idea why this effect using script.aculo.us is working in Opera, but not Firefox? http://examples.tobyinkster.co.uk/Balloons2/Balloon%20tooltip.html (I've not had the courage to even try it in IE yet!) Any ideas for a fix? Thanks
1
3895
by: JOJO123 | last post by:
I got here in search of an answer to this Javascrpt question. I upgraded jave on XP Ie 7, acrobat 5.1 and suddenly can't open any pdf files on web sites using IE. I see u guys all say, this is a Javscript issue. but how do we, mere mortals who know nothing of anything about Java, scripts, etc, fix this? Is there a programm, does MS have any fix? is there any tweak like in the Registry, or whatever, how do I access anyihint java without in IE 7...
2
3085
by: willyWEB66 | last post by:
Hi everyone, I have this code in javascript where the XML file is loaded and displayed to an html using XSLT. It works fine in IE but not in Firefox. My problem is in the looping to the childNodes. It seems that Firefox does not recognize this line of code >> xmlDoc.getElementsByTagName("urlValue").childNodes.nodeValue I'm not sure if this is the line that is not working, or the lines before it. I'm looping to the childNodes to compare to...
4
6185
by: Quill_Patricia | last post by:
I have a Python script which is used to load data into a database. Up to now this script has been run by customers from the Windows command prompt using "python edg_loader.pyc". Any error messages generated are written to a log file. A project team working in the same company as me here would like to use this loading utility. They write UI applications for Windows using Java. They were able to launch the Python script from within Java by...
7
4274
by: labmonkey111 | last post by:
I'm having trouble with the following code: <SCRIPT> <!-- if (navigator.appName == 'Microsoft Internet Explorer') { document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"templates/94076/menu.css\" media=\"screen, print\" />"); document.write("<script src=\"templates/94076/menu.js\" language=\"javascript\" type=\"text/javascript\"></script>"); } else { document.write("<link rel=\"stylesheet\" type=\"text/css\"...
7
4032
by: mike57 | last post by:
The minimal AJAX script below works in Firefox, but not in IE, Opera, or Chrome. I could use some suggestions or referrals to resources that will help me get the script working in other browsers. Before there are six characters entered in the CAPTCHA code field, the 'Send' button is supposed to be disabled. When there are at least six characters in the CAPTCHA code field, the script attempts to verify the CAPTCHA w/AJAX. If it verifies, it...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8352
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7178
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6115
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1496
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.