Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By rafael.q.g@hotmail.com

Thread: Javasciprt onclick

  1. #1
    ims
    ims is offline Junior Member
    Join Date
    Sep 2011
    Posts
    1

    Default Javasciprt onclick

    When in the lead, user creates new meeting, I want to add a function to the 'Save' onclick button, but can't for the life of me get this to work, have tried just putting alert('here') in a few places, but with no luck!

    Please help!

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Javasciprt onclick

    Including jQuery in the page and adding your own event handler to that element may be easier.

  3. #3
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: Javasciprt onclick

    To extend the onclick event of save button you can do the follow:

    var inputs=document.getAllElementsByTagName("input")
    for(=0;i<inputs.lenght;i++){
    if(inputs[i].type=="button" && inputs[i].vakue="Save"){
    inputs[i].onclick=yourCustomFunction;
    }
    }

    function yourCustomFunction(){
    // your custom code
    // the code that was on onclick event before
    }
    dkinzer likes this.
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. custom check by onclick=open_popup in subpanel
    By z3r0 in forum Developer Help
    Replies: 0
    Last Post: 2011-04-07, 01:59 PM
  2. Javasciprt not executed on linux(1)
    By nimjec101 in forum Developer Help
    Replies: 1
    Last Post: 2010-12-21, 09:29 AM
  3. custom button onclick
    By shahid971 in forum Developer Help
    Replies: 1
    Last Post: 2010-04-28, 04:40 AM
  4. Enhanced Studio problem with onclick
    By xojins in forum Help
    Replies: 1
    Last Post: 2009-01-07, 08:54 PM
  5. Firefox Select Box onclick issue
    By Beagle in forum Help
    Replies: 4
    Last Post: 2006-07-25, 03:31 PM

Bookmarks

Posting Permissions

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