Using client-side javascript to handle events on an TabStrip or Multipage - Can it be done?

B

Blair Taylor

Can you use client-side javascript to handle events on an TabStrip or
Multipage?
I can process the events server-side, but cannot fire even the simplest
Javascript routine client-side.

I have tried using two different approaches:

1) Registering a client script

private void Page_Load(object sender, System.EventArgs e)
{

// Put user code to initialize the page here

Page.RegisterClientScriptBlock("DoThis",
this.BuildClientsideEventhandler());

TabStrip1.Attributes.Add("onselectedindexchange", "javascript:DoThis");

}

2) Providing a JavaScript function to handle the event:

<script language="javascript" event="onselectedindexchange"
for="MultiPage1">
function doThis() {
alert('hello');
}
</script>

Neither Works.

Can this be done? Does anyone have a working example?

Thanks,

Blair Taylor
 
A

Alvin Bruney

why don't you just place your code into the treeview/tabstrip.htc file in
your web-client folder. That's where the treeview/tabstrip etc derives it's
behavior
 

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,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top