Main window redirecting...Shouldn't

R

runsrealfast

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=no,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
 
R

runsrealfast

runsrealfast said:
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=no,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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,829
Latest member
PIXThurman

Latest Threads

Top