Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.open in code behind via button click event

Status
Not open for further replies.

codecomm

Programmer
Feb 14, 2007
121
US
Hello!

I'm trying to use the following code in the Page_Load event of an ASP.NET page (v1.1), and I get a javascript syntax error:

Page.RegisterStartupScript("Window", "<script language=javascript>function AlertUpdate() {window.open('UpdateBudgetConfirm.aspx?UBID=" + strSAID + "','','width=500,height=320,left=200,top=200');})</script>")

btnYes.Attributes("onclick") = "AlertUpdate()
 
Perhaps you could post the client-side code instead of your asp.net code.

Also, load your page in firefox and check the error console - it should give you a more descriptive error message - and likely even point directly to the line and character that is screwing up. It's cool like that.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top