SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2012
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Popup window - passing one parameter to popup window

    Hello good folks,

    Here is my very simple situation.

    I have a popup window. I want this window to be launched from two or three different .aspx pages.Depending on the from page where the popup window was launched, I want to do different things on the popup window. So basically same popup window from different pages should be able to be launched.

    Here is the code so far that works successfully.


    Code:
    <a onclick="OpenWindow_HistoricalRuns();" 
               
               style="font-size: small; font-weight: bold; text-decoration: underline; color: #333300;">Show Current</a>
    Code:
    <script type="text/javascript" language="javascript">
    
                 function OpenWindow_HistoricalRuns() {
    
    
                     var windowIncsimHistRuns = window.open('PopupWindow.aspx', 'popup', 'width=350,height=425,scrollbars=0');
    
                     windowIncsimHistRuns.moveTo(500, 300);
    
                 }
    In the page_load event of the 'PopupWindow.aspx' (popup page), based on from page (where the popup page was launched from), I will do stuff differently. For that to happen, If I can pass a parameter say like the name of from page, that would be great.

    Any articles or suggestions on how to do this would be great.
    thanks

  2. #2
    SitePoint Enthusiast
    Join Date
    Jan 2012
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Really need some help on this request.

    Anyone ...

  3. #3
    SitePoint Guru Jason__C's Avatar
    Join Date
    Oct 2009
    Location
    Racoon City
    Posts
    656
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    See are using .NET. Just pass a parameter in the URL. For example, PopupWindow.aspx?needtopassthis=needtopassthisvalue....On Page_Load create a variable and use the "Response" and "QueryString" objects (search it). I think that is what you are talking about, if I'm wrong let me know.
    Chuck Norris is so tough, mosquitos ask for permission before they bite him


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •