confirm('delete?') doesn't work on ie6 (windows xp)

S

Spongebob

Hello!

I tried to use this code from Peter Torr:

Foo.Attributes("onclick") = "if (confirm('delete?') == false) return
false; " + Foo.Attributes("onclick")

It works nomral on IE5, Windows 2000.
....Oh, but on IE6, Windows XP it seems to return always true (the
result is always "ok", record is always deleted, users can be upset
about that :~(...)

Huh... How to make it work?

Thanx :~)
 
T

Tullamore

In the onload event, try this:
button.Attributes.Add("OnClick","javascript:return confirm('Delete?');")

/Regars
Anders
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top