pop-ups

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ces
    New Member
    • Sep 2007
    • 2

    pop-ups

    hi everyone, i'm a noobie in .net and i'm workin' on a project right now. i just graduated from my degree and just started working...

    well here it is, how are you going to do this?

    picture this out, i have a page (aspx) wherein there are buttons and multiline textboxes or textareas, now, when i click on a button, i call the onclick event to put up a javascript popup to bring out another page associated with the calling page..

    i used this code: window.open or popitup

    this.btnPatient Image.Attribute s.Add("onclick" , String.Format(" javascript:wind ow.open('NewPIM G.aspx?PatientI d={0}'); return false;", patientId));

    on the pop up, i have to retrieve the values of the fields and return it to the page who called it with captions on from what page did it come from.. how will i do that?


    i also tried using redirection instead of pop-ups, i managed to throw the fields i need to the querystring successfully but the problem is the fields i typed in the parent page somehow loses the data... shush...


    please help. i'd really appreciate it.. thank you
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    I would say trying to use the Session object, but you would need to force a refresh of your calling page I think

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Originally posted by ces
      hi everyone, i'm a noobie in .net and i'm workin' on a project right now. i just graduated from my degree and just started working...

      well here it is, how are you going to do this?

      picture this out, i have a page (aspx) wherein there are buttons and multiline textboxes or textareas, now, when i click on a button, i call the onclick event to put up a javascript popup to bring out another page associated with the calling page..

      i used this code: window.open or popitup

      this.btnPatient Image.Attribute s.Add("onclick" , String.Format(" javascript:wind ow.open('NewPIM G.aspx?PatientI d={0}'); return false;", patientId));

      on the pop up, i have to retrieve the values of the fields and return it to the page who called it with captions on from what page did it come from.. how will i do that?


      i also tried using redirection instead of pop-ups, i managed to throw the fields i need to the querystring successfully but the problem is the fields i typed in the parent page somehow loses the data... shush...


      please help. i'd really appreciate it.. thank you
      I have a suggestion for you....you can take it or leave it...I just think it could help simplify your problem a bit better...

      If you aren't actually doing anything with the parent page while the "pop-out" page is displaying/processing....I suggest using a WebUser control to display your picture instead of using a "pop-out window". Then when the user presses the button you can hide your parent page and show the Picture WebUser control....then when your done with Picture WebUser control you can just show the parent page again...

      The nice things about WebUser controls is that they have Properties.

      So, the parent page will have an instance of the Picture WebUser control within it....This means that all the properties of the Picture WebUser control are available to the parent page...the parent page can manipulate the WebUser control and retrieve data from it...etc..etc.. .

      Do you see where I'm going with this?

      Could this help you at all?

      -Frinny

      Comment

      • ces
        New Member
        • Sep 2007
        • 2

        #4
        thanks for the ideas..

        i'm still workin' on it. as much as i want to use webcontrols i can't, the client specifically wanted a pop up for the images. i tried to suggest what you have given me but i'm to no avail.. i just have to work this one out....

        thanks again guys.. much appreciated..

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Originally posted by ces
          thanks for the ideas..

          i'm still workin' on it. as much as i want to use webcontrols i can't, the client specifically wanted a pop up for the images. i tried to suggest what you have given me but i'm to no avail.. i just have to work this one out....

          thanks again guys.. much appreciated..
          That's ok, the client's always right ;)

          You should try Plater's recommendation of placing the information into Session...altho ugh I'm not sure this will work with the older browsers. Because when the user closes the pop-out browser that SessionID may be lost. I don't think that this will be a problem with the newer browsers....but remember that pop-ups tend to be blocked or they are thrown into a new tab...

          If this doesn't work with you we'll see if we can come up with another idea :)

          -Frinny

          Comment

          Working...