[Mapbender-dev] using jquery ...

Michael Schulz mschulz at webgis.de
Tue May 15 08:09:26 EDT 2007


Hi Christoph, Marc,

yes, I tried it, but to no avail. Here's a test code snippet:

-------------------------------------
<html><head>
<script type="text/javascript">

i_$ = top.frames["ajax"].window.jQuery;

i_$(document).ready(function() {
        i_$("a",document).background("#f00");
});

</script>
</head>
<body>
<h1>MapBender jQuery Test page</h1>
<a href="http://www.jquery.com">The jQuery library.</a>
</body>
------------------------------------------------------

INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment,
e_element, e_src, e_attributes, e_left, e_top, e_width, e_height,
e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod,
e_target, e_requires, e_url) VALUES('gui1','test_jquery',10,1,'test
jquery','iframe','../frames/mod_testjquery.html','frameborder="1"',980,25,250,200,NULL
,'visibility:visible;','','iframe','','','','','');

Yep, I too think, the jquery mailing list is the next step.

Cheers, Michael


2007/5/15, Christoph Baudson (WhereGroup) <christoph.baudson at wheregroup.com>:
> Did you already try the context parameter Marc mentioned?
>
> imported_$('div.test a', document);
>
> I haven't given this subject enough time for a final conclusion; maybe
> we should contact the jQuery mailing list?
>
> Thanks for sharing
>
> Christoph
>
> Michael Schulz schrieb:
> > Hi,
> >
> > I've been fiddling around with this subject, and I think Christoph is
> > right. jQuery has to be loaded in that frame you want to use it. You
> > can then from that frame, reference elements in another frame and
> > manipulate them. Not the other way round.
> >
> > Cheers, Michael
> >
> >
> >
> >
> > 2007/5/14, Marc Jansen <jansen.marc at gmx.de>:
> >> Christoph Baudson (WhereGroup) schrieb:
> >> > I would be very interested in a solution. I use the jQuery library in
> >> > a separate frame, but want to locate html elements in another iframe.
> >> >
> >> > Until now I didn't succeed. In this example
> >> >
> >> > > imported_$('div.test a').find('span').each(function(i) { ...
> >> >
> >> > the variable imported_$ only *points* to the jQuery library in the
> >> > remote frame, so 'div.test a' will only find the div tags in the
> >> > iframe where jQuery is loaded, and not in the intended iframe. At
> >> > least that is my interpretation ;-)
> >>
> >> Yepp, this might be true. yet one can pass over a context to search
> >> within to the func:
> >> imported_$('div.test a', document);
> >> _______________________________________________
> >> Mapbender_dev mailing list
> >> Mapbender_dev at lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/mapbender_dev
> >>
> >
> >
>
>
> --
> Baudson Christoph
> http://www.wheregroup.com
> _______________________________________________
> Mapbender_dev mailing list
> Mapbender_dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_dev
>


-- 
-----------------------------------------------------------
Michael Schulz
mschulz at webgis.de

in medias res
Gesellschaft für Informationstechnologie mbH

In den Weihermatten 66
79108 Freiburg

Tel  +49 (0)761 556959-5
Fax +49 (0)761 556959-6

http://www.webgis.de / http://www.zopecms.de
-----------------------------------------------------------


More information about the Mapbender_dev mailing list