Thanks! Any example openlayers page I can work on?
I know have a single html with anchors.  When a user clicks on the
link from the kml it should embed the html below the map going to the
anchored link.

On Mon, Oct 5, 2009 at 3:08 PM, Roald de Wit <[email protected]> wrote:
> Hi,
>
> On 05/10/09 17:28, maning sambale wrote:
>> I have a KMl layer showing links to an external webpages.  What I
>> intend to do is, when a user clicks on the kml polygon and balloon
>> will pop out showing the list of links.  Clicking on a specific link
>> will show an html file from an external webpage below the map as a
>> separate frame within the same page.
>>
>> Any example or code I can tweka and adapt?
>>
>
> There are several ways to do this. I prefer the following: use jQuery
> [1] to change the behaviour of links:
>
>     $('a[href^=http://]').live('click', function(evt) {
>         $(evt.target).attr('target', 'foo');
>     });
>
> In English this means:
> - for every 'a' node that has an attribute 'href' that starts with http://
> - (even newly created ones)
> - do the following:
> - set the target of the link to the name of your (i)frame
>
> (you would need to load jQuery before you can do this)
>
> It would assume you have an (i)frame with the name 'framename' like this:
>
> <iframe name="foo"></iframe>
>
> But, this is just one option. Others might have better suggestions.
>
> Regards, Roald
>
> [1] http://jquery.com/
>
> --
> Roald de Wit
> Software Engineer
> [email protected]
>
> Commercial Support for Open Source GIS Software
> http://lisasoft.com/LISAsoft/SupportedProducts/
>
>
>
> The contents of this email are confidential and may be subject to legal or 
> professional privilege and copyright. No representation is made that this 
> email is free of viruses or other defects. If you have received this 
> communication in error, you may not copy or distribute any part of it or 
> otherwise disclose its contents to anyone. Please advise the sender of your 
> incorrect receipt of this correspondence.
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
>



-- 
cheers,
maning
------------------------------------------------------
"Freedom is still the most radical idea of all" -N.Branden
wiki: http://esambale.wikispaces.com/
blog: http://epsg4253.wordpress.com/
------------------------------------------------------
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to