473,396 Members | 1,849 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.

Confirmation not working in firefox

2
I have a number of text boxes on my page, on form submission I check whether the user has left filling any one of them, if he does he will be prompted through a 'confirm' dialog. if he opts for cancel the focus will move to the empty text box and the submit btn functionality is disabled.

Things seem to work in IE but not in Firfox (I am using v 2.0.0.3).

Here is my chunk of javascript func which does it:



Expand|Select|Wrap|Line Numbers
  1. function chkMessage()
  2.                 {
  3.  
  4.                     var ctlnames= document.getElementById("hdnMsg");
  5.                     var ctlTextBoxes = ctlnames.value.split(",");
  6.                     if (ctlTextBoxes.length > 0)
  7.                     {
  8.                       for(var i=0; i<ctlTextBoxes.length-1; i++)
  9.                       {
  10.                             var txtMsg=    document.getElementById(ctlTextBoxes[i]);  
  11.                             if (txtMsg.value == '' || txtMsg.value.substr(0, 27) == 'Enter your personal message' )
  12.                                 if(!confirm("Do you want to continue without entering a personal message?"))
  13.                                 {
  14.                                     var obj =document.getElementById("cmdCheckOut");
  15.                                     obj.disabled=true;
  16.                                     txtMsg.focus();
  17.                                     return false;
  18.                                 }
  19.                                 else
  20.                                     return true;
  21.                       }
  22.                     }
  23.                   }
  24.  
is it the disabled property which is not working in fire fox or what?

here is where i call it

Expand|Select|Wrap|Line Numbers
  1. <asp:ImageButton ID="cmdCheckout" Runat="server"  CausesValidation="False" OnClientClick="return chkMessage();"></asp:ImageButton>
Apr 27 '07 #1
1 1993
acoder
16,027 Expert Mod 8TB
The thing to check would be the textbox IDs. Do they match with the strings taken from the hidden input?
Jun 7 '08 #2

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

Similar topics

9
by: ScooterMX | last post by:
I have a <a href="javascript:top.window.close()"><img src="exit.gif"></a> tag on my page that closes itself when you click on it. What I NEED is for it to put up a confirmation message that...
3
by: Dennis Allen | last post by:
Hi. On my online ordering form I use browser cookies to keep track of user items. My confirmation page reads: "If any of this information is incorrect, please go back to the order form and...
0
by: Nedu N | last post by:
Hi Experts, All of sudden the delete confirmation is not working for me on my datagrid (it was working 2 days ago..couldn't figure out the cause). I am trying to add an 'onsubmit' attribute to...
7
by: Andy | last post by:
I have been struggling with this for a while, and have seen lots of related postings, but nothing (as far as I can see) that answers this directly. Im using vb dotnet and have an aspx that has a...
3
by: vcornjamb | last post by:
Hello, I am developing a web form that contains some buttons and a data grid which has as its last column link buttons that will delete the data associated with that row. Everything works fine,...
4
by: DrData | last post by:
I'm working on an ASP.Net application written in C#. On one page, there are several datagrid controls used to display, edit and delete detail records relating to the master record also displayed on...
5
by: Martijn Saly | last post by:
I'd like to test in my script, if it's going to be possible to enable priviliges. If I use this... netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect") ....it presents a...
5
by: Tomislav | last post by:
Hello, I tried to use "javascript:return confirm();" function in following manner ( triggered by form onSubmit event ): ** <form method="post" action="mail.php" onSubmit="javascript:return...
2
by: DL | last post by:
Do you know how? I hope it's possible. I tried it with "...\firefox.exe" -p "my profile a" from command line, it asked me for confirmation, which is unnecessary. Also, the -height and -width...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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
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
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,...

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.