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

Discussion in 'ASP .Net Web Controls' started by Blair Taylor, Aug 6, 2003.

  1. Blair Taylor

    Blair Taylor Guest

    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
     
    Blair Taylor, Aug 6, 2003
    #1
    1. Advertising

  2. Blair Taylor

    Alvin Bruney Guest

    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
    "Blair Taylor" <> wrote in message
    news:...
    > 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
    >
    >
    >
     
    Alvin Bruney, Aug 7, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. konox
    Replies:
    0
    Views:
    415
    konox
    Oct 31, 2005
  2. sm

    tabstrip client-side events

    sm, Oct 1, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    123
  3. Arulraja

    IE TabStrip Controls Client side events?

    Arulraja, Oct 23, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    216
    Arulraja
    Oct 23, 2003
  4. David

    How can i use tabstrip without using multipage?

    David, Jun 9, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    231
    David
    Jun 9, 2004
  5. Aaron
    Replies:
    3
    Views:
    236
    cfarahiii
    Jan 27, 2005
Loading...

Share This Page