Robin Haswell schrieb:
>> In my limited experience some web pages I couldn't figure out any other
>> way then to generate javascript on the page. If this was a limitation of
>> javascript, my knowledge or my time, it didn't really matter.
>>
>
> In my fairly large experience of JavaScript, you only *really* need to
> generate JS when you need to
> include page-specific data structures in your JS. I don't believe there are
> any other cases where JS
> needs to be generated. The long-term solution to this is fetching your
> structures with XMLHTTP with
> window.onload, but I think for now embedded JSON is fine.
>
> -Rob
>
> >
>
>
If I have some content specific javascript data I usually abuse an event
handler like this:
<a class="transform" href="/nonjslink" onclick="return {foo: 1, bar:
'xxx' };">foo</a>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---