Error in Smart Navigation + Javascript

Discussion in 'Microsoft ASP .NET' started by Priya, Dec 2, 2003.

  1. Priya

    Priya Guest

    I have enabled smart navigation for my ASP.Net web application.
    It works fine except for some of my pages where I'm using some Javascript
    code to open a page in a new window on a button click.
    Here is a sample Javascript code which I'm using

    Response.Write("<script language='javascript'>")
    Response.Write("window.open('POREP01.aspx')")
    Response.Write("</script")
    Response.Write(">")

    The error message which I'm getting is
    'htmlfile:Invalid pointer'

    A page http://localhost/aspnet_client/system_web/1_0_3705_352/SmartNav.js is
    opened in debug mode in Visual Studio.Net,

    and it breaks at the line

    hdm.appendChild(k);

    Is this a bug?

    Regards,
    Priya
     
    Priya, Dec 2, 2003
    #1
    1. Advertisements

  2. Priya

    Joe Gass Guest

    How about using RegisterStartupScript instead?

    RegisterStartupScript("Startup", "<script
    language='javascript'>window.open('POREP01.aspx')</script>")
     
    Joe Gass, Dec 2, 2003
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.