Urgent : Running client script from a toolbar button

J

John

Hi all,

I have posted this previously but have had no satisfactory results.

I need to run some javascript from the client when a toolbar button (i.e.
IEWebControl toolbar button) is clicked. I create the buttons on-the-fly and
my code is as follows:


Dim override As New Microsoft.Web.UI.WebControls.ToolbarButton
override.Text = "<span onclick=""javascript:alert('test'); return
false;""></span>"
override.ID = "override"
override.ImageUrl = "override.jpg"
override.ToolTip = "ovverride"
toolClaim.Items.Add(override)


What is interesting is that the script will run if I insert some text
between the span tags but I don't want to do this at all.

What do I need to do to get this working?

Regards
John.
 
B

bruce barker

the span needs to be of some size to be able to click on it.

-- bruce (sqlwork.com)
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top