DHTML and RegisterStartupScript

Discussion in 'ASP .Net Building Controls' started by Kent Ogletree, Sep 23, 2005.

  1. I have some DHTML actions which work very well at a page level. However when
    I take everything and make a control it just falls apart.

    Everything comes down to my Init() function for the DHTML. When using the
    code within a page I call the Init() in the body tag onload. When I
    converted everything to a control I use Page.RegisterStartupScript() which
    places the code right before the </form> tag. However IE throws the error
    "Internet Explorer could not open the site http:..........Operation
    Aborted".

    However if I manually place the call to the Init function BELOW the form tag
    everything works just fine. Either way I do it it works just fine in
    Firefox.

    Manually the below code fails:
    <script >Tooltip.init()</script >
    </form >

    However this code works just fine:
    </form >
    <script >Tooltip.init()</script >

    Has anyone seen this issue before and have a solution or hints to what might
    be causing the issue. IE does not produce a debug message for this, rather
    it just aborts the page load.

    TIA,
    Kent
     
    Kent Ogletree, Sep 23, 2005
    #1
    1. Advertisements

  2. I had a similar issue...

    I divised a custom way to register javascripts (with literal control
    and a special page class).
     
    Tasos Vogiatzoglou, Sep 23, 2005
    #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.