IT Community - Software Programming, Web Development and Technical Support

How to pass session values in popup window

This is a discussion on How to pass session values in popup window within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; hi all, i couldn't get the session value in popup window. i call the popup window through javascript. but ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > HTML, CSS and Javascript Coding Techniques

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-13-2008, 08:51 AM
Mramesh Mramesh is offline
D-Web Sr.Programmer
 
Join Date: Sep 2007
Location: Chennai
Posts: 106
Mramesh is on a distinguished road
Send a message via MSN to Mramesh
Default How to pass session values in popup window

hi all,

i couldn't get the session value in popup window.
i call the popup window through javascript. but in that popup window i couldn't get the session values.

Thanx in advance
__________________
M.Ramesh Kumar
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-13-2008, 08:54 AM
Sundaram Sundaram is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Location: chennai
Posts: 117
Sundaram is on a distinguished road
Send a message via MSN to Sundaram Send a message via Yahoo to Sundaram
Default Re: How to pass session values in popup window

Code:
<script language="javascript">
       function hpclick()
       {
       var WinSettings = "center:yes;resizable:yes;dialogHeight:300px"
       window.showModalDialog("http://localhost:4911/WebSite19/Create_category.aspx",WinSettings);
       }
through this code i'm calling the popup window. but in that popupwindow i couldn't get the session values
__________________
Regards,

Sundaram
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-13-2008, 08:58 PM
GDevakii GDevakii is offline
D-Web Sr.Programmer
 
Join Date: Aug 2007
Posts: 138
GDevakii is on a distinguished road
Smile Re: How to pass session values in popup window

private void Page_Load(object sender, System.EventArgs e)
{
string jsString = "&ltSCRIPT language='JavaScript'>";
jsString += "window.open('ProgressHandler.aspx?SessionID=" ;
// Pass the Session-ID as a parameter
jsString += Session.SessionID + "',null,'');";
jsString += "</SCRIPT>";

RegisterClientScriptBlock("OpenPopup", jsString);
StartProcesButton.Attributes.Add("OnClick","javasc ript: LoadViewer();");
}
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-13-2008, 09:01 PM
poornima poornima is offline
D-Web Sr.Programmer
 
Join Date: Dec 2007
Posts: 189
poornima is on a distinguished road
Smile Re: How to pass session values in popup window

Hi,
Pass the Session value using Global variable like this,
window.showModalDialog("http://localhost:4911/WebSite19/Create_category.aspx?sampleValue="+<%=Session("use rId")%>,WinSettings);

Then in that Page retrieve the Session value using New Session Variable,
Session("UserID")=Request.QueryString["sampleValue"];
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Session never expires in site unless you close the window ursklakshmanan PHP Programming 1 03-31-2008 03:07 AM
How to open popup onmouseover and to close the same window onmouseout javascript? bluesky HTML, CSS and Javascript Coding Techniques 3 12-07-2007 06:51 AM
HOw to disable Confirm password popup window in Firefox browser GDevakii HTML, CSS and Javascript Coding Techniques 0 09-24-2007 04:33 AM
Session in child window Sivamurugan PHP Programming 3 09-11-2007 05:39 AM
How to pass the value from the child window to parent window in javascript? kingmaker HTML, CSS and Javascript Coding Techniques 1 09-04-2007 03:18 AM


All times are GMT -7. The time now is 08:57 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0