View Full Version : OnFocus

06-16-2009, 06:10 PM
Hello everyone I was wondering if someone could help me do an OnFocus or just show me where I need to put it because i'm getting totally confused.

onDblClick=""MM_openBrWindow("& EditURL & "?
id= "& rsCONTENT.Fields("FACT_ID").Value &"&seq=" & FACT_SEQ() &"&style="&
'toolbar=yes,location=yes,status=yes,menubar=yes,s crollbars=yes,

The above is what DW wrote me for and now i'm just trying to figure out how to bring that popup page to focus back when the main page is double clicked... thanks

06-17-2009, 05:25 PM
^Is bumping allowed here?

06-18-2009, 03:39 PM
You can put the onFocus after all that code, just make sure you close the attribute you already have with a double quote.

06-18-2009, 05:43 PM
hey domedia thanks for answering but where exactly would you put it and what other code would you need with it to bring the opened browser back to focus? Thanks!

06-19-2009, 03:39 PM
ok so i've been at this wayyy too long.... I have a test page with only this code on it

<script type="text/javascript">
function MM_openBrWindow(theURL,winName,features) { //v2.0
<div id="test" ondblclick="MM_openBrWindow('/testfluid.asp','TestFluid','toolbar=yes,location=y es,status=yes,menubar=yes,scrollbars=yes,resizable =yes,width=800,height=600')">Click on me to open testfluid.asp!!</div>

All I need to know is where to put "window.focus()" so the '/testfluid.asp' page will focus when the ondblclick is double clicked again.

There has to be a way to do this without putting code in the body tag of testfluid.asp.... I did put this on teh testfluid page (i.e the pop up page)

body onUnload=window.focus()

and it worked fine but I'm using templates in DW and can't edit the body tag so I need to figure out how to make the parent window (i.e test.asp) to focus the child page when the dblclick text is dblclicked....