473,399 Members | 3,832 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,399 software developers and data experts.

Script works in Firefox but not IE

Hello,

This is a first time post for me.

Have this HTML form being validated by a javascript. I am having a
problem with the line "document.ACLinfo.BUmanager.value=manager;" .
When in Firefox this line executes correctly , the BUmanager field is
updated and the information is passed to the cgi script. When in IE it
appears not to execute properly, the resulting cgi script still
contains the default value and was not overwritten with the value
entered by the user.

Please if anyone can shed some light on this matter.

Thanks

<HTML>
<head<titleHTML Form for the Network Software Group </title>
<script type="text/javascript">
function Validate()
{

if(document.ACLinfo.choice.value=="2")
{
var manager=prompt("Please enter the managers name of the business
unit requesting the change","")
if(name!=null && name!="")
{
document.ACLinfo.BUmanager.value=manager;
}
}
}
</script>
</head>
<BODY>
<FORM METHOD="POST" NAME="ACLinfo" ACTION="XXXXXXXXXXXXX.cgi"
onSubmit="return Validate();">
<hr style="WIDTH: 550px" align="center">
</P>
<TABLE>
..............

<INPUT TYPE="HIDDEN" NAME="BUmanager" VALUE="Default">
................

Feb 21 '07 #1
1 1501
On Feb 22, 7:51 am, "Rollie72" <rolandgl...@shaw.cawrote:
Hello,

This is a first time post for me.

Have this HTML form being validated by a javascript. I am having a
problem with the line "document.ACLinfo.BUmanager.value=manager;" .
When in Firefox this line executes correctly , the BUmanager field is
updated and the information is passed to the cgi script. When in IE it
appears not to execute properly, the resulting cgi script still
contains the default value and was not overwritten with the value
entered by the user.

Please if anyone can shed some light on this matter.

Thanks

<HTML>
<head<titleHTML Form for the Network Software Group </title>
<script type="text/javascript">
function Validate()
It is a convention that a function name starting with a capital letter
indicates a constructor.

{

if(document.ACLinfo.choice.value=="2")
{
var manager=prompt("Please enter the managers name of the business
unit requesting the change","")
if(name!=null && name!="")
Where does the value for name come from? Do you mean:

if (manager != null && manager != "")
{
document.ACLinfo.BUmanager.value=manager;
}
}}

</script>
</head>
<BODY>
<FORM METHOD="POST" NAME="ACLinfo" ACTION="XXXXXXXXXXXXX.cgi"
onSubmit="return Validate();">
You can make life easier if you pass a reference to the form from the
submit handler:

... onsubmit="return Validate(this);" ...

Then in the function:

function Validate(form) {
if (form.choice.value == "2")
...
form.BUmanager.value = manager;
...
}
--
Rob

Feb 22 '07 #2

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

Similar topics

23
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>...
3
by: niconedz | last post by:
Hi The following code works fine in IE but not Firefox. It's a little script that zooms an image and resizes the window to fit. Can anybody tell me what's wrong? Thanks Nico == btw.....
17
by: CES | last post by:
All, I was wondering if their is a way of loading an external script fill from within a script?? <script language="javascript" type="text/javascript"> function test(var){ <script...
4
by: petermichaux | last post by:
Hi, I'm hoping for a reason I'm wrong or an alternate solution... I'd like to be able to dynamically include some javascript files. This is like scriptaculous.js library but their solution is...
2
by: ranger7419 | last post by:
I'm trying to figure out why this script will work in IE 6 but not Firefox, and so I need someone here with a far better grasp on javascript to explain this. Basically, I have a page with several...
15
by: Lennart | last post by:
Hi folks, I have created an animated image gallery in dhtml. It works fine in Internet Explorer. In Firefox, it only works if I ommit the DOCTYPE tag. The page is valid xhtml-strict but with a...
4
by: aramsey | last post by:
I have a javascript program that works fine under Firefox and on IE when running XP, but is having a problem with IE running under Windows 2000 Pro. On my personal XP development machine I have...
1
by: tinnews | last post by:
I'm running a python script via the apache ExtFilterDefine directive, it works basically as expected *except* that when I change the script apache/firefox continue to run the old version of the...
2
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...
7
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. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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
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
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...
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,...
0
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...

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.