473,698 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

In page search option - open new window

2 New Member
Hello,

I am trying to build a search form with several different options to choose from. Currently it is set up to open within the same window if a single option is selected and open within a frameset if the "ALL" option is selected.

Is there anyway to get the results to open in new windows?

So if the user were to select the "ALL" option, is it possible to open 3 new windows with each result displaying?

Here is my code:

<script language="JavaS cript" type="text/javascript">

function DoSearch() {
var Flag = 0;

if (document.ToolB ox.SearchOption[0].checked==true) {
var Flag = 1;
var Engine = document.ToolBo x.SearchOption[0].value;
var Query = document.ToolBo x.SearchBox.val ue;
var locName = "http://search.info.app le.com/?search=Go&lr=l ang_en&kword=&t ype=&newstype=& q=";
if (Query == "") {
alert("Please enter a search term");
return;
}
location.href = (locName + Query)
}

if (document.ToolB ox.SearchOption[1].checked==true) {
var Flag = 1;
var Engine = document.ToolBo x.SearchOption[1].value;
var Query = document.ToolBo x.SearchBox.val ue;
var locName = "http://appletricks.com/forum/search.php?val= ";
if (Query == "") {
alert("Please enter a search term");
return;
}
location.href = (locName + Query)
}

if (document.ToolB ox.SearchOption[2].checked==true) {
var Flag = 1;
var Engine = document.ToolBo x.SearchOption[1].value;
var Query = document.ToolBo x.SearchBox.val ue;
var locName = "http://discussions.app le.com/search.jspa?sea rch=Go&q=";
if (Query == "") {
alert("Please enter a search term");
return;
}
location.href = (locName + Query)
}

if (document.ToolB ox.SearchOption[3].checked==true) {
var Flag = 1;
var Engine = document.ToolBo x.SearchOption[2].value;
var Query = document.ToolBo x.SearchBox.val ue;
if (Query == "") {
alert("Please enter a search term");
return;
}

var searchPage = "<HTML>";
searchPage += "\n";
searchPage += "<FRAMESET ROW=\"100%,100% ,100%\">";
searchPage += "\n";
searchPage += "<FRAME SRC=\"http://search.info.app le.com/?search=Go&lr=l ang_en&kword=&t ype=&newstype=& q=" + Query + "\">";
searchPage += "\n";
searchPage += "<FRAME SRC=\"http://appletricks.com/forum/search.php?val= " + Query + "\">";
searchPage += "\n";
searchPage += "\n";
searchPage += "<FRAME SRC=\"http://discussions.app le.com/search.jspa?sea rch=Go&q=" + Query + "\">";
searchPage += "</FRAMESET>";
searchPage += "\n";
searchPage += "</HTML>";
document.write( searchPage);
}

</script>


<form name="ToolBox" style="line-height: 2em;">
Enter search term(s): <input type="text" name="SearchBox " size="22">
<br>
<input type="radio" name="SearchOpt ion" value="kbase">K nowledge Base
<br / >
<input type="radio" name="SearchOpt ion" value="idf">Int ernal Discussion Forum
<br / >
<input type="radio" name="SearchOpt ion" value="cdf"> Consumer Discussion Forum
<br / >
<input type="radio" name="SearchOpt ion" value="all"> All
<br / >
<button type="button" onclick="DoSear ch();">Search</button>
</form>

Thanks in advance.

Cglewis03
Apr 9 '07 #1
1 2523
acoder
16,027 Recognized Expert Moderator MVP
Use window.open.
Apr 11 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2609
by: Matthew Robinson | last post by:
i wrote a search page for my site (searching through a mysql database) but when i type in more than one word (eg "item three") in the search field it gets passed to the page as a single word ("item"). Are there any workarounds for this? the code is below.( houseproudlancs.co.uk/search.php ) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4
1719
by: JP SIngh | last post by:
I have three dropdowns in one of my asp page. Each dropdown does return a huge amount of records , 5000 to be precise. The huge amount of data makes the page slower to load and also makes it extermly diffcult for users to choose one value from the list. Does someone have a better solution to implement this? I guess one of the things that I am keen on is to have a textbox (readonly) and a pop up window to allow users to search for a...
5
3647
by: Alan | last post by:
While not rs.eof <td><%=rs("InvoiceNo")%></td> <td><%=rs("Name")%></td> <td><a href="InvoicePrint.asp?WInv=<%=rs("InvoiceNo")%>"></a></td> <td>Print this invoice</td> rs.MoveNext Wend Now user needs to click the link to open the invoice, and then select File--Print from the menu to print it out, and then return back to print
2
1854
by: Bill S. | last post by:
Hey, I am trying to figure this out. The hyperlinks on my page open up a small popup window. I have no reason to refresh the parent page or what have you. I was living in a very happy world, with no problems or disturbances. However, a problem has since arisen: The search engines have indexed these popup pages. So, you load them, but there are no links on them, and there is no parent page. Many people would not check out the url and...
3
8785
by: jj | last post by:
Hi NG I have a form, where I can activate the search and replace dialogbox when pressing a button. My problem is that the dialogbox opens with the default that it should search for full match only, and I want it to open with default "a part of field". The VBA used is:
8
2047
by: Someone | last post by:
Hi, I wish to use a dictionary.com search box and want the results of a search to open in a new window. Is there a way to do this using their code? The copy and paste code is provided below. Thanks for any help? <form method="get" action="http://dictionary.reference.com/search"> <table border="0" cellspacing="4" cellpadding="4" bgcolor="#0033ff"> <tr> <td valign="middle" align="left">
1
9363
by: colleen1980 | last post by:
Hi: Can any one please tell me that how to i pass the two textbox values in the new page. If i use the form action in the popup window page then the new page is open in the same popup window as i need to open the new page in the main page window with passing the two textbox parameters into the new page. Program opens the new page but dont know how to pass the two textboxes values into the new page name deceasedToday.asp Needs help in...
3
3286
by: Aaron | last post by:
I'm trying to parse a table on a webpage to pull down some data I need. The page is based off of information entered into a form. when you submit the data from the form it displays a "Searching..." page then, refreshes and displays the table I want. I have code that grabs data from the page using cURL but when I look at the data it contains the "Searching..." page and not the table that I want. below is the code i have so far....Thanks...
2
2590
by: Richard | last post by:
Help please. I am trying to autofill a form text field from a select-box lookup. I have no problem doing this if the select-box is part of the form but because there are 5 possible select boxes for them to choose from and because of the very large number of options in each select box, to save form loading time, I want to put the look-up select boxes on separate (pop-up) pages. (I prefer them not to be hidden divs on the same page) ...
0
8600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9155
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9018
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8858
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7711
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3038
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.