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.
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.