[Zope] dynamically passing the id to a javascript function
Peter Bengtsson
mail@peterbe.com
Mon, 20 Aug 2001 11:32:32 +0200
<a tad unpolite>
- Does the javascript stuff work staticly? I mean, completely independent of
Zope or Python or Jim Fulton?
- Does the Zope stuff work properly.
Does:
<dtml-in "objectValues('BasicPage')" sort=sorter>
<dtml-var id><dtml-var title>
</dtml-in>
...return what you expect?
</a tad unpolite>
No offence, but there's many times when you are frustrated that you tend to
mix mistakes.
Perhaps there's a typo in the Javascript?
Perhaps little quotes are your problem::
<script>
alert(<dtml-var "_.str('10')">*10) != alert('<dtml-var
"_.str('10')">'*10)
</script>
> Hello,
> I think this isn't that difficult but after 2 hours I get frustrated!!
> That's the script:
>
> The javascript.function--->>>>
>
> <script language=JavaScript>
> <!--
> function TwoFrames(page)
> {
> parent.frames[3].location.href = page;
> parent.frames[4].location.href = 'fix.html';
> }
> //-->
> </script>
>
> and the links --->>>
>
> <table border="0">
> <dtml-in "objectValues('BasicPage')" sort=sorter>
> <tr>
> <td align='left'><a class='c' href="javascript:TwoFrames(<dtml-var
> id>)"><dtml-var title></a></td>
> </tr>
> </dtml-in>
> </table>
> Instead of passing the id to the Javascript-function as a string the
> Javascript-Interpreter tries
> to evaluate a variable (the id is undefined).I thought that the id is a
> string?? How do I solve this problem??
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>