You could do the same thing with a small pop-window that you could fully customize.
Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
Use a div that is hidden and then display it when you need it... it can be absolutly positioned on the page so it will in affect hover over your page... Since it is on the same page (document) it is easy to retrieve the info and then hide the div again...
Problems with option 1
This method will not work with netscape...
The positioning can get tricky if the page could be scrolled to various positions...
If you have underlying Select lists they will not "hide" behind your pop-up div automatically... you would have to manually hide them...
Option #2
Pop a new window and size it smaller... then on an event write the values back to the parent window.
If you need to reuse the popup... like if it is a datepicker you can put the parent form #, and object name to set in a querry string and then dynamically write the save function... (see example below)
example
--------------------------
file # 1 (main.htm)
--------------------------
<html>
<head>
<script>
var win;
var nll;
function kill(){
if (!win==nll &&!win.closed()) win.close();
}
function save(){
//var dt;
//var cl = document.all.cal
//dt = cl.month + "/" + cl.day + "/" + cl.year
//opener.document.forms[0].ef_tvarchar_tDate_sRec.value=dt;
// for required fields make not red if filled in or red if not...
//if(opener.document.forms[0].ef_tvarchar_tDate_sRec.ValidationType){
// opener.fixMyStyle(opener.document.forms[0].ef_tvarchar_tDate_sRec);
//}
opener.document.forms[0].stuff.value = document.frm.stuff.value;
opener.focus();
window.close();
}
</script>
</head>
<body>
<form name='frm'>
<input type='text' name='stuff'> <input type='button' value='click me to put text on main page' onclick='save()'>
</form>
</body>
</html>
Whoops... in my haste I forgot to remove the actual code I copied the example from.. so ignore the commented out code...
//var dt;
//var cl = document.all.cal
//dt = cl.month + "/" + cl.day + "/" + cl.year
//opener.document.forms[0].ef_tvarchar_tDate_sRec.value=dt;
// for required fields make not red if filled in or red if not...
//if(opener.document.forms[0].ef_tvarchar_tDate_sRec.ValidationType){
// opener.fixMyStyle(opener.document.forms[0].ef_tvarchar_tDate_sRec);
//}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.