473,385 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Popup calendar

Ali
I am trying to create a popup calender so when a user click on a image on
the main form, a calender will then popup, the user will select a date and
the date will then be passed back to the main form and populate a textbox. it
works fine. but when i use it within a table cell everything worked properly
except populating the textbox with the selected date?? any suggestions will
be highly appreciated.

here's the code which popups the calendar:
<div>
<asp:textbox id=txtDate runat="server" ForeColor="Black" Width="88px">
</asp:textbox><A
onclick="window.open('Calendar.aspx?textbox=txtDat e','cal','width=300,height=300,left=470,top=300')"
href="javascript:;"><IMG src="images/SmallCalendar.gif" border="0">
</A>

</div>

and here's the code for the selection change:

Private Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Calendar1.SelectionChanged
Dim strjscript As String = "<script language=""javascript"">"
strjscript &= "window.opener." & _
HttpContext.Current.Request.QueryString("formname" ) & ".value
= '" & _
Calendar1.SelectedDate & "';window.close();"
strjscript = strjscript & "</scr" & "ipt>"
Literal1.Text = strjscript
End Sub
Nov 19 '05 #1
1 1896
Ali
I found out the cause of my problem but i really don't know how to fix it.
The thing is I am using Master Page for all my pages ( Visual Studio 2005 ).
I tried it without the Masterpage it works fine. But when i tried it using
master page it didn't work. any help will be highly appreciated


"Ali" wrote:
I am trying to create a popup calender so when a user click on a image on
the main form, a calender will then popup, the user will select a date and
the date will then be passed back to the main form and populate a textbox. it
works fine. but when i use it within a table cell everything worked properly
except populating the textbox with the selected date?? any suggestions will
be highly appreciated.

here's the code which popups the calendar:
<div>
<asp:textbox id=txtDate runat="server" ForeColor="Black" Width="88px">
</asp:textbox><A
onclick="window.open('Calendar.aspx?textbox=txtDat e','cal','width=300,height=300,left=470,top=300')"
href="javascript:;"><IMG src="images/SmallCalendar.gif" border="0">
</A>

</div>

and here's the code for the selection change:

Private Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Calendar1.SelectionChanged
Dim strjscript As String = "<script language=""javascript"">"
strjscript &= "window.opener." & _
HttpContext.Current.Request.QueryString("formname" ) & ".value
= '" & _
Calendar1.SelectedDate & "';window.close();"
strjscript = strjscript & "</scr" & "ipt>"
Literal1.Text = strjscript
End Sub

Nov 19 '05 #2

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

Similar topics

0
by: Caesar Augustus | last post by:
I'm having a problem with two different javascript controls in my app. The first chuck of javascript that I pasted into my app is the client-side calendar control popup which works fine when first...
4
by: Ali | last post by:
i am using visual studio 2005 and I am trying to create a popup calender so when a user click on a image on the main form, a calender will then popup, the user will select a date and the date will...
3
by: Peter | last post by:
Does anyone have an example of how you would do a popup window when a user clicks on a day number link in the ASP.NET Web Calendar control? I am trying to create an event calendar similar to how...
1
by: Garth Wells | last post by:
I found sample code that shows me how to implement a popup calendar, but I would like the calendar to popup at the lower right of the Input to which it's associated...the way Sharepoint popup...
0
by: R.A.M. | last post by:
Hello, I need to implement popup calendar in ASP.NET application. I created a button opening popup calendar on 'master' page: <asp:Button ID="Calendar" runat="server" Text=Calendar"...
1
by: R.A.M. | last post by:
Hello, I need to implement popup calendar in ASP.NET application. I created a button opening popup calendar on 'master' page: <asp:Button ID="Calendar" runat="server" Text=Calendar"...
0
by: GV | last post by:
Hi all, New to developing in VS 2005 ASP 2.0 Trying to have a easy pop calender for a button on a web page. I keep getting a error message in IE6 that says: Line 69 Char 3 Error:...
5
by: rockdale | last post by:
Hi, I tried to search web for an non-popup calendar control, (like javascript calendar) but could not find a good solution. Most solutions are popup another window and show the calendar, then...
4
by: ShyGuy | last post by:
A while back I had found a link to a popup calendar that had a small button that was placed to the right of any text box. By clicking on the icon and selecting a date the text box was updated with...
3
by: mikaint | last post by:
I'm really confused here...i'll need some help with the following... i have a sceipt that will open a popup win which is actually a calendar and i'm trying to apply a style on the popup... Here's...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.