D epending on your knowledge of HTML and java scripts, this is an easy two part copy and paste code with minimal reconfigurations. Both sections of code are pasted into the <BODY> section of your document. The first part of the script can be inserted anywhere within the <BODY> section because this is the script itself. The reconfigurations you can do with this part are to cosmetically change the font color and page color to fit in with your pages, the words or BUTTON VALUE of the buttons in the little pop up window and change the height and width values in the pop up window.
Default Section For Cosmetics
(Background Color, Font Color Etc.)
<SCRIPT LANGUAGE="JavaScript">
<!--
function PopIt(label, msg, URLE){
// Set up Page Colors & Table
var DQUOTE = '\"'
var s1 = "<TITLE>" + label + "</TITLE>" +
"<BODY BGCOLOR='FFFFFF'><TABLE BORDER=0><TR>" +
"<TD WIDTH=90% HEIGHT=90 VALIGN=TOP ALIGN=LEFT>"+
"<FONT SIZE=4>"
var s2 = "<FONT COLOR='FF0000'><B>"+label+"</B></FONT><P>"
var s3 = "</TD><TD WIDTH=10%> </TD></TR><TR><TD> </TD>"+
A s you can notice in the above section, the page color (BODY BGCOLOR=) is white FFFFFF and the title on the pop up page is FF0000 red. There is no attribute for text color for the description so it will automatically default to black. In other words, since our pages are black and we reconfigured the pop up for a black page 000000, if we did not add the text color attribute, ( TEXT='1E90FF' ) the description would be black text on a black page. So we had change the text color by adding an attribute into the code for text. Also notice the use of the single apostrophe ' in the attribute.
Reconfigurations For Cosmetics
(Background Color, Font Color Etc.)
<SCRIPT LANGUAGE="JavaScript">
<!--
function PopIt(label, msg, URLE){
// Set up Page Colors & Table
var DQUOTE = '\"'
var s1 = "<TITLE>" + label + "</TITLE>" +
"<BODY BGCOLOR='000000' TEXT='1E90FF'><TABLE BORDER=0><TR>" +
"<TD WIDTH=90% HEIGHT=90 VALIGN=TOP ALIGN=LEFT>"+
"<FONT SIZE=4>"
var s2 = "<FONT COLOR='FF0000'><B>"+label+"</B></FONT><P>"
var s3 = "</TD><TD WIDTH=10%> </TD></TR><TR><TD> </TD>"+
Configurations For BUTTON VALUE of the buttons in the little pop up windowand to change pop up window height and width size.
<TD VALIGN=TOP ALIGN=RIGHT>"+
"<FORM><INPUT TYPE='BUTTON' VALUE='Close'" +
"onClick='self.close()'>" +
"<INPUT TYPE='BUTTON' VALUE='Jump To!'" +
"onClick='window.open("+DQUOTE+URLE+DQUOTE+")'" +
"</FORM></TD></TR></TABLE></BODY>"
popup=window.open("",
"popDialog","height=200,width=300,scrollbars=no")
popup.document.write(s1+s2+msg+s3)
popup.document.close()
T he last part are the links themselves. The second link is a functional link that works exactly as in the script. This is to clarify the reconfigurations a little further.
<A HREF="JavaScript:PopIt('Title On Pop Up Here',
'Description Of Link Here',
'URL To Be Called Here ')">Name Of Link</A><BR>
N
otice in the below section how we wrote the word WERNER'S. Reason being that this script makes us of the single '. By introducing an extra single ' into the script, it does not understand and will cease to function. So you need to pre-empt or prefix it with a \ and then the ' in the added text. This tells the script it is acceptable and will still function.
<A HREF="JavaScript:PopIt('WERNER\'S SECRET PLACE',
'This page will get you the code to add this effect to your pages','http://stud4.tuwien.ac.at/~e9125168/javas/jlinfo.html')">Get Code Here</A></P>
T o add more links into the script, just copy and paste the below code ( reconfigure it) anywhere in the <BODY> section you want this effect to appear.
<A HREF="JavaScript:PopIt('Title On Pop Up Here','Description Of Link Here','URL To Be Called Here ')">Name Of Link Here</A><BR>
S ince the script uses java link access, all links will open in a new browser window as opposed to the same window where you would lose the initial page.
Copyright © Consigliere Ltd., All Rights Reserved. 2001-