calendar pop up causes validation...

Hi all,

My textbox control is where the date gets inserted into from a pop up calendar. I have a validation control which fires if no date is selected. So a date must be put in the textbox.

I have a link which makes the calendar control page pop up - however when the page pops up the validation is also fired and because the user hasn't selected a date yet, the validation error message is displayed.

What could be causing this? Is it fixable??

My op-up calendar code:

<A class="calLink" onclick="window.open('calendar.aspx?textbox=txtDate','cal','width=141,height=160')"
                                                                  href="javascript:;"><INPUT type="image" alt="Click for Calendar" src="images/calendarGIF.gif" name="calGIF"></A>

thx,

KS
LVL 11
Ramesh SrinivasTechnical ConsultantAsked:
Who is Participating?
 
greenlantern0Connect With a Mentor Commented:
<a onclick="javascript:window.open('calendar.aspx?textbox=txtDate','cal','width=141,height=160');"
                        href="#"><img alt="Click for Calendar" src="images/calendarGIF.gif" name="calGIF" border="0"></a>

Alright, sooo have you tried this?
0
 
mmarinovCommented:
Hi,

have you tried to use HyperLink control and set it the javascript but also set it CauseValidation=False ?

Regards,
B..M
0
 
Ramesh SrinivasTechnical ConsultantAuthor Commented:
I did try it at some point, Hyperlink control doesnt have onClick method - which is what I use to call the javascript.

0
 
Ramesh SrinivasTechnical ConsultantAuthor Commented:
Nope!

Works good tho!

Nice one.

KS
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.