Welcome Guest, Not a member yet? Register   Sign In
Global form validation callbacks? Staged forms?
#10

[eluser]WanWizard[/eluser]
Like in PHP, in javascript a method is a function... I just showed you a single function as an example, it does contain a lot more functionality.
It doesn't realy matter if you do
Code:
var exitecms = new function() {
    this.base_url = function () {
        return '<?php echo base_url(); ?>';
    };
};
alert( exitecms.base_url() );
or
Code:
var exitecms = {
    base_url: function() {
        return '<?php echo base_url(); ?>';
    }
};
alert( exitecms.base_url() );
the effect is exactly the same. Then, when I need the base_url in a javascript file that is included, I just call the base_url() method of the exitecms object.

As for the extension, I've checked my Form validation extension, and I can't spot any difference between your code and mine. I'm clueless to why this would stop it from working...


Messages In This Thread
Global form validation callbacks? Staged forms? - by El Forum - 09-03-2010, 01:35 PM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 04:23 AM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 04:51 AM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 06:35 AM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 07:22 AM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 08:21 AM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 10:25 AM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 12:21 PM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 12:38 PM
Global form validation callbacks? Staged forms? - by El Forum - 09-04-2010, 04:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB