Results 1 to 6 of 6

Thread: Xin's Popup Calendar - Popup When User Enter Field

  1. #1
    Join Date
    Nov 2004
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Xin's Popup Calendar - Popup When User Enter Field

    Xin's Popup Calendar
    http://www.dynamicdrive.com/dynamici...pcalendar2.htm

    Is is possible to have the calendar pop-up when the user enter the field? I'm using this calendar on my site and users are typing in the date and not clicking on the calendar next to it.

    Thanks!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Because this is a pop up window, there is not much you can do. You could launch it onfocus of the text input but most pop up blockers will block that. You could extend the link to include the text input but that will not work in IE - the most popular browser. In IE you can make it work though by setting the onfocus to the the this.parentNode.click(); but, that throws an error and makes the pop up blocker think that it has blocked a pop up (even though it works). Not a very smooth experience for your users. I think there are other pop up calendars that pop up a division, not a window, those would be better for this application.

    Try:

    http://www.dynamicdrive.com/dynamici...oncalendar.htm
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Code:
    By NoClue
    Is is possible to have the calendar pop-up when the user enter the field? 
    
    I'm using this calendar on my site and users are typing in the date and not clicking on the calendar next to it.
    You could've made your date text field a readonly one so users have to click on the select date link for selecting a date.

    You can control those users who skips without entering the date(s) using proper client-side form validation.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by codeexploiter
    Code:
    By NoClue
    Is is possible to have the calendar pop-up when the user enter the field? 
    
    I'm using this calendar on my site and users are typing in the date and not clicking on the calendar next to it.
    You could've made your date text field a readonly one so users have to click on the select date link for selecting a date.

    You can control those users who skips without entering the date(s) using proper client-side form validation.
    All very clever, except what happens for non-javascript enabled browsers? No way to enter the date. Even for javascript enabled browsers, having a date field that you cannot enter a date into without clicking elsewhere (very non-intuitive) is guaranteed to leave quite a number of users scratching their heads.

    The script that I mentioned in my last post should be able to force the date into a desired format while not leaving so many people wondering how to use it.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Thumbs up

    Hmmm john you are correct I only thought of Java enabled browsers. Sorry about the confusion.

    posted by: John
    what happens for non-javascript enabled browsers?
    If anybody turned off/use non=Javas/javascript in their browsers then i think the solution you suggested is not going to work.

    The solution seems to be the HTML form fields through which people can select day, month and year.

    Plz let me know if I am wrong
    Last edited by codeexploiter; 09-12-2006 at 06:59 AM.

  6. #6
    Join Date
    Nov 2004
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks John, that seems to be the better option for what I'm trying to do.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •