Wrox Programmer Forums
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 22nd, 2003, 10:37 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default make a HTML Help file

Dear all: I wanna make a help for my App in Compiled HTML Help format. Any idea?!??!
Any help appreciated.


Always:),
Hovik Melkomian.
__________________
Always,
Hovik Melkomian.
 
Old December 27th, 2003, 11:32 AM
Authorized User
 
Join Date: Oct 2003
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This will give you a help box pop up when the user places their mouse over the words you choose to have a help message on...

Place this <STYLE TYPE="text/css">
<!--
#dek {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}
//-->
</STYLE> between the <HEAD> </HEAD> tag of your Web page.

Next, place this <DIV ID="dek"></DIV>

<SCRIPT TYPE="text/javascript">
<!--

//Pop up information box II (Mike McGrath ([email protected], http://website.lineone.net/~mike_mcgrath))
//Permission granted to Dynamicdrive.com to include script in archive
//For this and 100's more DHTML scripts, visit http://dynamicdrive.com

Xoffset=-60; // modify these values to ...
Yoffset= 20; // change the popup position.

var old,skn,iex=(document.all),yyy=-1000;

var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all

if (ns4)
skn=document.dek
else if (ns6)
skn=document.getElementById("dek").style
else if (ie4)
skn=document.all.dek.style
if(ns4)document.captureEvents(Event.MOUSEMOVE);
else{
skn.visibility="visible"
skn.display="none"
}
document.onmousemove=get_mouse;

function popup(msg,bak){
var content="<TABLE WIDTH=225 BORDER=1 BORDERCOLOR=black CELLPADDING=2 CELLSPACING=0 "+
"BGCOLOR="+bak+"><TD ALIGN=center>"+msg+"</TD></TABLE>";
yyy=Yoffset;
 if(ns4){skn.document.write(content);skn.document.c lose();skn.visibility="visible"}
 if(ns6){document.getElementById("dek").innerHTML=c ontent;skn.display=''}
 if(ie4){document.all("dek").innerHTML=content;skn. display=''}
}

function get_mouse(e){
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollL eft;
skn.left=x+Xoffset;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollT op;
skn.top=y+yyy;
}

function kill(){
yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ns6||ie4)
skn.display="none"
}

//-->
</SCRIPT> anywhere in the <BODY> </BODY> of your web page. (Notice the TABLE WIDTH=225 in this scripte, as you can change this to make the message box any width you wish.

Then place this around the word(s) you wish to show a help message on <a href="javascript:void(0)" ONMOUSEOVER="popup('Your help message goes here','lightyellow')"; ONMOUSEOUT="kill()">Your words go here</a>

Note: you can change the background color of the message box from "lightyellow" (as it shows above) to any color you wish and you can also change the color of the text by changing the font color="#ff000"> (which is shows above) to any color you wish.

Larry:D











Similar Threads
Thread Thread Starter Forum Replies Last Post
convert HTML File to PDF file in vb.net gaurikhot .NET Framework 2.0 4 June 16th, 2014 02:33 AM
How do I make a Help File? chobo2 C# 2005 1 November 13th, 2007 05:36 AM
make html button default sansircar ASP.NET 1.0 and 1.1 Professional 1 October 23rd, 2006 04:25 PM
XSLT to make multiple hyperlinked HTML files dai.hop XSLT 1 January 11th, 2006 03:05 PM
make a HTML Help file melvik C# 1 December 23rd, 2003 07:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.