Results 1 to 3 of 3

Thread: Google Calendar Window Open Bookmark

  1. #1
    Join Date
    Nov 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Google Calendar Window Open Bookmark

    I've made a script for a bookmarklet to open Google Calendar in a toolbarless popup window to save screenspace.

    This is what I've got:

    Code:
    javascript:window.open('http://www.google.com/calendar/render?pli=1','Google Calendar','width=screen.width,height=screen.height,top=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100,left=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100,scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes')
    However, after clicking on it (the popup window works fine), the active tab/window changes to a page with address of the javascript and content "[object Window]". I know its possible to stop it doing this with something like
    Code:
    return false;
    but it seems to stop the script from running.

    Anyone have any ideas?

    Thanks

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Try it with:

    javascript:void( code here )

    That should stop the problem you are having and, as long as it is valid code otherwise, it will do what you want it to do.

    Returning false is for events that have a default return behavior that you want to avoid, like clicking on a link will switch to the href, selecting text will highlight it and make it available for copying. As far as I know, a bookmarklet has no default return anyway.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Nov 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That seemed to work, thanks!

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
  •