John Ramsden
|
| Posted: 01/28/2003, 3:52 AM |
|
Simple question, and probably a simple answer - In CCS, how do I code
a pop-up help text window, so the user can click on a link and then
either position, minimize, or dismiss the resulting window without
affecting the main page they are working on.
(I could code a whole new help page; but then I'd have to save all the
user's form input in session variables etc when they clicked on the link
to that page, and in any case a replacement page wouldn't readily allow
the user to have the help window visible while they typed data in the
main form.
I know my way pretty well round the three types of CCS screen, namely
Design, HTML, and Code. But nothing obvious presents itself.
Thanks in anticipation.
Cheers
John Ramsden (john_ramsden@sagitta-ps.com)
|
|
|
 |
RonB
|
| Posted: 01/28/2003, 9:37 AM |
|
onclick="window.open('{sys_melder_Src}', 'sub', 'toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=no, HEIGHT=490, WIDTH=490, left=80, top=50'); return false"
create the link as you usualy do wuth CCS then go to the html code and add the above right after the <a tag at the start of the link. remember to change{sys_melder_Src} into the equivelent of the code CCS produced for your link. Now each link will open in a popup. By setting some no's to yes and playing around with the height and width values you can change the look and functionality of the popup.
Ron
|
|
|
 |
sonny
|
| Posted: 01/28/2003, 2:00 PM |
|
How do you lock it as always on top? So that you can add info to your current form and read the pop.
|
|
|
 |
RonB
|
| Posted: 01/28/2003, 3:20 PM |
|
I looked around for a bit and found this one. The code goes in the target page(ie the page that is supposod to be shown in the popup:
in the <head> section:
<script language="JavaScript">
var OnTop = true;
function ChangeOnTop()
{
if (OnTop) OnTop = false;
else if (!OnTop)
{
OnTop = true;
self.focus();
}
}
function FocusMe()
{
if (OnTop) setTimeout("self.focus()",250);
}
</script>
Put this in the body tag of the target window:
onBlur = "FocusMe()";
Hope it's usefull
Ron
|
|
|
 |
John Ramsden
|
| Posted: 01/29/2003, 3:31 AM |
|
Very many thanks, Ron, That works a treat (almost - see below).
I did a Google search on 'changeontop javascript', and a little birdie
told me you obtained some of the information from the following, from
a site which it looks well worth any web developer bookmarking:
http://www.webreference.com/javascript/960826/windows.html
Seems like there's a slight snag with the 'always on top' code though:
If one is in an input form on the page containing the pop-up link then
once the pop-up is open, one can't type any input!
Cheers
John Ramsden
|
|
|
 |
|