473,468 Members | 1,319 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Main window redirecting...Shouldn't

I have a search page that will generate results at the bottom of the
page. As part of the results each item will have a button that will
open a window that will contain a more detailed view of the item and
also an open of editing (if the user has prileges.) I am able to get
the new window to open, however, the search page refreshes back to my
index page. I would like it to stay at its current location, and for
the life of me can't understand why this happens. I know its something
simple that I am missing. This project is a prototype that will
deminstrate to managment how a proposed application might work. Anyway
here is my code.
<script language="JavaScript">
// open a new window

function openWindow()
{
window.open("http://www.someurl.php",
"new","width=480,height=640,toolbar=no,resizable=n o,menubar=no,location=no,status=no,directories=no" );
}

</script>

<form>
<!--a bunch of HTML Sniped-->
</form>
<table summary="results" border="2" cellpadding="2" >
<!--more html-->
<tr>
<td><input type="submit" value="View" onclick="openWindow()" /></td>
<!--Yet more HTML-->
</tr>
Please Help!

Thanks

John

Jan 22 '07 #1
1 1406

runsrealfast wrote:
I have a search page that will generate results at the bottom of the
page. As part of the results each item will have a button that will
open a window that will contain a more detailed view of the item and
also an open of editing (if the user has prileges.) I am able to get
the new window to open, however, the search page refreshes back to my
index page. I would like it to stay at its current location, and for
the life of me can't understand why this happens. I know its something
simple that I am missing. This project is a prototype that will
deminstrate to managment how a proposed application might work. Anyway
here is my code.
<script language="JavaScript">
// open a new window

function openWindow()
{
window.open("http://www.someurl.php",
"new","width=480,height=640,toolbar=no,resizable=n o,menubar=no,location=no,status=no,directories=no" );
}

</script>

<form>
<!--a bunch of HTML Sniped-->
</form>
<table summary="results" border="2" cellpadding="2" >
<!--more html-->
<tr>
<td><input type="submit" value="View" onclick="openWindow()" /></td>
<!--Yet more HTML-->
</tr>
Please Help!

Thanks

John
Nevermind, after I posted I realized my mistake. I had the second
button in the form on my page (even though that not how I posted it). I
guess posting it corectly and looking back at my page I figured it out.

John

Jan 22 '07 #2

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

Similar topics

2
by: Sibylle Koczian | last post by:
Still trying to learn PyQt from a book about several Python GUI toolkits, I seem to learn first what doesn't work. The following small script seems to work, but after closing the window I get the...
1
by: Robert Oschler | last post by:
I know how to load a document into the "Search" panel/sidebar in Internet Explorer. I also know that I can use the "window.opener" property, from the "Search" sidebar document, to change the main...
1
by: Piotr | last post by:
I have popup window (window.open) where I put any value in input field. After submit I wan to to return to the main window and get value from popup window. How to close popup window and return to...
5
by: Hemanth | last post by:
Hello there, I'm running a script that opens a popup window (which is basically a form with checkboxes and a submit button). When I click the submit button I want to run a PHP script and target...
11
by: objectref | last post by:
Hi to all, is there a way to get the window handle of the main window of an application or process ? For example, if someone opens Microsoft Word, he gets a window so he/she can write text....
5
by: Jay | last post by:
I have a situation where the user clicks on a button in a DataGrid to launch a popup window via javascript. In the popup window the user does some things that result in changes to the underlying...
7
by: Jaggu | last post by:
Hi , I need to close main window, once the child window succesfully opens else main window to remain. In my case when I close the main window immediately after the "window.open()" as mentioned...
7
by: joecap5 | last post by:
I have a main window from which I want to open a separate side menu window. I then want to create a list of items on that side menu by clicking on the item names in the main window. So far I am...
3
by: Jimmy | last post by:
It is also possible for popup window to call function in main window by using the opener property. Will "opener.someFunctionInMain(param1, param2)" in the popup window work? It's possible for...
0
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,...
0
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...
1
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...
0
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...
0
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,...
1
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.