On Oct 30, 3:01 pm, "Ted Gifford" <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 30, 2008 at 7:54 AM, Martin S. <[EMAIL PROTECTED]>wrote:
>
> > I see your point, thanks for the example.
> > In my case the different div's contain different Google Maps with
> > different locations, markers, etc.,
> > so different methods must be called with different values.
>
> Why not just attach the data to the div?
>
> Line 465 of dev ... googlemap.py:
>   html = tag.div(    [
> +      tag.input ( type="hidden", class="fooinput",
> value="center=%(center)s&zoom=%(zoom)s........") ,
>
> And then your jquery call would be something like
>
> jQuery('.foo').each(function(){
>   var settings = jQuery('.fooinput', this).val();
>   // find one of many implementations online
>   var dict = parsevalues(settings);
>   // new GMaps2(this, dict)
>
> });
Mmmm, nice idea,
but this would move most of the setting parsing from python to
javascript, which I would like to avoid.
All this just to avoid the problems with an ID is a little to much in
my opinion.

Do you know if jQuery code can access somehow the surrounding tag if
it in a 'script' tag (inside an 'div' tag)?
<div class='googlemap'>
 <script type="text/javascript">
  // something like:
   jQuery(....).SurroundingScriptTag().ParentTag()
 </script>
</div>

thanks,
Martin





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" 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/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to