Keep a child window on top

I have searched and tried DOZENS of solutions posted here and can't get them to work.

I open a child window with:

 
var child_win;
function cliedit()
{
var cs=document.getElementById("conno").value;
if (cs=="")
  {
  alert("No Client Selected");
  }
else
  {
 var ok2go=false
 var cs=document.getElementById("conno").value;
 var x=document.getElementById("conno").value;
 var urlstring="?cSearch="+cs;
 child_win=window.open("/cgi-bin/upclient.exe"+urlstring , "Client Data", "toolbar=no,menubar=no,scrollbars=yes, width=800,height=425,resizable=no");
  }  
 }

Open in new window


This pops a new browser window to edit a client record.  I need this window to stay on top until it is closed with it's update record button.  My users are clicking on the parent, it is falling behind and they will open multiple copies and cause me trouble.  

Thanks

Charlie
CharlietnAsked:
Who is Participating?
 
santhimurthydCommented:
You can try with window.showModalDialog which will make sure as the focus is on child window

http://msdn.microsoft.com/en-us/library/ms536759(VS.85).aspx

In your code their is soem variable declaration issue

var child_win;
function cliedit()
{
var cs=document.getElementById("conno").value;
if (cs=="")
  {
  alert("No Client Selected");
  }
else
  {
 var ok2go=false
 var cs=document.getElementById("conno").value;
 var x=document.getElementById("conno").value;
 var urlstring="?cSearch="+cs;
 child_win=window.open("/cgi-bin/upclient.exe"+urlstring , "Client Data", "toolbar=no,menubar=no,scrollbars=yes, width=800,height=425,resizable=no");
  }  
 }

try with this code

var child_win;
function cliedit()
{
var cs_outside = document.getElementById("conno").value;
if (cs_outside == "")
  {
  alert("No Client Selected");
  }
else
  {
 var ok2go=false
 var cs=document.getElementById("conno").value;
 var x=document.getElementById("conno").value;
 var urlstring="?cSearch="+cs;
 child_win=window.open("/cgi-bin/upclient.exe"+urlstring , "Client Data", "toolbar=no,menubar=no,scrollbars=yes, width=800,height=425,resizable=no");
  }  
 }
0
 
CharlietnAuthor Commented:
Is that not for IE only?
0
 
santhimurthydCommented:
take a look in the URL, it's tried in all browser

http://javascript.gakaa.com/window-showmodaldialog-4-0-5-.aspx
0
 
Rajar AhmedConsultantCommented:
i think , you cant do with window.open approach .
probably modal dialog box can be used .

Here's you can use this link as many example is shown,
http://choosedaily.com/1178/15-jquery-popup-modal-dialog-plugins-tutorials/


If your okay With ASP.NET(2.0) AJAX control i can send u demo for u to start ..

Meeran03
justlikethis.png
0
 
CharlietnAuthor Commented:
Thank you and sorry for the delay
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.