473,383 Members | 1,829 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,383 software developers and data experts.

Code works in IE but not Netscape/Mozilla

Hello,

I'm writing a form where it puts a red asterisk next to required
fields, and depending on a few Yes/No questions, the asterisks will
change. This works great in IE but not in Netscape or Mozilla. Can
someone give me pointers on what's going wrong? Below is a sample of
the code for one entry.

I stripped out all the formatting and unneeded code since the form
this is from is over 1200 lines.

Thanks for any suggestions.

Keegan.

....snip...

<script type="text/javascript">
function employedY() {
document.getElementById("EmpAsterisk1").style.visi bility =
"visible";
}
function EmployedN() {
document.getElementById("EmpAsterisk1").style.visi bility = "hidden";
}
</script>

....snip...

Are you employed?
<INPUT TYPE="RADIO" NAME="EmployedYesNo" VALUE="Yes"
onclick="employedY()"> Yes
<INPUT TYPE="RADIO" NAME="EmployedYesNo" VALUE="No"
onclick="EmployedN()" checked> No

<span id="EmpAsterisk1" style="visibility:hidden;"><font size="4"
color="#FF0000#"><b>*</b></font></span>
Employer:<INPUT TYPE="TEXT" NAME="Employer">

....snip...
Jul 20 '05 #1
1 2430

"Keegan Alex" <ke********@yahoo.com> wrote in message
news:d8**************************@posting.google.c om...
Hello,

I'm writing a form where it puts a red asterisk next to required
fields, and depending on a few Yes/No questions, the asterisks will
change. This works great in IE but not in Netscape or Mozilla. Can
someone give me pointers on what's going wrong? Below is a sample of
the code for one entry.
.....
<span id="EmpAsterisk1" style="visibility:hidden;"><font size="4"
color="#FF0000#"><b>*</b></font></span>
Employer:<INPUT TYPE="TEXT" NAME="Employer">


No problems on my system, but you shouldn't mix font and b tags with css.
Just do:

<span id="EmpAsterisk1"

style="visibility:hidden;font-size:12px;color:#ff0000;font-weight:bold">*</s
pan>

Or better yet:

<style type="text/css">
#EmpAsterisk1 {
visibility:hidden;font-size:12px;color:#ff0000;font-weight:bold }
</style>
.....
<span id="EmpAsterisk1">*</span>
JW

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sims | last post by:
Hi, if i use... // php $info = getenv("HTTP_USER_AGENT"); // I noticed that Mozzila and Netscape <6(?) both use the same Agent. // so i was thinking of if...
2
by: Todd Beauchemin | last post by:
Is there any documentation or reference for the Mozilla web browsers. Some of my older Netscape code doesnt work and the IE code still doesnt work :(. Thanks ~Todd
2
by: esrkq | last post by:
Hi, I am looking at a way to return IP related information of a visitor loading a web page and found the following snippet of code: if(navigator.javaEnabled() && (navigator.appName !=...
4
by: owen | last post by:
For some reason pop up windows are no longer working on my pc. And no, I dont have any popup killer installed. The problem is across all websites I look at on my browser. Is there any...
9
by: rez | last post by:
I find it rather frustrating that Netscape 4.x is "no longer supported:" http://help.netscape.com/products/client/communicator/reflib.html Same seems true with IE. How am I ever supposed to...
11
by: Shawn Milo | last post by:
I put this together yesterday, and I thought I'd share it. It works in both IE and Mozilla Firefox. I posted something similar to this months back, but it was much longer, and only worked in IE....
5
by: D E | last post by:
Here is the problem. The following script/html code works in IE, not Netscape. The javascript portion produces the text to be dynamically written in the <A HREF="">HEREHEREHERE</A> portion... The...
4
by: lawrence | last post by:
Can anyone tell me why this code works in Netscape 7.1 but not in IE??? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) {...
3
by: Lachlan Hunt | last post by:
Hi, I've been looking up lots of documentation and trying to work out a cross-platform method of capturing a keyboard event and working out which key was pressed. From what I can find, there...
7
by: David Laub | last post by:
I have stumbled across various Netscape issues, none of which appear to be solvable by tweaking the clientTarget or targetSchema properties. At this point, I'm not even interested in "solving"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.