open window, what am I missing

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2hyaXM=?=, Dec 15, 2004.

  1. I know this is a dead horse I'm beating but why is it so impossible to ask
    for functionality in the HTML tag to open a window/page more controllable?
    why is:
    <a href="somepage.aspx?value1=xyz" target="_blank">click here</a>
    can't be:
    <a href="somepage.aspx?value1=xyz" pagewidth="500px or %" page height="500px
    or %" target="_blank">click here</a>

    then what about in the code behind using:
    response.redirect("somepage.aspx?value1=xyz", "width=500", "height=500")

    to better control browser window opening, etc. Why is this asking for too
    much?

    I have a button that I add form the code behind the attributes.add function
    for a JavaScript 'window.showModalDialog' but I also need to add some more
    code (save data) before the opening of the new window. How can I do this once
    the button is click and the 'on_click' fires, the window is opened.

    using in code behind:
    btnxyz.Attributes.Add("onclick",
    "window.showModalDialog('page.aspx','dialogWidth:500px; scroll:no; help:0;
    resizable:no; center:yes; edge:sunken; status:no')")

    Can I turn on the AutoPostBack to "Submit" the form then will the
    "On_Click"fire?

    Sorry if so confusing. Thanx.
     
    =?Utf-8?B?Q2hyaXM=?=, Dec 15, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?Q2hyaXM=?=

    Rob T Guest

    I usually just do a quick javascript to open a window..something like this:

    response.write ("<script
    language=javascript>window.open('mypage.aspx?parm1=hello', '_blank',
    'height=250,width=500,titlebar=yes,top=75,left=125,scrollbars=no,status=no,resizable=yes');</script>")

    Most likelyit not the answer you want, but it works for most cases If you
    wanted to be picky, you could register the script instead of just
    response.write-ing it.

    "Chris" <> wrote in message
    news:...
    >I know this is a dead horse I'm beating but why is it so impossible to ask
    > for functionality in the HTML tag to open a window/page more controllable?
    > why is:
    > <a href="somepage.aspx?value1=xyz" target="_blank">click here</a>
    > can't be:
    > <a href="somepage.aspx?value1=xyz" pagewidth="500px or %" page
    > height="500px
    > or %" target="_blank">click here</a>
    >
    > then what about in the code behind using:
    > response.redirect("somepage.aspx?value1=xyz", "width=500", "height=500")
    >
    > to better control browser window opening, etc. Why is this asking for too
    > much?
    >
    > I have a button that I add form the code behind the attributes.add
    > function
    > for a JavaScript 'window.showModalDialog' but I also need to add some more
    > code (save data) before the opening of the new window. How can I do this
    > once
    > the button is click and the 'on_click' fires, the window is opened.
    >
    > using in code behind:
    > btnxyz.Attributes.Add("onclick",
    > "window.showModalDialog('page.aspx','dialogWidth:500px; scroll:no; help:0;
    > resizable:no; center:yes; edge:sunken; status:no')")
    >
    > Can I turn on the AutoPostBack to "Submit" the form then will the
    > "On_Click"fire?
    >
    > Sorry if so confusing. Thanx.
    >
     
    Rob T, Dec 15, 2004
    #2
    1. Advertising

  3. Thanx, I'm using that now but was hoping someday to get more control
    programmically over the opening process. Not to mention the growing "pop-up"
    disable issues and the new standards for making pop-ups less accepted and
    allowed.
    I also need to make some data base calls and saves prior to the button's
    open method. That I'm still playing around with and need help on.

    "Rob T" wrote:

    > I usually just do a quick javascript to open a window..something like this:
    >
    > response.write ("<script
    > language=javascript>window.open('mypage.aspx?parm1=hello', '_blank',
    > 'height=250,width=500,titlebar=yes,top=75,left=125,scrollbars=no,status=no,resizable=yes');</script>")
    >
    > Most likelyit not the answer you want, but it works for most cases If you
    > wanted to be picky, you could register the script instead of just
    > response.write-ing it.
    >
    > "Chris" <> wrote in message
    > news:...
    > >I know this is a dead horse I'm beating but why is it so impossible to ask
    > > for functionality in the HTML tag to open a window/page more controllable?
    > > why is:
    > > <a href="somepage.aspx?value1=xyz" target="_blank">click here</a>
    > > can't be:
    > > <a href="somepage.aspx?value1=xyz" pagewidth="500px or %" page
    > > height="500px
    > > or %" target="_blank">click here</a>
    > >
    > > then what about in the code behind using:
    > > response.redirect("somepage.aspx?value1=xyz", "width=500", "height=500")
    > >
    > > to better control browser window opening, etc. Why is this asking for too
    > > much?
    > >
    > > I have a button that I add form the code behind the attributes.add
    > > function
    > > for a JavaScript 'window.showModalDialog' but I also need to add some more
    > > code (save data) before the opening of the new window. How can I do this
    > > once
    > > the button is click and the 'on_click' fires, the window is opened.
    > >
    > > using in code behind:
    > > btnxyz.Attributes.Add("onclick",
    > > "window.showModalDialog('page.aspx','dialogWidth:500px; scroll:no; help:0;
    > > resizable:no; center:yes; edge:sunken; status:no')")
    > >
    > > Can I turn on the AutoPostBack to "Submit" the form then will the
    > > "On_Click"fire?
    > >
    > > Sorry if so confusing. Thanx.
    > >

    >
    >
    >
     
    =?Utf-8?B?Q2hyaXM=?=, Dec 15, 2004
    #3
    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. ml
    Replies:
    0
    Views:
    1,491
  2. ml
    Replies:
    2
    Views:
    4,898
    John C. Bollinger
    Nov 30, 2004
  3. Gary Herron
    Replies:
    2
    Views:
    698
    Bruno Desthuilliers
    Jul 4, 2006
  4. PC HUA
    Replies:
    2
    Views:
    469
    PC HUA
    May 19, 2004
  5. Replies:
    2
    Views:
    144
    GĂ©rard Talbot
    May 20, 2006
Loading...

Share This Page