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

RadAjaxPanel1.ResponseScripts.Add(script))

2 Answers 227 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Frans Delport
Top achievements
Rank 1
Frans Delport asked on 10 Mar 2009, 06:29 AM
I have problem here with the Rad Ajax panel.

I get the javascript error stating : "Object doesn't support this property or method" and another one "unifined is null or not an object"
Here's my code:

'VB code
Try
            'some code here

        Catch ex As Exception
            'open radwindow and inform user to select a project first
            Session.Remove("Project_ID")
            Dim script As String = ""
            script += "radconfirm('Please select a project first. Select project now?',confirmCallBackFn,  330, 100,'','No project selected'); "
            RadAjaxPanel1.ResponseScripts.Add(script)
        End Try

'Java script
         function confirmCallBackFn(arg) 
         {
             var Redirect = document.getElementById("<%= HiddenField1.ClientID %>");
             Redirect.value = arg;
             document.forms(0).submit();
         }
         function redir(Project_ID)
          {
             window.radopen("AIMS_frmBlock_Tasks.aspx?Project_ID=" + Project_ID, "RadWindow1");
             return false;
         }         
      
      </script>

My code looks for an Session_ID, if it doesn't find it, it pops up a Radwindow that ask to select an ID, then it redirects to the page accordingly
It has worked with prev. version of telerik, but now that I've installed prome..it gave me this error.
This initiate when the page loads,so I have no button that init. the request

2 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 11 Mar 2009, 11:26 AM
Hi Frans,

Try modifying your code as below and see is it makes any difference:

       Catch ex As Exception  
            'open radwindow and inform user to select a project first  
            Session.Remove("Project_ID")  
            Dim script As String = "" 
            script += "radconfirm('Please select a project first. Select project now?',confirmCallBackFn,  330, 100,'','No project selected'); " 
            ScriptManager.RegisterStartupScript(Page, GetType(Page), "script", script, True)              
        End Try 
 


Sincerely yours,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Frans Delport
Top achievements
Rank 1
answered on 11 Mar 2009, 11:46 AM
I've tried the code but, the same happens.
But thanx for tryin.
I've tried everything and it's 4 days since,but with no success

Tags
Ajax
Asked by
Frans Delport
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Frans Delport
Top achievements
Rank 1
Share this question
or