Results 1 to 5 of 5

Thread: Help with customcode!

  1. #1
    RodolfoJesus is offline Member
    Join Date
    May 2009
    Posts
    10

    Question Help with customcode!

    Which the problem of code?
    Code:
    
    0 => array('customCode'=> '<input id="cancel" type="submit" value="'.$GLOBALS['app_strings']['LBL_CANCEL_BUTTON_LABEL'].'"
    name="button" onClick="if(confirm("Você tem certeza que abandonar este cadastro?"))history.back(-1);else()" class="button"'),
    The JavaScript function "confirm ()" is not running.

  2. #2
    hazyumps's Avatar
    hazyumps is offline Senior Member
    Join Date
    Dec 2008
    Posts
    33

    Default Re: Help with customcode!

    Insted of writing the function with an if func right out front y dont u send an alert box; store the input and then run an if..else off of the data retrieved...

    just looks to me like if you can get a popup out of the code w/o having any conditional stmnts there we may could work in to conditions easier

  3. #3
    RodolfoJesus is offline Member
    Join Date
    May 2009
    Posts
    10

    Talking Re: Help with customcode!

    Quote Originally Posted by RodolfoJesus View Post
    Which the problem of code?
    Code:
    
    0 => array('customCode'=> '<input id="cancel" type="submit" value="'.$GLOBALS['app_strings']['LBL_CANCEL_BUTTON_LABEL'].'"
    name="button" onClick="if(confirm("Você tem certeza que abandonar este cadastro?"))history.back(-1);else()" class="button"'),
    The JavaScript function "confirm ()" is not running.
    Resolved!

    I'm creat a function js and called the same in Customcode.
    Result function js:
    Code:
    
    function confirmCancel(){
    	if (confirm("Você tem certeza que abandonar este cadastro?")){
    		history.back(-1);
    		document.NomedoTeuForm.submit();
    	}
    	else{		
    	} 
    }
    
    and result customcode
    Code:
    
    array('customCode'=> '<input id="cancel" type="button" value="'.$GLOBALS['app_strings']['LBL_CANCEL_BUTTON_LABEL'].'"
    name="button" onClick="confirmCancel()" class="button"/>'),
    Thanks people!

  4. #4
    RodolfoJesus is offline Member
    Join Date
    May 2009
    Posts
    10

    Default Re: Help with customcode!

    Hi People!

    My logic Hook stopped working after customcode.

    How using logic hook with?

    My code:
    Code:
    [
    array (
          'buttons' => 
            array (	
    		      0 => array('customCode'=> '<input id="save" type="submit" class="button" value="'.$GLOBALS['app_strings']['LBL_SAVE_BUTTON_LABEL'].'"
    	name="button" />'),		
              1 => array('customCode'=> '<input id="cancel" type="button" value="'.$GLOBALS['app_strings']['LBL_CANCEL_BUTTON_LABEL'].'"
    name="button" onClick="confirmCancel()" class="button"/>'),
    				),
    

  5. #5
    RodolfoJesus is offline Member
    Join Date
    May 2009
    Posts
    10

    Talking Re: Help with customcode!

    Quote Originally Posted by RodolfoJesus View Post
    Hi People!

    My logic Hook stopped working after customcode.

    How using logic hook with?

    My code:
    Code:
    [
    array (
          'buttons' => 
            array (	
    		      0 => array('customCode'=> '<input id="save" type="submit" class="button" value="'.$GLOBALS['app_strings']['LBL_SAVE_BUTTON_LABEL'].'"
    	name="button" />'),		
              1 => array('customCode'=> '<input id="cancel" type="button" value="'.$GLOBALS['app_strings']['LBL_CANCEL_BUTTON_LABEL'].'"
    name="button" onClick="confirmCancel()" class="button"/>'),
    				),
    
    Problem solved!
    Code:
    
    'buttons' => 
            array (	
              0 => 'SAVE',		
              1 => array('customCode'=> '<input id="cancel" type="button" value="'.$GLOBALS['app_strings']['LBL_CANCEL_BUTTON_LABEL'].'"
    name="button" onClick="confirmCancel()" class="button"/>'),
    				),
    
    Thanks People

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with customcode!
    By RodolfoJesus in forum Help
    Replies: 1
    Last Post: 2009-12-30, 02:18 PM
  2. customCode in label
    By Heiner Heinzel in forum Developer Help
    Replies: 3
    Last Post: 2009-11-09, 01:54 PM
  3. 'customcode' => '...'
    By tiagobahi in forum Portugese
    Replies: 9
    Last Post: 2009-04-24, 02:48 PM
  4. customCode listviewdefs.php
    By maxime.lambert in forum Developer Help
    Replies: 1
    Last Post: 2009-04-15, 02:36 PM
  5. customCode possible? Where to put it?
    By Skeeve in forum Developer Help
    Replies: 2
    Last Post: 2008-08-25, 03:03 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
  •