12-04-2008, 02:24 AM
|
#4 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
Yep, that's the one! And also reverse the function and function names, as seen below. Hopefully this should get it working, but don't hesitate to re-paste the new code if it still doesn't work.
javascript Code:
/* Don't forget the equals symbol. */ var TalkPHP = { /* This is the RIGHT way. */ MyFunction1: function() { alert('My Function 1'); }, /* Don't forget a comma at the end of a function, before you start another. */
/* This is the WRONG way. */ /* Don't forget the colon after "function" */ function: MyFunction2() { alert('My Function 2'); } /* No need for a comma here unless you're adding another function below it. */ }
Remember: functionName: function() 
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|