This is a migrated thread and some comments may be shown as answers.

Using onitemclick and OnClientItemClicked together

1 Answer 64 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Fred Parcells
Top achievements
Rank 1
Fred Parcells asked on 31 Aug 2010, 05:33 PM

RadRotator Using onitemclick and OnClientItemClicked together
I check for condition and get an alert box with OnClientItemClicked, then do postback with onitemclick. Works fine in IE7. In Firefox3 I get  __doPostBack is not defined. What is the work around for Firefox?
Thanks
Fred

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 01 Sep 2010, 01:42 PM
Hello,


You could use the 'OnClientItemClicking' event to check the condition and if the condition fails, cancel the event using args.set_cancel(true) method, instead of invoking postback explicitly.

function OnClientItemClicking(sender, args) {
    // Check for condition
    args.set_cancel(true);  // Cancel the event
 
}


-Shinu.
Tags
Rotator
Asked by
Fred Parcells
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or