This function works fine in all mozilla based browsers, but in IE6
the confirm shows up, but it doesn't change location, is there a way to
tweak this for IE and Mozilla use?
Thanks,
- NN
<code>
I am using this function:
function delWarn(name,table,col_id,id,conf_id) {
var myArray = [table, col_id, id, conf_id];
var msg = "Do you really want to delete record " + name + " ? ";
if (confirm(msg))
location.replace("$page?bk=cust&view=del&data=" + myArray);
}
Here is the php generated link I am using: ( my email client wraps it )
<a href=\"javascript:;\" onclick=\"delWarn('This
Record','$table','$del_col_name','$row_id','$id'); \">Delete</a> 2 1213
norfernuman said: This function works fine in all mozilla based browsers, but in IE6 the confirm shows up, but it doesn't change location, is there a way to tweak this for IE and Mozilla use?
Thanks, - NN
<code> I am using this function:
function delWarn(name,table,col_id,id,conf_id) { var myArray = [table, col_id, id, conf_id]; var msg = "Do you really want to delete record " + name + " ? ";
if (confirm(msg)) location.replace("$page?bk=cust&view=del&data=" + myArray); }
Here is the php generated link I am using: ( my email client wraps it )
<a href=\"javascript:;\" onclick=\"delWarn('This Record','$table','$del_col_name','$row_id','$id') ;\">Delete</a>
1. You shouldn't use the "javascript :" protocol like that.
2. If you don't want a link to be followed, you should have the
onclick event handler return false.
3. Much simpler (subject to typos):
<a href=\"$page?bk=cust&view=del&data=$table,$del_col _name,$row_id\"
onclick=\"return confirm('Do you really want to delete This
Record?')\">Delete</a>
Lee wrote: 1. You shouldn't use the "javascript:" protocol like that. 2. If you don't want a link to be followed, you should have the onclick event handler return false. 3. Much simpler (subject to typos):
<a href=\"$page?bk=cust&view=del&data=$table,$del_col _name,$row_id\" onclick=\"return confirm('Do you really want to delete This Record?')\">Delete</a>
Thank you very much!
This works great.
- NN This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Logger |
last post by:
Help, I’m trying to implement a confirm button on an asp.net page. I have it
attached to a asp:button control. In the button1 click event I call the
CreateConfirmBox subroutine. The Box comes...
|
by: LRW |
last post by:
Having a problem getting a onSubmit function to work, to where it popsup a
confirmation depending on which radiobutton is selected.
Here's what I have:
function checkdel() {
if...
|
by: Joe Finsterwald |
last post by:
Recently I needed to add a confirm to a LinkButton that called a
JavaScript function on success, and did nothing on failure. I found
documentation on adding a confirm, but not on how to place a...
|
by: Chris |
last post by:
I can create Javascript confirm message boxes during page creation, etc
adding them to the button attributes (many good posts on this!). But how can
I add this event after the button is pressed?
I...
|
by: freshRecruit |
last post by:
Hi,
I am having a problem, and is driving me nuts and my deadline is fast
approaching. Please do help me..
This is a webapplication with a usercontrol which has some buttons for
adding,...
|
by: chris |
last post by:
Hi,
In ASP.NET page, when my user tries to edit a record in gridview, I
need to display a confirmation message, if another user is editing the
same record. Since the confirmation message will...
|
by: tfsmag |
last post by:
Okay, I have a project management app i'm writing and in the left hand
menu i have a treeview control that is populated with each project...
in child nodes under each project node I have an "edit"...
|
by: rn5a |
last post by:
I have gone through a no. of posts in this NewsGroup regarding my
problem but alas, couldn't come across one which would have helped me
in resolving the issue. My problem is this:
An ASPX Form...
|
by: strikefiend |
last post by:
Ok, I'm somewhat new to .NET C# language and am having a bit of trouble.
I'm trying to run the javascript confirm() method from my ascx page but I'm currently using C# as the main language of the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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,...
|
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...
|
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,...
| | |