Modal Dialog Popup from WebControl - What is wrong with this...

Discussion in 'ASP .Net Datagrid Control' started by Bob Lehmann, Jul 23, 2003.

  1. Bob Lehmann

    Bob Lehmann Guest

    http://www.aspfaq.com/show.asp?id=2257


    "Jim Mitchell" <> wrote in message
    news:...
    > I saw several posts asking for popups from web controls. The standard
    > answer is that once rendered, the server no longer has control. I had

    some
    > success with the following and I was curious if I have broken any rules.
    >
    > Add this line to the load_page event....
    >
    > Response.Write("<script language=javascript>function CallSub(passed_value)
    > {temp=showModalDialog('http://www.cnn.com?PVAL' +

    passed_value)}</script>")
    >
    > In your datagrid, set the following fields for a linkbutton......
    >
    > URL: javascript:CallSub()
    > URL FIELD: ID ...... id is the record id
    > URL FORMAT STRING: javascript:CallSub({0})
    >
    > The result seems to be a server side control that calls a popup. The

    popup
    > could call an HTTPPOST to write data to the database before closing the
    > window.
    >
    > Any reason why this should not or would not work? So far it seems to work
    > for me.
    >
    >
     
    Bob Lehmann, Jul 23, 2003
    #1
    1. Advertising

  2. "Jim Mitchell" <> wrote in
    news::

    > I saw several posts asking for popups from web controls. The standard
    > answer is that once rendered, the server no longer has control. I had
    > some success with the following and I was curious if I have broken any
    > rules.
    >
    > Add this line to the load_page event....
    >
    > Response.Write("<script language=javascript>function
    > CallSub(passed_value) {temp=showModalDialog('http://www.cnn.com?PVAL'
    > + passed_value)}</script>")
    >
    > In your datagrid, set the following fields for a linkbutton......
    >
    > URL: javascript:CallSub()
    > URL FIELD: ID ...... id is the record
    > id URL FORMAT STRING: javascript:CallSub({0})
    >
    > The result seems to be a server side control that calls a popup. The
    > popup could call an HTTPPOST to write data to the database before
    > closing the window.
    >
    > Any reason why this should not or would not work? So far it seems to
    > work for me.
    >
    >


    Before posting, please fix your computers date. It's not really August 22
    there is it?



    --
    If you don't like lunchmeat, please remove it from my e-mail address to
    send me an e-mail
     
    Chris Dunaway, Jul 31, 2003
    #2
    1. Advertising

  3. Bob Lehmann

    Scott M. Guest

    People who set their date to a future date so that their message will stay
    at the top of the thread should have to find their own answers.

    "Jim Mitchell" <> wrote in message
    news:...
    > I saw several posts asking for popups from web controls. The standard
    > answer is that once rendered, the server no longer has control. I had

    some
    > success with the following and I was curious if I have broken any rules.
    >
    > Add this line to the load_page event....
    >
    > Response.Write("<script language=javascript>function CallSub(passed_value)
    > {temp=showModalDialog('http://www.cnn.com?PVAL' +

    passed_value)}</script>")
    >
    > In your datagrid, set the following fields for a linkbutton......
    >
    > URL: javascript:CallSub()
    > URL FIELD: ID ...... id is the record id
    > URL FORMAT STRING: javascript:CallSub({0})
    >
    > The result seems to be a server side control that calls a popup. The

    popup
    > could call an HTTPPOST to write data to the database before closing the
    > window.
    >
    > Any reason why this should not or would not work? So far it seems to work
    > for me.
    >
    >
     
    Scott M., Aug 1, 2003
    #3
  4. Bob Lehmann

    Jim Mitchell Guest

    I too often use my date and time as a calendar and then just click OK at the
    end of the day. Sorry. You would think Microsoft could purge the
    newsgroup?


    "Scott M." <> wrote in message
    news:...
    > People who set their date to a future date so that their message will stay
    > at the top of the thread should have to find their own answers.
    >
    > "Jim Mitchell" <> wrote in message
    > news:...
    > > I saw several posts asking for popups from web controls. The standard
    > > answer is that once rendered, the server no longer has control. I had

    > some
    > > success with the following and I was curious if I have broken any rules.
    > >
    > > Add this line to the load_page event....
    > >
    > > Response.Write("<script language=javascript>function

    CallSub(passed_value)
    > > {temp=showModalDialog('http://www.cnn.com?PVAL' +

    > passed_value)}</script>")
    > >
    > > In your datagrid, set the following fields for a linkbutton......
    > >
    > > URL: javascript:CallSub()
    > > URL FIELD: ID ...... id is the record id
    > > URL FORMAT STRING: javascript:CallSub({0})
    > >
    > > The result seems to be a server side control that calls a popup. The

    > popup
    > > could call an HTTPPOST to write data to the database before closing the
    > > window.
    > >
    > > Any reason why this should not or would not work? So far it seems to

    work
    > > for me.
    > >
    > >

    >
    >
     
    Jim Mitchell, Aug 2, 2003
    #4
  5. Bob Lehmann

    Jim Mitchell Guest

    I saw several posts asking for popups from web controls. The standard
    answer is that once rendered, the server no longer has control. I had some
    success with the following and I was curious if I have broken any rules.

    Add this line to the load_page event....

    Response.Write("<script language=javascript>function CallSub(passed_value)
    {temp=showModalDialog('http://www.cnn.com?PVAL' + passed_value)}</script>")

    In your datagrid, set the following fields for a linkbutton......

    URL: javascript:CallSub()
    URL FIELD: ID ...... id is the record id
    URL FORMAT STRING: javascript:CallSub({0})

    The result seems to be a server side control that calls a popup. The popup
    could call an HTTPPOST to write data to the database before closing the
    window.

    Any reason why this should not or would not work? So far it seems to work
    for me.
     
    Jim Mitchell, Aug 23, 2003
    #5
    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. Leila
    Replies:
    0
    Views:
    433
    Leila
    Apr 26, 2005
  2. Orit
    Replies:
    1
    Views:
    601
    bruce barker
    Sep 11, 2007
  3. Mike Hofer

    AJAX: Closing a modal popup dialog

    Mike Hofer, Jul 31, 2008, in forum: ASP .Net
    Replies:
    3
    Views:
    820
    bruce barker
    Aug 1, 2008
  4. Rajesh
    Replies:
    0
    Views:
    611
    Rajesh
    Jul 31, 2007
  5. Jens Peter Hansen
    Replies:
    7
    Views:
    577
    Randy Webb
    Jun 19, 2004
Loading...

Share This Page