www.webdeveloper.com
Results 1 to 5 of 5

Thread: [RESOLVED] Getting an Error in IE.

  1. #1
    Join Date
    May 2008
    Posts
    130

    resolved [RESOLVED] Getting an Error in IE.

    In my page, i have two radio buttons. one is "Daily" and another one is "Master". when i am going to change from "daily" to "Master" in the page of left side down corner it is showing an error i.e dueDate is undefined

    this is the code i am using.
    Code:
     var lastSelectedTaskTypeButton=null;
      function processTaskTypeChange(radioButton)
      {
           var bStateChanged = false;
        if ( lastSelectedTaskTypeButton == null )
        {
          // Just record which box is selected.
          lastSelectedTaskTypeButton = radioButton.value;
          bStateChanged = true;     
        }
        else 
        {
          // If the selected task type equals lastSelectedTaskType, don't do anything.
          // Otherwise make the change.
          if ( radioButton.value != lastSelectedTaskTypeButton )
          {
              lastSelectedTaskTypeButton = radioButton.value;
              bStateChanged = true;
          }
        }  
        
        if ( bStateChanged )
        {    
        
           if (lastSelectedTaskTypeButton == "daily" ) 
           {
             // Put the current date in the dueDate field.
             $(dueDate).value = getCurrentDateString();
           }
           else 
           {
             $(dueDate).value = "";
             $(startDate).value = "";
           }
        }      
      }
    if i declare
    Code:
     var dueDate = null;
    on the top , 'null' is null or not an object error is showing.
    I attached my screen shot please find it.

    what i need to change in the above script. please give me an idea on this?

    thanks in advance..
    Attached Images Attached Images

  2. #2
    Join Date
    Feb 2008
    Posts
    1,666
    Would need to see ALL of your HTML.

  3. #3
    Join Date
    May 2008
    Posts
    130
    I attached HTML code. pls find it.
    Attached Files Attached Files

  4. #4
    Join Date
    Feb 2008
    Posts
    1,666
    Well, I found this:
    HTML Code:
    <form name="updateTask" action="ozPpolTaskDtl.jsp" method="post" enctype="multipart/form-data">
    <input type="text" class="textInput" name="dueDate" id="dueDate" size="12" value="2008.NOV.18" >
    Which means that this is not doing its job:

    $(dueDate).value

    Does that need to be in single quotes:

    $('dueDate').value

    Otherwise, go ask those whom supplied your script libraries -- or replace that with this:

    document.forms['updateTask'].elements['dueDate'].value

  5. #5
    Join Date
    May 2008
    Posts
    130
    Quote Originally Posted by MrNobody View Post
    $('dueDate').value
    hey with this peace it works fine. thank you very much and thanks for ur time.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles