asp button on popup is opening new browser window...?

Discussion in 'ASP .Net Web Controls' started by Tim Reynolds, Nov 9, 2004.

  1. Tim Reynolds

    Tim Reynolds Guest

    I am new to ASP & javascript so my hunch is I have set this up wrong but
    can't determine where. On one popup screen, I popup another using this java
    code:
    var win = window.showModalDialog(url, "Testing Modal Dialog",
    'dialogHeight:300px;dialogwidth:658px;resizable=no;help:no;edge:raised;status:no;scroll:yes;center:yes');
    On this new popup, i have an ASP button runat=server. I have an event
    handler set up to handle a click on this button. However, when this button
    is clicked, it seems an init (or oninit) event is fired, becuase immedidately
    (before it even gets to my code behind for the click, it opens a new browser
    sesssion using the URL of my current popup. SO I have my popup with the data
    and the new browser session open with the same data. After it goes through
    the OnInit(EventArgs e) method and the page_load, it then executes my code
    behind.

    What am I missing here? I don't want my click on this ASP server button to
    open a new browser but somehow some event is fired that does this. I even
    removed my code behind and also walked thru in debug. The new instance of
    the browser is opened on my desktop before the code even gets to teh OnInit
    method - which is before the page_load. Why does clicking on an ASP button
    on a popup cause an event to fire that instansiates a browser window? How
    can I avoid this so when I click it only does what I code in the code behind?
    Help needed.

    Thanks,
    Tim Reynolds
    Verizon
     
    Tim Reynolds, Nov 9, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mike
    Replies:
    0
    Views:
    684
  2. =?Utf-8?B?Tm92aWNl?=
    Replies:
    2
    Views:
    6,663
    Alan Ferrandiz Langley
    Jun 9, 2004
  3. UJ
    Replies:
    2
    Views:
    7,518
    John Timney \(ASP.NET MVP\)
    Jun 27, 2005
  4. Jens Peter Hansen
    Replies:
    7
    Views:
    543
    Randy Webb
    Jun 19, 2004
  5. Raffi
    Replies:
    4
    Views:
    229
    Dr John Stockton
    Aug 12, 2004
Loading...

Share This Page