Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup Calendar Tips??

Status
Not open for further replies.

Jesse31

Programmer
Apr 5, 2002
7
0
0
CA
I'm trying to use .net's calendar in a popup situation. I can't seem to get the value from the popup back to the calling window. I'm using javascript to do such but am encountering errors with my user control's names as they contain colons:)) and javascript doesn't like that. Any suggestions??
 
Hey Jesse,

Check out this site:

the page has an example of how he did a popup calandar, and you can find a link on his site to the source code of how he did it (I found it once, can't remember exactly where, but its there)

Jack
 
I see the same situations all over the place where people are calling a popup window from another window. My situation is a little different in that my calling window has a User control that calls the popup window, therefore, trying to set the value back in that user control is difficult as .Net fully qualifies the textboxes name with usercontrol:textbox and javascript(which I'm using to set the value back) doesn't like colons. Has anyone seen this kind of situation before? If so, how do you set the value back on the calling window?
 
Hi,

I am a newbie to .NET (having get-started-problems -- see : Thread855-265989).
My major motivation for switching over to .NET a.s.a.p. is that on my website I have a plethora of cross-browser problems, including that of differing implementations of pop-up screens (in my user request forms).

Once I can get off square one I intend to investigate the total elimination of pop-ups (I have the '<panel>' tag -- correct name? -- in mind).

Would that not be a better way to go?

JimHH

 
Everyone another possibility instead of using javascript on the client side is to do a lot of it on the server side. I just made a dynamic server control and added a simple script to open the window.

All you need to do is:

btnSearch.Attributes.Add (&quot;onclick&quot;, &quot;window.open('page1.aspx', strfeatures)

IT is very easy and the client side can't see what your doing. The article I found this information is at:


If you have any questions let me know.

Ken
 
Hey Ken,

Just to clarify what happens there though:
window.open is a javascript function. So all you're doing is telling the server that when it renders the page, the button will have a javascript function called when onclick happens. So its still javascript, and it still gets executed on the client machine. The server is just saving the coder from having to write code in two different spots (i.e. instead of going to teh html viewer and adding the onclick call, just doing it within the code behind by adding an attribute).

:)

jack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top