Today is . Page created 08/23/06
Show Hint In Forms |
This effect will " Not " work if the page is not completely loaded.
Script displays an attractive hint box (that can be customized to fit your site) containing additional explanation on any item on your page. A hint box pops up next to the item when the mouse moves over it with relevant hints or useful information. A classic use of "Show Hint" is with your form fields*, to better explain to the user how to fill them out.
* This example is set up for an input box that you need to incorporate into a valid form. You can modify this to have it for just about anything you want. Further down we will show you where and howto reconfigure it for another use other than with forms.
We have tested the code in IE6.0, Firefox1.5.0.6, Opera9.01, Netscape8.1 and AOL Explorer1.2. This script worked well in all platforms with no variations observed.
For your Information: Before we begin, we feel obligated to advise you that the above form is for all intensive purposes a "Stand Alone" script. In other words, it really does not do much of anything other than what you see. In order to make it function as designed, you need to incorporate it into a valid working form. If you do not have a good Solid Knowledge of HTML coding, javascripts, forms and reconfigurations, please "Do Not Attempt" this until you are Proficient in the aforementioned areas.
Depending on your knowledge of HTML and java scripts, this is an easy, three (3) part copy and paste code with minimal reconfigurations.
CSS <HEAD> Section <style type="text/css"> |
Explanations
|
There is one other reconfiguration that can be made within the <HEAD> section of the code. This is "Not" in the CSS section but in the javascript section at the beginning.
<!---- Reconfigurations <HEAD> Section ---->
<script type="text/javascript"> |
Explanations
|
The next section that can be reconfigured is in the <BODY> section. In the above example, you need to now incorporate the text box(s) into a valid working form. Once done, now you can reconfigure the hint you want to appear on mouseover.
<form>
<b>Username:</b> <input type="text" class="test" /> <a href="#" class="hintanchor"
onMouseover="showhint('Your Hint Goes Here', this, event, '150px')">[?]</a>
Define Above Areas Of Reconfiguration
For example, the cornucopia [?] is a typical emblem of Thanksgiving abundance that dates to ancient harvest festivals.
For example, the cornucopia <a href="#" class="hintanchor"
onMouseover="showhint('Hint Goes Here, this, event, '200px')">[?]</a> is a typical emblem of Thanksgiving abundance that dates to ancient harvest festivals.
Notice we removed from the default the:
<b>Username:</b> <input type="text" class="test" />
<a href="#" class="hintanchor"
onMouseover="showhint('Hint Goes Here, this, event, '200px')">[?]</a>
Little Extra Not Included In The Script: If you noticed in our above [ Popup Example ] the caption for adding images. It can be done but only in a certain way and do not deviate from it or the image will not appear, the script will not work and everything will look nothing like it should.
<a href="#" class="hintanchor" onMouseover="showhint('<img src=Path To Uploaded Image Here border=0 width=? height=? alt=?>', this, event, '200px')">[?]</a>
The <HEAD> section of code (Not The CSS Section) can be made into a .js file and call it from an external location as we have done. If you are unfamiliar with the howto or need a little refresher on this, see below:
If you would like to view our "Source Code" we have it well documented on the external.js file we used in the <HEAD> section. <!------ Start External hint.js File ------> <script type="text/javascript" src="jscripts/hint.js"> <!------ End External hint.js File ------>
</script>
For your Information:
If you would like a full tutorial on howto make an external .js file, grab the below link and you are there. The above five (5) steps are for all intensive purposes the abridged quick method that usually works for most people.
[ Howto Make An External .js File ]
We hope our tutorial was easy to follow and we covered everything in detail. If you would like to add this effect into your pages, grab the respective below link and you are there. If you have any problems with this or anything else, feel free to consult our [ FAQ ] and if you can't find the answer there, [ contact us ].
[ Get Code Here ]
[ Rate This Page ]