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

Confirm, array in IE

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>
Jul 23 '05 #1
2 1210
Lee
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>

Jul 23 '05 #2
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
Jul 23 '05 #3

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

Similar topics

5
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...
13
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...
0
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...
13
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...
1
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,...
1
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...
4
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"...
8
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...
5
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.