Solved

form and new window

Posted on 1999-01-08
3
160 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
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.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

763 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

7 Experts available now in Live!

Get 1:1 Help Now