I thought I already set the possibility for a new target to the code 
code, which was not the case... So I added it now (and I once will 
change it to some cleaner code...).

In case you're interested, you need the new
http://svn.pmapper.net/trac/export/1126/trunk/pmapper/javascript/pm_cjs.js

(or the src/uielement.js if you use the uncompressed files)

and define the link like here:

http://svn.pmapper.net/trac/changeset/1127


The approach using JS 'window.open' has the advantage of more 
possibilities to specify the behaviour, and the disadvantage of having 
the browser asking the user if he wants to accept pop-up windows.

armin

On 22/11/2010 15:09, Sypou wrote:
>
> Dear Thomas,
>
> Thank you for your answer.
> It gives me what I needed. Very good idea to add this function because I can
> even manage the specs of the window like the width, height... and so on.
>
> Serge
>
>
>
> Thomas RAFFIN wrote:
>>
>> Maybe you could just call a js function that could do it:
>>
>> - in js_config.php:
>> "linkid:'mywebpage', name:'Mywebpage',
>> run:'your_js_function',imgsrc:'external-c.png'},"
>>
>> - in config/xxx/custom.js:
>> function your_js_function() {
>> window.open('http://www.example.com/');
>> }
>>
>>
>> Le 22/11/2010 13:00, Sypou a écrit :
>>> Dear Thomas,
>>>
>>> Thank you for your answer... Yes I see the link and it works fine. But
>>> what
>>> I need is to make it as an external link, meaning that it opens a new
>>> window
>>> of Internet browser to open my Mypage Website.
>>> Something like target='_blank' in HTML.
>>>
>>> Sorry, maybe my explanation was not clear enough...
>>>
>>> Thank you again,
>>>
>>> Serge
>>>
>>>
>>>
>>>
>>> Thomas RAFFIN wrote:
>>>> Hi,
>>>>
>>>> I've just tested the following lines an it works in pmapper 4.1.1:
>>>>
>>>> /**
>>>>     * Tool link elements
>>>>     */
>>>> PM.linksDefault = {
>>>>        containerid:'toolLinkContainer',
>>>>        links: [
>>>>            {linkid:'link', name:'Link', run:'PM.UI.showMapLink',
>>>> imgsrc:'link-w.png'},
>>>>            {linkid:'print', name:'Print', run:'PM.Dlg.openPrint',
>>>> imgsrc:'print-w.png'},
>>>>            {linkid:'download', name:'Download',
>>>> run:'PM.Dlg.openDownload',
>>>> imgsrc:'download-w.png'},
>>>>            {linkid:'mywebpage', name:'Mywebpage',
>>>> run:'http://www.example.com/',imgsrc:'external-c.png'},
>>>>            {linkid:'help', name:'Help', run:'PM.Dlg.openHelp',
>>>> imgsrc:'help-w.png'}
>>>>            //{linkid:'layers', name:'Layers',
>>>> run:'PM.Plugin.Layerselect.openDlg', imgsrc:'layers-bw.png'}
>>>>
>>>>        ]
>>>> };
>>>>
>>>> Do you seen the link? Does it works?
>>>>
>>>> Thomas
>>>>
>>>> Le 21/11/2010 10:49, Sypou a écrit :
>>>>> Hi all,
>>>>>
>>>>> I use p-mapper 4
>>>>>
>>>>> I would like to know how to create an external link on the menu top
>>>>> left
>>>>> like help, download, ...
>>>>>
>>>>> What I have done is that I added a new tool link element in
>>>>> js_config.php
>>>>>
>>>>> /**
>>>>>     * Tool link elements
>>>>>     */
>>>>> PM.linksDefault = {
>>>>>        containerid:'toolLinkContainer',
>>>>>        links: [
>>>>>
>>>>>           {linkid:'mywebpage', name:'Mywebpage', 
>>>>> run:'http://www.example.com/',
>>>>> imgsrc:'external-c.png'},
>>>>> ...
>>>>>
>>>>> I already tried to add: target:'_blank' but nothing...
>>>>>
>>>>> Thank you for your help,
>>>>>
>>>>> Serge
>>>>>
>>>> ------------------------------------------------------------------------------
>>>> Beautiful is writing same markup. Internet Explorer 9 supports
>>>> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2&   L3.
>>>> Spend less time writing and  rewriting code and more time creating great
>>>> experiences on the web. Be a part of the beta today
>>>> http://p.sf.net/sfu/msIE9-sfdev2dev
>>>> _______________________________________________
>>>> pmapper-users mailing list
>>>> pmapper-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>>>>
>>>>
>>
>> ------------------------------------------------------------------------------
>> Beautiful is writing same markup. Internet Explorer 9 supports
>> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2&  L3.
>> Spend less time writing and  rewriting code and more time creating great
>> experiences on the web. Be a part of the beta today
>> http://p.sf.net/sfu/msIE9-sfdev2dev
>> _______________________________________________
>> pmapper-users mailing list
>> pmapper-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>>
>>
>


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to