facebook

Dynamically change button text and on-click function?

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #326056 Reply

    Unknown Author
    Participant

    I’m trying to eliminate a button by dynamically toggling between two functions (load & save) using the same button widget — dynamically changing button text and on-click Javascript function.

    Would the code be similar to the image change example?

    $(‘#m1-filename-button1’).attr(‘text_attibute’,(new_text));
    $(‘#m1-filename-button1’).attr(‘on_click_attribute’,(new_javascript_function));

    Any help is very much appreciated!
    -1TC

    #326067

    Unknown Author
    Participant

    Well, I found the low-tech hack solution: Put one button in front of the other and use the “visibility” property 😉
    -1TC

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Dynamically change button text and on-click function?

You must be logged in to post in the forum log in