473,796 Members | 2,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open a page from search frame

I have a own search engine in a intranet. It can be opened by the
search button or with the target="_search ".

On the page is a Textbox and a button. The page works well, but just
opens in the wrong frame. I know the frame name I have to use is
"_main" but I dont know how to use it with Javascript.

function search( strKey ) {
var strSearch= document.forms( 0).txtSearch.va lue;
document ??? .location.href= 'ViewPage.aspx? SrchKey=' + strKey +
'&SrchString= ' + strSearch ;
event.returnVal ue = false;
}

Thanks for help
Kojak

Sep 9 '05 #1
5 4038
Kojak wrote:
I have a own search engine in a intranet. It can be opened by the
search button or with the target="_search ".

On the page is a Textbox and a button. The page works well, but just
opens in the wrong frame. I know the frame name I have to use is
"_main" but I dont know how to use it with Javascript.


window.frames["_main"].location.href = ...
Sep 9 '05 #2
Hm thanks, but it's worse as I thought.

That's the way I open the Page in the search frame.
<a href="http://myPage.com/search/left.aspx" target="_search ">Open in
_SearchFrame</a>

And I can open a Link in the "_main" frame
<a href="http://myPage.com/search/index.aspx" target="_main"> Intranet
Suche _Main</a>

But I get an error with
window.frames["main"].location.href= 'NewSearchQuery .aspx'; or
...frames["_main" ]....

Does that

Sep 12 '05 #3
Kojak wrote:
Hm thanks, but it's worse as I thought.

That's the way I open the Page in the search frame.
<a href="http://myPage.com/search/left.aspx" target="_search ">Open in
_SearchFrame</a>

And I can open a Link in the "_main" frame
<a href="http://myPage.com/search/index.aspx" target="_main"> Intranet
Suche _Main</a>

But I get an error with
window.frames["main"].location.href= 'NewSearchQuery .aspx'; or
..frames["_main" ]....


Well I cannot see from your information which frame is in what other
frame. Perhaps the _main frame and _search frame are part of one top
frame? In that case try:
window.top.fram es["_main"].location.href= ...
Sep 12 '05 #4
My problem is I use the IE Standard Button Search for an own search.
Insead of MSN comes my search site.
is like to use a hyperlink with target="_search ". Will open in a
special frame on the left site. When click a button the request should
open in the main frame which is called _main, I tried with normal links
an diffrent target. Only target="_main" opens where I expect it.
But because I want to open another Page in another frame I have to send
to another page with a query string. The best way should be javascript,
but javascript doesn't work with "_main" or "main" I tried the same
script with top or parent and is no problem, except that they opens in
the wrong frame :-(
<input type="submit" name="btnSearch " value="Go" id="btnSearch"
onClick="javasc ript:search( );" />

<script language="javas cript">
<!--
function search( ) {
var strSearch= document.forms( 0).txtSearch.va lue;
window.frames["_main"].location.href= 'SearchQuery.as px?SrchString=' +
strSearch ;
}
//-->

maybe there is a javascript for the activ window or something?

Sep 13 '05 #5
It's ok now, I found a solution, it works with open( link, target );

open( "http://www.google.com" , "_main");

Thanks for help.

Sep 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1451
by: RichardM | last post by:
I have the following HTML page (see bottom of message) that consists of a frame with two windows. The top window is always the menu, and the bottom window is by default a document named "TheDesc.htm". However, if another page is called, I want to display this new page into the bottom frame in place of "TheDesc.htm". My problem is with the third document.write command in the SCRIPT section. document.write('<FRAME...
1
5511
by: Mike R | last post by:
Whenever I try to change the html code below to produce the search results in a frame or new window it always does it always does it in the same window. I assume the problem is it must be specified in the javascript but not sure where to start. Can someone show me the correct way in javascript? thx <html> <head> <title>Quick Search on Multiple Search Engines</title> <script language="JavaScript" type="text/javascript">
2
1943
by: OnLiner | last post by:
I have a site with hundreds of pages. I often get visits from people who have linked to individual pages and not to the main index page. This means that they do not have the correct menu/navigation system to view the rest of the site with. I know how to redirect them to the index page, but that means they then have to search the site for the page they just left. Is there a way using JavaScript to open the page they are currently...
1
1441
by: Dynamo | last post by:
Hi My site uses frames and some of the frame pages are ranked higher in search engine rankings than the main page. When somebody clicks on the link it takes them to the frame page and they don't see my page as it should be viewed plus it displays a javascript error. I need a way using javascript so that when the link is clicked on in either yahoo or lycos that it loads the main frame html page (not the subframe html) and that the...
1
2531
by: cglewis03 | last post by:
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:
2
2179
by: HHAAPPYY | last post by:
Hi I am trying to pass value of the textbox along with another value to the query string. when i am retriving the txtbox value it always shows me null, my senario is like this On my page div_admin.asp i have following things.<% Dim page, content,console,banner,navbar
5
4553
by: YaoBao | last post by:
Is any ColdFusion script I can put on my webpage that will create a search bar so people can type keywords to match it on the current page in my website? It will be exactly like the finder search bar that comes with your browser window, IE; click edit, then find on this page, which brings up the search box. I know that JavaScript can do this. I tried to insert JavaScript to my .cfm page. It doesn't work. Any help will be appreciated. Here...
0
9525
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
10452
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
10221
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...
0
10003
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
9050
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
7546
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
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5569
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
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.