Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Remove/Disable SimpleDialog once they click 'Yes'

Expand Messages
  • Lee.M
    That s a good idea, I think I ll go that route thanks! I was thinking I d do context: [ id , tl , tl ], to make it position itself over the text area but that
    Message 1 of 5 , Jan 30, 2009
    • 0 Attachment
      That's a good idea, I think I'll go that route thanks!

      I was thinking I'd do

         context: ["id","tl","tl"],

      to make it position itself over the text area but that doesn't seem to work, but it'll do for now

      On Jan 30, 2009, at 5:17 PM, Eric Miraglia wrote:

      Lee,


      It's possible that what you want is something like this:


      Keep in mind that the field is not really disabled -- you're just messaging the user before they use the field.  In this implementation, a user without JavaScript would be able to enter text in that field without the message.

      -Eric


      On Jan 30, 2009, at 1:58 PM, Lee.M wrote:

      perfect, thanks Eric!


      I'm trying to use this on a text input that is disabled at first (IE disabled="disabled" ) once they click on the text field I want the simple dialog to ask if they are sure they want to change this value, when they say 'Yes' I  reenable the input in the handleYes function (and removeListener( "show"))

      The problem is that if the input is disabled the event never happens, no dialog :(

      Is there a way to have the simple dialog happen when you click on the text input area of a disabled text input?

      On Jan 30, 2009, at 3:41 PM, Eric Miraglia wrote:

      Lee,


      Add this to your handleYes function:

      YAHOO.util.Event. removeListener( "show", "click", YAHOO.example. container. simpledialog1. show);

      For the example with this modification:


      -Eric


      On Jan 30, 2009, at 11:15 AM, Lee.M wrote:

      With the example here:

      http://developer. yahoo.com/ yui/examples/ container/ simpledialog- quickstart_ clean.html

      What would need done in 'handleYes' to make it so that when they click 
      'Yes' once the dialog does not happen anymore?

      This is the example's function:

      var handleYes = function() {
      alert("You clicked yes!");
      this.hide();
      };

      something l ike this pseudo example:
      var handleYes = function() {

      my_disable_button( 'show');
      this.stop_doing_ this_dialog_ because_they_ said_yes_ already() ;
      this.hide
      };

      TIA!

      --
      Lee.M








    Your message has been successfully submitted and would be delivered to recipients shortly.