![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| JavaScript JavaScript are you needing help with functions in your script, free help is offered here for all JavaScript problems so if you have an JavaScript error in your code just ask. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| On click of a button i open a window. I am trying to set focus to the window if that window is already opened. I am stuck as to what i am missing. The name of the window is "ShipRec" so i would assume it would be ShipRec.focus() ; but i get an error. Im missing something. Can anyone help ? Thanks, Miro Example function OpenScreenWindow(cScreenToShow) { if( cScreenToShow == "PMXParts" ) { window.open('PMX/Parts.htm','ShipRec','height=625px,width=920px,too lbar=no,directories=no,status=no,menubar=no,scroll bars=no,resizable=no,modal=yes'); //Code Required Here }} | |||
|
| Advertisements |
| | #2 | ||
| Miro said the following on 2/7/2006 2:34 PM: > On click of a button i open a window. I am trying to set focus to the > window if that window is already opened. I am stuck as to what i am > missing. You are missing a Reference to the window and the name of a window is not a reference to that window. > The name of the window is "ShipRec" so i would assume it would be > ShipRec.focus() ; but i get an error. Correct. > Im missing something. Can anyone help ? > > Thanks, > > Miro > > Example > > function OpenScreenWindow(cScreenToShow) > { > if( cScreenToShow == "PMXParts" ) > { > window.open('PMX/Parts.htm','ShipRec','height=625px,width=920px,too lbar=no,directories=no,status=no,menubar=no,scroll bars=no,resizable=no,modal=yes'); //Code Required Here }} myWindow = window.open(....); myWindow.focus(); -- Randy comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/ | |||
|
| | #3 | ||
| Thank you, that worked. I knew i was close... but couldnt quite figure it out. Thanks agian, Miro "Randy Webb" <HikksNotAtHome@aol.com> wrote in message news:K4qdneQTVvdlgXTenZ2dnUVZ_tidnZ2d@comcast.com. .. > Miro said the following on 2/7/2006 2:34 PM: >> On click of a button i open a window. I am trying to set focus to the >> window if that window is already opened. I am stuck as to what i am >> missing. > > You are missing a Reference to the window and the name of a window is not > a reference to that window. > >> The name of the window is "ShipRec" so i would assume it would be >> ShipRec.focus() ; but i get an error. > > Correct. > >> Im missing something. Can anyone help ? >> >> Thanks, >> >> Miro >> >> Example >> >> function OpenScreenWindow(cScreenToShow) >> { >> if( cScreenToShow == "PMXParts" ) >> { >> >> window.open('PMX/Parts.htm','ShipRec','height=625px,width=920px,too lbar=no,directories=no,status=no,menubar=no,scroll bars=no,resizable=no,modal=yes'); >> //Code Required Here }} > > myWindow = window.open(....); > myWindow.focus(); > > -- > Randy > comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly > Javascript Best Practices - > http://www.JavascriptToolbox.com/bestpractices/ | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: focus, window |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Replacing RDS5000 in Ford Focus | Paul | Car audio | 1 | 06-18-2007 4:50 PM |
| Focus C-Max Ghia CD 6000 Removal | cnews | Car audio | 2 | 06-18-2007 4:50 PM |
| Aux input on Focus/C-Max 6000CD unit | robh | Car audio | 0 | 06-18-2007 3:40 PM |
| What CD changer to add to a focus 5000RDS? | dmc | Car audio | 3 | 06-17-2007 2:12 PM |
| Featured Websites | ||||
|