Results 1 to 1 of 1

Thread: Customizing size of new windows that links r opened in.

  1. #1
    chrisky is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Trondheim, Norway
    Posts
    293

    Default Customizing size of new windows that links r opened in.

    Currently when an web address such as http://www.Whatever.com is typed in and as part of the Description portion of a bug (or the description portion of any other module), then that address is automatically displayed as a clickable web link.

    The problem is that this web link is opened in a new window which was full size/screen.
    It is not apparent to the [most] user(s) that they are no longer in the same browser window, thus leaving them confused as to how to go 'back' (backwards) to their previous screen/page (Sugar) from this new and external (non SugarCRM page) site they visited.

    The solution I have is to open the new window with a size smaller than that of 'full screen' thus making it obvious/apparent to the user that they now have a new web browser window open of which can be closed using the little x at the top right corner among the other methods of closing a window/program.

    I am prioritizing some other items this evening and thus putting this on a back burner, but the 20 mins I spent working on it, including this documenting things in order to finish this later.

    The javascript code in which will accomplish this is as follows:

    var newwindow;
    function newcustomsizedexternallinkwindows(url)
    {
    newwindow=window.open(url,'name','height=750,width =550');
    if (window.focus) {newwindow.focus()}

    a href="java script:newcustomsizedexternallinkwindows('whatever TheFilenameOrAddress.html');

    Some coding will need to be done in include/utils.php and some in the display view template as well (insertion of script code).
    Last edited by chrisky; 2006-10-01 at 04:03 AM. Reason: Spelling

Thread Information

Users Browsing this Thread

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

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
  •