Results 1 to 6 of 6

Thread: Timer SugarCRM

  1. #1
    ardn0001 is offline Senior Member
    Join Date
    Jan 2009
    Posts
    52

    Default Timer SugarCRM

    Hi I want add a timer on a textfield, i have the javascript code, i just need how to call it

    Here is the HTML code:

    Code:
    <html>
    <head>
    <script type="text/javascript">
    var timer = null
    
    function start(seconds){
    
        var clock =  seconds
        document.forms[0].display.value = clock
    	seconds ++
        timer = setTimeout("start("+seconds+")",1000)
    }
    </script>
    </head>
    <body onload="start(0)">
    <form>
    <input type="text" name="display" size="20">
    </form>
    </body>
    </html>

  2. #2
    mvngti is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    South Africa
    Posts
    510

    Default Re: Timer SugarCRM

    You could look at using 'customCode' on the field definition.
    Look for samples in modules/*/metadata/editviewdefs.php
    --


    Marnus van Niekerk

    There are only 10 types of people in the world
    those who can read binary and those who don't

    Modules:
    CE Teams - Upgrade safe teams module for Community Edition
    FieldACL - Field Level Access Control for Community Edition
    EditLogicHooks - Create and edit Logic Hooks from the Admin GUI
    FlexibleChartDashlet - Display any data in a Dashlet Chart
    DocumentThumbnails - Thumbnails for Documents module

    Many questions can be answered by reading the Developers Manual

  3. #3
    ardn0001 is offline Senior Member
    Join Date
    Jan 2009
    Posts
    52

    Thumbs up Re: Timer SugarCRM

    Well, i just need add the event onLoad on body tag, but I cannot find the tag ... I tried search it on SugarView.php (includes/MVC/View/) Any Suggestions?

    I was searching for the correct use of the tag customCode and I find a partial solution it was insert into customCode the javascript function(above maxcolumns), and add the customCode for the textfield with the event onClick.
    Last edited by ardn0001; 2009-01-12 at 04:19 PM.

  4. #4
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Timer SugarCRM

    It's also possible to add a javascript file to an editview (look at Accounts/metadata/editview.php).

    Remember to never edit outside of ./custom...
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  5. #5
    letrium is offline Sugar Community Member
    Join Date
    Dec 2008
    Posts
    614

  6. #6
    ardn0001 is offline Senior Member
    Join Date
    Jan 2009
    Posts
    52

    Default Re: Timer SugarCRM

    thank you it works

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 2007-06-05, 12:04 PM
  2. Replies: 2
    Last Post: 2006-06-23, 06:59 PM
  3. Timer
    By appsupport in forum Feature Requests
    Replies: 0
    Last Post: 2006-03-30, 01:38 AM

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
  •