Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open new window and keep on top

Status
Not open for further replies.

Tracey

Programmer
Oct 16, 2000
690
NZ
Hi, [wavey]

I develop isapi applications in delphi, and am not a javascript guru [ponytails].

1. I need some basic javascript to open another window from a form submit button.

2. This window would have its own form and would close once the "save record" button is clicked and processed.

3. I would also like to keep this new window in focus until it is closed.

any help you can offer would be greatly appreciated. [medal]

cheers [gorgeous]



 
ok, slight change in that, since i cant have nested forms, I will need to use a link. currently i have this:

Code:
<a href=&quot;javascript:window.open('/cgi-bin/etime.exe/enterleave?ID=10&driver=4', 'anywhere', 'toolbar=no,location=no, directories=no, status=no, menubar=no, resizable=no, copyhistory=no, scrollbars=no, width=330, height=320');&quot; 
onmouseover=&quot;window.status='Enter leave for this driver'; return true&quot;>Enter Leave</a>

when i click on this link, the window opens ok, but the parent window also seems to try to go there and displays &quot;[object]&quot;.

what have i done wrong? [cry]
 
try using a function. I'm new to javascript too so if it doesn't work don't make bad faces at me ok? I stole it so it doesn't look like exactly what you need, if i changed it i'd probably mess up the syntax, and point you in the wrong direction.

<head>
function enterleave(){
window.open('page.asp?ID=enterleave','','width=300,height=360,status=yes,toolbar=no,scrollbars=yes,resizable=yes,navbar=no');
}

</head>
<body>
<a href=&quot;javascript:browse()&quot;>your link</a>

</body>
 
travmak's function (when enclosed in script tags) should work fine, but I have the same problem as you in keeping a window on top without using showModalDialog and without simply using onBlur=&quot;self.focus();&quot;.......see my thread thread216-281095 --------------------------------

jb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top