Results 1 to 2 of 2

Thread: [RESOLVED] window.open question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    180

    Resolved [RESOLVED] window.open question

    I have this code behind an asp.net button click event

    Code:
    Response.Write("<script language=""javascript"">" + "window.open('taxcalc.aspx?id=" + matrixID + "&mileage=" + ddlMileage.SelectedValue + "&opts=" + opts.ToString + "','product','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizeable=0,width=250,height=500');" + "</script>")
    The window opens fine except that the layout of the parent page messes up, it jumps to the left side of the page and a lot of the css doesn't render properly.

    Is there a better way of doing it to prevent this happening?

    Thanks

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    180

    Re: window.open question

    Found the solution, in the button click event I used

    Page.RegisterStartupScript("calc",MyScript)

    Works fine now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width