Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Thumbs down Google Search box - new window

    First I don't javascript, and second I have found that posting in google forums generally does me no good
    My page is http://www.countyfairgrounds.net/iowa/iowa.php - this is a google search box - I need it to open in a new window. So how please do I that? I would be most grateful for the help.
    I am learning java - but I don't see how to fix this now.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,620
    Thanks
    0
    Thanked 645 Times in 635 Posts
    Are you planning on learning JavaScript? Its a very different language from Java so anything you learn in your Java course will probably not be applicable to JavaScript. You'll also need to be careful about what JavaScript course you choose as many still teach the way JavaScript used to be written back in the 20th Century when most people used Netscape as their browser.

    Opening a new window is something best left to the browser owner as they can configure where they want links to open in their browser settings and override it as necessary using the contextmenu.

    To annoy them by trying to limit their options you can use a JavaScript document.open(pageToOpen,windowToOpenIn) call to try to default to opening in a specified window if your visitors haven't disabled that option.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Hi - I actually found a way to do this by spending an hour or more searching on the google search site that is very difficult in of itself
    go look http://www.countyfairgrounds.net/arizona/arizona.php
    I am aware of javascript being different then java. Question , maybe you can answer. Would learning javascript help me with making apps? Cause I don't know - and its hard to get answers to these kind of questions -


  •  

    Tags for this Thread

    Posting Permissions

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