473,396 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

In FireFox , the below code s not working

23
this code works well for the i.e but its not working in firefox . and also i want to do validations
only if theatre is selected , but, this is validating for the museum also .
Expand|Select|Wrap|Line Numbers
  1. code <html>
  2. <head>
  3. <script type="text/javascript">
  4. function check()
  5. {
  6.  if(document.fm.ra[0].checked == true && document.fm.ra[0].value == "Theatre")
  7.  {
  8.  fm.text1.style.display = "block";
  9.  fm.sel1.style.display = "block";
  10.  fm.sel2.style.display = "block";
  11.  
  12.   }
  13.   else if(document.fm.ra[1].checked == true && document.fm.ra[1].value == "Musuem")
  14.  {
  15.  fm.text1.style.display = "none";
  16.  fm.sel1.style.display = "none";
  17.  fm.sel2.style.display = "none";
  18.   }
  19. }
  20.  
  21. </script>
  22. </head>
  23. <body>
  24.  
  25. <form name="fm">
  26. <input type="radio" name="ra" value="Theatre" onclick="check();"/>Theatre
  27. <input type="radio" name="ra" value="Musuem" onclick="check();" />Musuem
  28. <br>
  29. <asp:RequiredFieldValidator visible="" ID="RequiredFieldValidator1"
  30.             runat="server" ErrorMessage="*" ControlToValidate="text1"></asp:RequiredFieldValidator><input type="text" id="text1" runat="server" name="text1" /><br>
  31. <select name="sel1">
  32.  <option value="test">1</option>
  33. </select><br>
  34. <select name="sel2">
  35.  <option value="test">2</option>
  36. </select>
  37. </form>
  38.  
  39. </body>
  40. </html>
  41.  
Feb 20 '09 #1
1 983
Plater
7,872 Expert 4TB
What exactly are you trying to do? hide and unhide? That's done with the Visibility style element, not display
Feb 20 '09 #2

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

Similar topics

9
by: DM | last post by:
I searched on this topic. Found others who mentioned it, but no solution. I can't seem to get visited links to appear in a different color in Mozilla or Firefox on the PC. It works fine in IE. My...
3
by: binnyva | last post by:
Hi everyone. I just made a JavaScript program to read a RSS feeds and display it in a HTML file. The script - Jasfer or JAvaScript FEed Reader - is available at...
87
by: expertware | last post by:
Dear friends, My name is Pamela, I know little about CSS, but I would like to ask a question I have an image on a web page within a css layer: <DIV ID=MyLayer STYLE = "position:...
14
by: expertware | last post by:
Ok! to avoid confusion I will start a new argument. Thanks!! FIREFOX 1.0.7 AND IE6 viewed through DATATIME: a summary REPORT ===============================================================...
5
by: Martin Chen | last post by:
I have a frame set (as per MS FrontPage 2000). It has a contents and a main frame. The contents frame has a menu bar written with with javascript (in the context of a table). In IE6.1 everything...
3
by: mcwd | last post by:
I'm trying to put a border around a link when the mouse rolls over it. I've made an example below and left out the hover to keep it simple. In IE the example below draws a box arround the image OK,...
12
by: tim | last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus in firefox. On my sub3 menus i have more than one line of text in some places. firefox does not recognise that there is more...
1
by: munnaj | last post by:
hai all, Help me with a style code for firefox. Below is the code which is working fine in IE. But does not work well in firefox. I have also tried with another class for firefox that too not...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
5
by: black143 | last post by:
Hi All, i am using this below addElement() function to create the file element dynamically function addElement( filename,businessName ){ // Make sure it's a file input element //if(...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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,...

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.