Click here to Skip to main content
15,885,947 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Returning a value from a popup window Pin
Gretna19-Aug-08 2:51
Gretna19-Aug-08 2:51 
GeneralRe: Returning a value from a popup window Pin
Gretna19-Aug-08 2:57
Gretna19-Aug-08 2:57 
GeneralRe: Returning a value from a popup window Pin
Gretna19-Aug-08 5:00
Gretna19-Aug-08 5:00 
AnswerRe: Returning a value from a popup window Pin
Abhijit Jana19-Aug-08 5:12
professionalAbhijit Jana19-Aug-08 5:12 
GeneralRe: Returning a value from a popup window Pin
Gretna19-Aug-08 5:23
Gretna19-Aug-08 5:23 
AnswerRe: Returning a value from a popup window Pin
Abhijit Jana19-Aug-08 6:07
professionalAbhijit Jana19-Aug-08 6:07 
GeneralRe: Returning a value from a popup window Pin
Gretna19-Aug-08 22:33
Gretna19-Aug-08 22:33 
AnswerRe: Returning a value from a popup window Pin
Abhijit Jana19-Aug-08 6:08
professionalAbhijit Jana19-Aug-08 6:08 
This is the code for main Page

<script language="javascript" type="text/javascript">

//This is Textbox where i have display the date from popuo
 myID= "<%=txtCal.ClientID%>";

function Button1_onclick() {
//open popup page 
window.open("default2.aspx","test",'left=100,top=100,width=200,height=200');
}


</script>

Code in Popup window

Server Side (code behiend)

protected void Calendar1_SelectionChanged(object sender, EventArgs e)
    {
        string  dt = Calendar1.SelectedDate.ToShortDateString();
        Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID, "updateParent('" + dt + "');", true);

    }


Client Side

<script language="javascript">
 function updateParent()
   {
   //Tip:Accept Argument From Server Side   
  var argv = updateParent.arguments;
window.opener.document.getElementById(window.opener.myID).value = argv[0];
self.close();

   }

</script>


This should run perfectly. dont forget to vote Wink | ;)

cheers,
Abhijit

QuestionDelete Request.QueryString variable Pin
omlac19-Aug-08 0:25
omlac19-Aug-08 0:25 
AnswerRe: Delete Request.QueryString variable Pin
The Web Developer19-Aug-08 0:30
The Web Developer19-Aug-08 0:30 
AnswerRe: Delete Request.QueryString variable Pin
omlac19-Aug-08 0:42
omlac19-Aug-08 0:42 
AnswerRe: Delete Request.QueryString variable Pin
Tripathi Swati19-Aug-08 0:50
Tripathi Swati19-Aug-08 0:50 
AnswerRe: Delete Request.QueryString variable Pin
N a v a n e e t h19-Aug-08 3:05
N a v a n e e t h19-Aug-08 3:05 
QuestionLoad new record on scroll Pin
Jagwinder Walia18-Aug-08 22:57
Jagwinder Walia18-Aug-08 22:57 
AnswerRe: Load new record on scroll Pin
Sandeep Akhare18-Aug-08 23:22
Sandeep Akhare18-Aug-08 23:22 
AnswerRe: Load new record on scroll Pin
Sathesh Sakthivel19-Aug-08 0:08
Sathesh Sakthivel19-Aug-08 0:08 
QuestionFunction byval parameters does not work with datatable type?? Pin
Hanssel18-Aug-08 22:52
Hanssel18-Aug-08 22:52 
AnswerRe: Function byval parameters does not work with datatable type?? Pin
NeverHeardOfMe19-Aug-08 0:30
NeverHeardOfMe19-Aug-08 0:30 
QuestionDisplying data into formview on link button click Pin
Rameez Raja18-Aug-08 22:37
Rameez Raja18-Aug-08 22:37 
AnswerRe: Displying data into formview on link button click Pin
AhsanS18-Aug-08 23:06
AhsanS18-Aug-08 23:06 
GeneralRe: Displying data into formview on link button click Pin
Rameez Raja19-Aug-08 1:32
Rameez Raja19-Aug-08 1:32 
QuestionRetrieving data from a site? Pin
ddspliting18-Aug-08 22:33
ddspliting18-Aug-08 22:33 
AnswerRe: Retrieving data from a site? Pin
AhsanS18-Aug-08 23:14
AhsanS18-Aug-08 23:14 
GeneralRe: Retrieving data from a site? Pin
ddspliting19-Aug-08 2:30
ddspliting19-Aug-08 2:30 
GeneralRe: Retrieving data from a site? Pin
N a v a n e e t h19-Aug-08 3:07
N a v a n e e t h19-Aug-08 3:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.