SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Activate Button

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Mar 2008
    0 Post(s)
    0 Thread(s)

    Activate Button

    I have a jquery function that will upload an image to the server and then back to the html page. The image transfer works fine but I am trying to enable a button on transfer completion but I not meeting with success. I am sure I am missing something but do not see it. If anyone can offer a suggestion I would appreciate it. The function is

    Code javascript:
    		$('#product_type_image').attr('src', '../images/misc/loading.gif');
    		var result = $(this).contents().text();
    		$('#button_three').attr('disabled', false); 
    		if (result != '')
    			if (result == 'Err:big')
    				$('#product_type_image').attr('src', '../images/misc/imagebig.png');
    			if (result == 'Err:format')
    				$('#product_type_image').attr('src', '../images/misc/imageformat.png');
    			$('#product_type_image').attr('src', $(this).contents().text());
                            $('#button_three').attr('disabled', false); <==== this is the code not working correctly, or at least as I think it should

    Last edited by paul_wilkins; Apr 13, 2013 at 13:48. Reason: add code tags


Posting Permissions

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