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

Open New Window

1 Answer 67 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
simi
Top achievements
Rank 1
simi asked on 26 Oct 2009, 09:07 AM
I have a javascript for opening new window

function

 

NewWindow(mypage, myname, w, h, scroll) {

 

 

var winl = (screen.width - w) / 2;

 

 

var wint = (screen.height - h) / 2;

 

winprops =

'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'

 

win = window.open(mypage, myname, winprops);

win.focus();

}


in My code i am opening this in gridview item command(Not radgrid). I am using radjax manager .The window is not opening.
Code:

Dim

 

strScript As String

 

strScript =

"<script language=JavaScript"

 

strScript = strScript &

" >"

 

strScript = strScript &

"NewWindow('proposed_material_list_modify.aspx?prop_id=" & Request.QueryString("prop_id") & "&mtrl_id=" & sMtrlId & "&Root=" & Request.QueryString("Root") & "&GroupID=" & Request.QueryString("GroupID") & "&PIN=" & MaterialGrid.CurrentPageIndex & "&IMGS=" & CheckBox1.Checked & "','Add_Note','650','600','no'); "

 

strScript = strScript &

" <"

 

strScript = strScript &

"/" & "script> "

 

ClientScript.RegisterStartupScript(

Me.GetType, "Reject Note", strScript)

 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 26 Oct 2009, 10:36 AM
Hello Simi,

Please use ScriptManager's static methods instead:
ScriptManager.RegisterStartupScript(Page, GetType(Page), "myscript", strScript, False)

Kind regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Ajax
Asked by
simi
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or