473,398 Members | 2,125 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,398 software developers and data experts.

calender in modal window

i have a button that opens a modal window which has the calender control in
it. I allow the user to select a date then that date should be passed back to
the parent form. I'm having an issue with this. When I select a date, i keep
getting a JavaScript error and i debug it and it goes to this line:

__doPostBack('ctlCalender','1781').

i can get this working in VB.NET so i converted the code over and now i get
the error. I need this in C#

Nov 18 '05 #1
6 1860
Try it as a non-modal window once... does it work?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
i have a button that opens a modal window which has the calender control in
it. I allow the user to select a date then that date should be passed back
to
the parent form. I'm having an issue with this. When I select a date, i
keep
getting a JavaScript error and i debug it and it goes to this line:

__doPostBack('ctlCalender','1781').

i can get this working in VB.NET so i converted the code over and now i
get
the error. I need this in C#

Nov 18 '05 #2
that didn't work either. I did try it on the same page and it worked. Its
something with either the new window, or the session variable really isn't
being "saved" for some reason

"Curt_C [MVP]" wrote:
Try it as a non-modal window once... does it work?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
i have a button that opens a modal window which has the calender control in
it. I allow the user to select a date then that date should be passed back
to
the parent form. I'm having an issue with this. When I select a date, i
keep
getting a JavaScript error and i debug it and it goes to this line:

__doPostBack('ctlCalender','1781').

i can get this working in VB.NET so i converted the code over and now i
get
the error. I need this in C#


Nov 18 '05 #3
show the vb.net code you want converted

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
that didn't work either. I did try it on the same page and it worked. Its
something with either the new window, or the session variable really isn't
being "saved" for some reason

"Curt_C [MVP]" wrote:
Try it as a non-modal window once... does it work?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
>i have a button that opens a modal window which has the calender control
>in
> it. I allow the user to select a date then that date should be passed
> back
> to
> the parent form. I'm having an issue with this. When I select a date, i
> keep
> getting a JavaScript error and i debug it and it goes to this line:
>
> __doPostBack('ctlCalender','1781').
>
>
>
> i can get this working in VB.NET so i converted the code over and now i
> get
> the error. I need this in C#
>


Nov 18 '05 #4
the vb.net code: on my modal windowL

page_load
if not isPostBack then
calendar.selectedDate = Date.Now
end if
Session("myDay") = format(calendar.selectedDate, "MM/dd")

sub calendar_selectedChanged
if calendar.selectedMode = CalendarSelectionMode.Day then
Session("myDay") = format(calendar.selectedDate, "MM/dd")
end if

"Curt_C [MVP]" wrote:
show the vb.net code you want converted

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
that didn't work either. I did try it on the same page and it worked. Its
something with either the new window, or the session variable really isn't
being "saved" for some reason

"Curt_C [MVP]" wrote:
Try it as a non-modal window once... does it work?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
>i have a button that opens a modal window which has the calender control
>in
> it. I allow the user to select a date then that date should be passed
> back
> to
> the parent form. I'm having an issue with this. When I select a date, i
> keep
> getting a JavaScript error and i debug it and it goes to this line:
>
> __doPostBack('ctlCalender','1781').
>
>
>
> i can get this working in VB.NET so i converted the code over and now i
> get
> the error. I need this in C#
>


Nov 18 '05 #5
Not fully tested but is this close to what you had?

page_load
if(!IsPostBack)
{
calendar.SelectedDate = Date.Now;
}
Session["myDay"] = Convert.ToDateTime(calendar.SelectedDate).ToShortD ate();

sub calendar_selectedChanged
if(calendar.SelectedMode = CalendarSelectionMode.Day)
{
Session["myDay"] =
Convert.ToDateTime(calendar.SelectedDate).ToShortD ate();
}
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
the vb.net code: on my modal windowL

page_load
if not isPostBack then
calendar.selectedDate = Date.Now
end if
Session("myDay") = format(calendar.selectedDate, "MM/dd")

sub calendar_selectedChanged
if calendar.selectedMode = CalendarSelectionMode.Day then
Session("myDay") = format(calendar.selectedDate, "MM/dd")
end if

"Curt_C [MVP]" wrote:
show the vb.net code you want converted

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
> that didn't work either. I did try it on the same page and it worked.
> Its
> something with either the new window, or the session variable really
> isn't
> being "saved" for some reason
>
> "Curt_C [MVP]" wrote:
>
>> Try it as a non-modal window once... does it work?
>>
>> --
>> Curt Christianson
>> Owner/Lead Developer, DF-Software
>> Site: http://www.Darkfalz.com
>> Blog: http://blog.Darkfalz.com
>>
>>
>> "Mike" <Mi**@discussions.microsoft.com> wrote in message
>> news:B3**********************************@microsof t.com...
>> >i have a button that opens a modal window which has the calender
>> >control
>> >in
>> > it. I allow the user to select a date then that date should be
>> > passed
>> > back
>> > to
>> > the parent form. I'm having an issue with this. When I select a
>> > date, i
>> > keep
>> > getting a JavaScript error and i debug it and it goes to this line:
>> >
>> > __doPostBack('ctlCalender','1781').
>> >
>> >
>> >
>> > i can get this working in VB.NET so i converted the code over and
>> > now i
>> > get
>> > the error. I need this in C#
>> >
>>
>>
>>


Nov 18 '05 #6
Try calendar at http://www.obout.com
it is instant. no popup window
works right out of the box
looks great
Nov 18 '05 #7

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

Similar topics

2
by: Patrick Lim | last post by:
Here is the problem: I have written a non-modal frame class in Java for displaying help text when a user is using an application. It works as desired in that if the user selects "help" again,...
1
by: amith | last post by:
Hi, I have a javascript, calendar.js which i use to enable my client to select the date. This calendar pops up on the click of a gif image. But the problem is that this poped up window is not...
2
by: Matt | last post by:
I want to know how to submit the form data to a modal dialog window? The following is page1.asp, and when the user clicks submit button, it will post the form data to page2.asp by opening a new...
1
by: gopal srinivasan | last post by:
I need to know how to close a parent modal window when child modal window opens, also i need to know the syntax for writing document on the modal window on the fly, like what we do in case of...
8
by: PerryC | last post by:
I want to be able to accomplish this, please help: When click on the DOB field, a ActiveX Calender popup and the user choose a date, the value is automatically refreshed in the DOB field in the...
4
by: Chris | last post by:
Hi, I am trying to create a popup calender so a user can click on a button on the main form, a calender will then popup, the user will select a date and then click ok on the popup. The date will...
2
by: sthrudel | last post by:
Hi! I'm working on a web application in Asp.net and what I would like to have is a cross borwser modal dialog which accepts user's input. I would like to catch what the user clicked on the...
4
by: John Kotuby | last post by:
Hi all... I am bulding an application and wish to use custom Modal dialog windows. According to a couple of recent articles I have seen, the newer Mozilla browsers (actually I think they said...
7
by: gubbachchi | last post by:
Hi all, In my application I need to display the data fetched from mysql database after the user selects date from javascript calender. I have written the code in which after the user selects the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.