Results 1 to 2 of 2

Thread: Help: popup calendar problem: Target form field is not assigned or not accessible !

  1. #1
    Join Date
    Aug 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Help: popup calendar problem: Target form field is not assigned or not accessible !

    hello

    I am new to Javascripts (actually I am new to scripts in general not only to javascripts ).

    I have downloaded a popup calendar from:
    http://www.dynamicdrive.com/dynamici...opcalendar.htm

    I followed the instructions step by step but I am getting the following error msg:

    "Target form field is not assigned or not accessible !"

    I have saved the popdate.js and the mycal.asp files in the same wwwroot directory.

    in mycal.asp I have added the following:


    Code:
    <form name="sample">
    <input type="button" value="Start Date" <a href="javascript://" onClick="getCalendarFor(document.sample.choise2);return false">[Choose one]</a>
    </form>

    when I open mycal.asp in the browser, I get the error msg I mentioned above.

    Can anybody help me to solve this problem please ?

    thank you in advanve
    Kumail

  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

    What's "choise2"? According to the instructions for this script, you need a named form element to receive the data, ex (using your code):
    Code:
    <form name="sample">
    <input type="text" name="choise2">
    <input type="button" value="Start Date" onClick="getCalendarFor(document.sample.choise2)">
    </form>
    By way of explanation, if you are using a button to activate the script, you do not need an anchor link tag and there is no default return for a button, so no 'return false;' is required.
    - John
    ________________________

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

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
  •