You have to output the data for the Dictionary from the PHP script via a
JavaScript script. In a simple PHP script which creates your index file, put
in something like:
echo "<script language='javascript'>var user = {\"fname\":
\"Firstname\", \"lname\": \"Lastname\"};</script>'";
and then in the onModuleLoad, show the data with:
Window.alert(Dictionary.getDictionary("user").get("fname" +
" " + Dictionary.getDictionary("user").get("lname"));
I haven't tested that, but you get the idea.
The disadvantage is that the data is visible in the index page (or findable
in a cached js file if you are using a js file like I do for a dynamic menu
structure and have a line like:
echo "<script language='javascript' src='menu.js'></script>";
Just don't pass any sensitive data this way, just pass 'welcome' data and
preferences and any setup parameters. The user should know it though, and
anyone using that computer will be logged in automatically anyway, but you
don't really want to leave it lying around in browser cache files or worry
any user who knows how to view | source in the browser.
If you can't get the above code to work, let me know and I'll send you
something I've actually tried :-)
Ian
http://examples.roughian.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---