Welcome Guest!

If you do not have an account yet on The Web Squeeze forums, please Register! It’s FREE and there are many benefits:

  • Receive Fast Advice
  • Learn Programming Languages
  • Get Professional Website Reviews
  • Quick Troubleshooting Assistance

> Jquery Enable/disable

This is a discussion on Jquery Enable/disable, within the Javascript section. This forum and the thread "Jquery Enable/disable" are both part of the Frameworks category.

 
Reply to this topicStart new topic
> Jquery Enable/disable
Monie
post Aug 12 2008, 01:30 AM
Post #1


Squeeze Machine
*****

Posts: 733
Joined: 13-February 08
From: Borneo


How to make this jQuery Date Picker enable or disable on an OnClick event?
I have two field on my form. Their visibility is depending on an onclick event.
One field is a jQuery Date picker(with a calender image) and the other one is a normal text field.
CODE
// 2. jQuery Date Picker //
     $(document).ready(function(){
     $("#date").datepicker({
         speed: "normal",
         highlightWeek: true,
         dateFormat: "dd/mm/yy",
         showOn: "button",
         buttonImage: "images/calendar.gif",
         buttonImageOnly: true
     }).addClass("embed") .attr("readonly", "readonly");
         });
// 2. jQuery Date Picker //
  
<!-- 3. jQuery Date Picker Input Box -->
      <input id="date"class="mandatory"  type="text" name="what_fieldname" size="30" style="display: none;" disabled>
      <style type="text/css">.embed + img { position: relative; left: -21px; top: -1px; cursor: pointer;}      
      </style>                                        
<!-- 3. jQuery Date Picker -->


...and I have an onclick function that will make this jQuery date picker input field to be disable or enable.
It manage to hide/disable the date picker input field but the calender button image is still there!
I haven't completely squeeze my brain to it, I might try it later...
by the man time, if somebody could give me a hint?

Cheers...


--------------------

Go to the top of the page
 
+Quote Post
Monie
post Aug 22 2008, 09:40 PM
Post #2


Squeeze Machine
*****

Posts: 733
Joined: 13-February 08
From: Borneo


Solved, I have found another alternative how to solve this things smile.gif


--------------------

Go to the top of the page
 
+Quote Post
If you found The Web Squeeze to be helpful, please donate so we can keep this site FREE, FRESH, and fortified with Web Design & Development info!
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   2 Jason 382 6th May 2008 - 07:33 AM
Last post by: Rakuli
No New Posts   8 unitedcraig 575 9th September 2008 - 10:03 PM
Last post by: Monie
No New Posts   10 MikeHopley 1,273 21st June 2008 - 07:40 PM
Last post by: karinne
No new   19 jackfranklin 609 21st June 2008 - 07:39 PM
Last post by: karinne
No New Posts   3 Monie 319 29th June 2008 - 05:46 PM
Last post by: sylvatica