facebook

Target "_blank" in google map problem [CLOSED]

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #343959 Reply

    Yann
    Member

    Hello,
    i have a Map widget in my project.
    In bottom of this map there a link “term of use”. If i click on this link i haven’t possibilities to return back, because this link will open in the same window of my map.
    i tried without success to add this code

    $('#map1').on('click', 'a', function(e){
        e.preventDefault();
        window.open($(this).attr('href'), '_blank');
    });    

    thanks for your help
    Yann
    EDIT : i found a solution if you have the same problem:

    $('[id$=map1]').on('click', 'a', function(e){
        e.preventDefault();
        var GoogleUrl=$(this).attr('href');
        $(this).attr('href', $(this).data('href'));
        var browserOptions = {
            showLocationBar: false, 
            showAddress: false, 
            patchWindowClose: true, 
            showNavigationBar: true };
    
    var browser = 
        phoneui.showURL(GoogleUrl,'_blank', browserOptions);
            
        
    });    
Viewing 1 post (of 1 total)
Reply To: Target "_blank" in google map problem [CLOSED]

You must be logged in to post in the forum log in