Results 1 to 5 of 5

Thread: Open external web site in a new window from Accounts page

  1. #1
    cvilla is offline Member
    Join Date
    Jan 2009
    Posts
    5

    Default Open external web site in a new window from Accounts page

    Hi,

    Is there someway I can change the code so that the external web site links open in a new browser window from the Accounts page? Currently it opens in the same window where Sugar is. I know you can right click on the link and make it open in a new window. Was wondering if I can change the code myself. If anybody is aware of the file I need to change, I would appreciate pointing that out.

    Thanks.

  2. #2
    daniel.passarini's Avatar
    daniel.passarini is offline Sugar Community Member
    Join Date
    Apr 2006
    Location
    São Paulo - SP / Brasil
    Posts
    80

    Default Re: Open external web site in a new window from Accounts page

    Have you tried a customCode on detailviewdefs.php ?
    I dont know if you can put something like window.open customCode on a link type field.
    Also you can hack include/SugarFIelds/Fields/Link/DetailView.tpl, although its recomended because it's not upgrade safe at all.
    Daniel de Carvalho Passarini

    "Fascinating" - Dr. Spock

  3. #3
    genius786's Avatar
    genius786 is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Karachi, Pakistan
    Posts
    129

    Smile Re: Open external web site in a new window from Accounts page

    Hi cvilla,

    You have to add the following code in customCode I think it may help you what you asked

    PHP Code:
    <a href="http://www.yahoo.com" target="_blank">Click Here</a
    If it is solve your problem then send back your appreciated reply.


    Best regards,
    SARFARAZ AHMED KHAN
    Karachi, Pakistan
    skype: genius_crystal
    genius_crystal@hotmail.com
    92-314-2595624

  4. #4
    letrium is offline Sugar Community Member
    Join Date
    Dec 2008
    Posts
    614

    Default Re: Open external web site in a new window from Accounts page

    Hi,cvilla !

    So you want add field 'website' at Accounts listview. and it must to opens in new window?

    I post an example in few minutes.

  5. #5
    letrium is offline Sugar Community Member
    Join Date
    Dec 2008
    Posts
    614

    Default Re: Open external web site in a new window from Accounts page

    Hi,cvilla !

    It must be at 'custom\modules\Accounts\metadata\listviewdefs.php ' or 'modules\Accounts\metadata\listviewdefs.php'

    PHP Code:
    'WEBSITE' => array(
            
    'width' => '10',
            
    'label' => 'LBL_WEBSITE',
            
    'default' => true,
            
    'customCode'=>' <a href="http://{$fields.website.value}" target="_blank">{$fields.website.value}</a>',
     ), 
    I dont remember if it save websites with http:// in database, if yes you should remove "http://" from customCode.

    Best regards,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. portal - pass user id to external site
    By mikesolomon in forum Help
    Replies: 18
    Last Post: 2009-12-31, 04:38 PM
  2. Replies: 0
    Last Post: 2008-02-01, 11:46 AM
  3. Usability: Open Selected or Open All in new tab/window
    By andydreisch in forum Feature Requests
    Replies: 0
    Last Post: 2007-08-31, 06:29 PM
  4. Open Calendar Task in New Window or Tab
    By JeanetteRoss in forum Help
    Replies: 1
    Last Post: 2007-07-06, 10:42 AM
  5. popup window will not open
    By joealiferis in forum Help
    Replies: 3
    Last Post: 2006-02-06, 08:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •