473,564 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pop-up Calendar with masterpage

I have a 2.0 asp app and i'm trying to implement a pop-up calendar. I
can get the calendar to pop-up and select a value, but can not get the
value to pass back to the calling page. Here is the code i'm using:

code linked to an html button

function Button5_onclick (evt) {
//OBTAIN CURRENT X-Y POSITION
var CurX = parseInt(evt.x) ;
var CurY = parseInt(evt.y) ;
window.open('ca lendar.aspx?con tentname=docume nt.forms[0].elements[' +
'<%= lblDate.ClientI D %>' +
']','cal','width= 164,height=188' ).moveTo(CurX,
CurY);//calendar.focus( );

//window.open('ca lendar.aspx?con tentname=Conten tPlaceHolder1$l blDate','cal',' width=164,heigh t=188').moveTo( CurX,
CurY);//calendar.focus( );
}
Code on the pop-up window

Private Sub Calendar1_Selec tionChanged(ByV al sender As Object, ByVal e
As System.EventArg s)
Dim strjscript As String = "<script language=""java script"">"
strjscript &= "window.opener. " &
HttpContext.Cur rent.Request.Qu eryString("cont entame") & _
".value = '" & Calendar1.Selec tedDate & "';window.close ();"
strjscript = strjscript & "</scr" & "ipt>"
Literal1.Text = strjscript
End Sub

Thanks for any help.

Apr 19 '06 #1
1 1315
if your popup window does a postback, this causes a render. in the new
rendered page, opener will no longer references the parent page, and there
is no way to access it.

if you need to postback, the popup should be a frameset, with the postback
page in the frame. then on postback it can access the frameset and its
opener. (parent.opener)

-- bruce (sqlwork.com)


<wa******@gmail .com> wrote in message
news:11******** *************@i 39g2000cwa.goog legroups.com...
I have a 2.0 asp app and i'm trying to implement a pop-up calendar. I
can get the calendar to pop-up and select a value, but can not get the
value to pass back to the calling page. Here is the code i'm using:

code linked to an html button

function Button5_onclick (evt) {
//OBTAIN CURRENT X-Y POSITION
var CurX = parseInt(evt.x) ;
var CurY = parseInt(evt.y) ;
window.open('ca lendar.aspx?con tentname=docume nt.forms[0].elements[' +
'<%= lblDate.ClientI D %>' +
']','cal','width= 164,height=188' ).moveTo(CurX,
CurY);//calendar.focus( );

//window.open('ca lendar.aspx?con tentname=Conten tPlaceHolder1$l blDate','cal',' width=164,heigh t=188').moveTo( CurX,
CurY);//calendar.focus( );
}
Code on the pop-up window

Private Sub Calendar1_Selec tionChanged(ByV al sender As Object, ByVal e
As System.EventArg s)
Dim strjscript As String = "<script language=""java script"">"
strjscript &= "window.opener. " &
HttpContext.Cur rent.Request.Qu eryString("cont entame") & _
".value = '" & Calendar1.Selec tedDate & "';window.close ();"
strjscript = strjscript & "</scr" & "ipt>"
Literal1.Text = strjscript
End Sub

Thanks for any help.

Apr 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2394
by: Roy Smith | last post by:
In the recent "transforming a list into a string" thread, we've been discussing the fact that list.pop() is O(1), but list.pop(0) is O(n). I decided to do a little timing experiment. To be sure, I did verify experimentally the expected result, but along the way, I came upon an interesting artifact that I'm at a loss to explain. I used the...
4
4677
by: Andre | last post by:
Hi guys, newbie question. I am having trouble with a script that is supposed to login me to my account on yahoo pop server. When i do this: import getpass, poplib, re POPHOST = "pop.mail.yahoo.com" POPUSER = "mylogin" POPPASS = "mypass" pop = poplib.POP3(POPHOST)
1
2241
by: spencer | last post by:
Hi, The code. def buildStackMajor(): for node in dirStackMinor: #print 's is the node...', node dirStackMajor.append(node) dirStackMinor.pop() print 'POP the stack...', len(dirStackMinor) print 'after pop...', dirStackMinor
6
23189
by: Will | last post by:
Hi, Sorry to be a pest... But I can figure this out. I'm pushing to a stack. then I need to check to see if the word is a palindrome. Is the code below correct? if so, how can I check the entire word?
2
2281
by: John Hoge | last post by:
I would like to open an exit pop when a user leaves my site, but I don't want to the back button to trigger the pop if the user remains in my site. I'm using the onUnload attribute of the Body tag to do this. All internal links set a variable of inSite to true on their onClick event handler, so the exit pop will not open if the user follows...
15
4137
by: Stig Brautaset | last post by:
Hi group, I'm playing with a little generic linked list/stack library, and have a little problem with the interface of the pop() function. If I used a struct like this it would be simple: struct node { struct node *next; void *data; };
25
4178
by: Nicholas Parsons | last post by:
Howdy Folks, I was just playing around in IDLE at the interactive prompt and typed in dir({}) for the fun of it. I was quite surprised to see a pop method defined there. I mean is that a misnomer or what? From the literature, pop is supposed to be an operation defined for a stack data structure. A stack is defined to be an "ordered"...
7
24926
by: Scott | last post by:
As said before I'm new to programming, and I need in depth explaination to understand everything the way I want to know it, call it a personality quirk ;p. With pop() you remove the last element of a list and return its value: Now I know list is a bad name, but for the sake of arguement lets assume its not a built in sequence> 'example'
4
2552
by: j_depp_99 | last post by:
The program below fails on execution and I think the error is in my pop function but it all looks correct.Also could someone check my code as to why my print function is not working? I havent included the other parts of my program but will if someone needs it. Please help; I have had it. I have checked all C++ websites and cannot figure it...
20
5700
by: merrittr | last post by:
I need some C advice I want to read in string commands from a user when the user enters a \n I want to push it on the stac. Then at some point , if the user enters the word print pop off and print each word (or using another stack pointer scan the stack printing each string). here is a stub of what i want to do. (how do I implement this ...
0
7665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.