Solved

form and new window

Posted on 1999-01-08
3
161 Views
Last Modified: 2010-04-09
how can i make a forms results open in a new window? I have a page that i use for my start page, i want to be able to have search engines direct on to it like the yahoo one, and have the search results open in a new window so my page can stay there the whole time without other pages taking that window. how do i do this??

-Daniel
0
Comment
Question by:th_c_man
  • 2
3 Comments
 

Accepted Solution

by:
jkeebler earned 20 total points
ID: 1841507
Put this between <head> and </head> at the top of the page:

     <script>
     <!--
          function search() {
                  newwindow = open("", "newwindow", "width=300,height=100,status=no,toolbar=no,menubar=no,scrollbars=no");
      //-->
     </script>

Then put this in the document (uses Yahoo for an example):

      <form method="GET" action="http://search.yahoo.com/bin/search" target="newwindow">
      <input type="text" name="p" value="" size=18>
      <input type="submit" name="name" onClick="search()">
      </form>

Hope this helps.
0
 

Author Comment

by:th_c_man
ID: 1841508
SO the key bit there being that I can specify a TARGET for the form results?

Let me try something, and I'll get back.
0
 

Author Comment

by:th_c_man
ID: 1841509
Ok. I've got what i wanted to work....

All i did was add
TARGET="_blank"
to the <form> tag and now it's ok.

Thanx anyway,

Daniel
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now