Trying to use an IF statement to determine which tab was clicked, but I keep receiving a javaScript error, "Object cannot be converted to string"
With the IF commented out, the name of the tab displays perfectly. With the IF in play, the system exception pops. Tried every variation of .toString, String( ), passing tab.get_text() into another variable first, and nothing seems to work. Any suggestions?
Thanks,
- Brad
strPopUpScript = strPopUpScript & "function ClientTabSelected(sender, args) {" & vbCrLf |
strPopUpScript = strPopUpScript & " var tab = args.get_tab();" & vbCrLf |
strPopUpScript = strPopUpScript & "// if (tab.get_text() == 'New User') {" & vbCrLf |
strPopUpScript = strPopUpScript & "// var oWnd = $find(" & RadWindow1.ClientID & ");" & vbCrLf |
strPopUpScript = strPopUpScript & "// oWnd.setUrl('MyPage.aspx');" & vbCrLf |
strPopUpScript = strPopUpScript & "// oWnd.show();" & vbCrLf |
strPopUpScript = strPopUpScript & "// }" & vbCrLf |
strPopUpScript = strPopUpScript & " alert(tab.get_text());" & vbCrLf |
strPopUpScript = strPopUpScript & "}" & vbCrLf |
With the IF commented out, the name of the tab displays perfectly. With the IF in play, the system exception pops. Tried every variation of .toString, String( ), passing tab.get_text() into another variable first, and nothing seems to work. Any suggestions?
Thanks,
- Brad