473,396 Members | 2,013 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.

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 1213
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...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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
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.