View Single Post
Old 12-04-2008, 01:58 AM   #2 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

I don't see how that can work in any browser, if that's the exact code you're using. You're missing curly brackets, and also the function syntax for those classes are wrong. The syntax is as so:

javascript Code:
var TalkPHP =
{
    MyFunction1: function()
    {
        alert('My Function 1');
    },

    MyFunction2: function()
    {
        alert('My Function 2');
    }
}

TalkPHP.MyFunction1();
TalkPHP.MyFunction2();

Are you certain that's the precise code that you're using?
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote