Jump to content
xisto Community
Sign in to follow this  
Trystim

Tooltips need help unfortunately

Recommended Posts

Greetings all, a few posts down under this one you will see a Tooltips mimicing post i have posted.

 

Well after reviewing the posts I found the link tyssen posted to be more along the lines of what i was wanting to accomplish.

 

the page located at

http://tcs.trap17.com/test.html

 

is the page in reference in this post, as you see the example one they gave the 2nd one on the page works flawlessly or at least to the point that I am satisified where as the link above it works well shall we say doesn't work at all rofl.

 

 

The coding for the page is as follows.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/;	<script type="text/javascript" language="javascript" src="/domLib.js"></script>	<script type="text/javascript" language="javascript" src="/domTT.js"></script>	<script type="text/javascript" language="javascript">	var domTT_styleClass = 'domTTOverlib';	</script><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title></head><body><center><br /><br /><br /><br /><a href="test.html" onmouseover="domTT_activate(this, event, 'content', 'Shining Silver Breastplate<p>Binds when equipped</p><p>Chest	Mail</p><p>214 Armor</p><p>+14 Strength</p><p>+6 Stamina</p><p>Durability 120 / 120</p><p>Requires Level 24</p>' 'styleClass', 'niceTitle', 'x', this.offsetLeft + 5, 'y', this.offsetTop + 5);">Shining Silver Breastplate</a><br /><br /><br /><br /><a href="index.html" onmouseover="domTT_activate(this, event, 'content', 'Many weblogs are now sporting this look.<p>i.e. http://blog.codefront.net</p>', 'styleClass', 'niceTitle', 'x', this.offsetLeft + 5, 'y', this.offsetTop + 5);">nicetitles style</a>	</p></body></html>

the .js files are located in the same directory as test.html but yet i can't duplicate the results desired as they have been accompolished with the 2nd link.

 

any help that can be given to help me solve the problem would greatly be appreciated. If you have any further questions as to my set up feel free to ask and i will answer them asap.

 

the domTT is located at the following link, as which i have searched for tutorials and what not to help me try and figure out what I am doing wrong and with no avail.

 

http://www.mojavelinux.com/projects/domtooltip/

thanks again in advance.

Share this post


Link to post
Share on other sites

Just looking...

<a href="test.html" onmouseover="domTT_activate(this, event, 'content', 'Shining Silver Breastplate<p>Binds when equipped</p><p>Chest	Mail</p><p>214 Armor</p><p>+14 Strength</p><p>+6 Stamina</p><p>Durability 120 / 120</p><p>Requires Level 24</p>' 'styleClass', 'niceTitle', 'x', this.offsetLeft + 5, 'y', this.offsetTop + 5);">Shining Silver Breastplate</a>

Shouldnt that be...

<a href="test.html" onmouseover="domTT_activate(this, event, 'content', 'Shining Silver Breastplate<p>Binds when equipped</p><p>Chest	Mail</p><p>214 Armor</p><p>+14 Strength</p><p>+6 Stamina</p><p>Durability 120 / 120</p><p>Requires Level 24</p>' ,'styleClass', 'niceTitle', 'x', this.offsetLeft + 5, 'y', this.offsetTop + 5);">Shining Silver Breastplate</a>

As you can see the 2nd link HAS the , that is missing. Maybe this will solve it
Edited by rogeruk (see edit history)

Share this post


Link to post
Share on other sites

omg guys you rock, that was the issue completly i feel like such a noob now lol, like i told tyssen i gotta stop working on this stuff when i am half asleep. thanks for the help awesome find.

Share this post


Link to post
Share on other sites

Lol not a problem, happens to all of us missing out the all important , or ; in our programming. Then bam the program dont work lol. Spend 2 hours thinking umm this should work, then someone goes hey look you forgot a ; OMG! lol.Happy to help

Share this post


Link to post
Share on other sites

LOL, yup, even the Experts started out as beginners and I don't know anyone who hasn't gotten bit by the Syntax bug.

HTML is forgiving of the white space in the file, so if you are careful, the structure of your html can assist in finding and solving problems. I am going to give you an example using the code you posted above and see if this makes sense to you. You might want to test it on one of your files to make sure it works. Use a page which you know works good and modify the HTML in such a fashion that the missing pieces "jump" out at you.
For example, instead of this code structure on your page:

<a href="test.html" onmouseover="domTT_activate(this, event, 'content', 'Shining Silver Breastplate<p>Binds when equipped</p><p>Chest[tab][/tab]Mail</p><p>214 Armor</p><p>+14 Strength</p><p>+6 Stamina</p><p>Durability 120 / 120</p><p>Requires Level 24</p>' ,'styleClass', 'niceTitle', 'x', this.offsetLeft + 5, 'y', this.offsetTop + 5);">Shining Silver Breastplate</a>
Use something along these lines:
<a href="test.html" onmouseover="domTT_activate(this, event, 'content', 'Shining Silver Breastplate<p>Binds when equipped</p><p>Chest[tab][/tab]Mail</p><p>214 Armor</p><p>+14 Strength</p><p>+6 Stamina</p><p>Durability 120 / 120</p><p>Requires Level 24</p>' ,'styleClass', 'niceTitle', 'x', this.offsetLeft + 5, 'y', this.offsetTop + 5);">Shining Silver Breastplate</a>

Well, the tabs didn't survive on this example, but basically, come up with a structured format that suits the eye and eases the 'compactness' of the code so it is easier to spot things like the missing commas.
Since I don't do javascript, I don't know for sure that the js portions of the example code will work as I have outlined, but try it on a page which you know works and then you can tell us whether the whitespace is allowed or not in javascript.

For the most part, this 'whitespace' is ignored in html. In some places there must be whitespace and in others there can not be whitespace, so there will be some trial and error, but structuring your code will help you find these small syntax errors.
this is easier when handcoding, of course because you input the data. If you are using php or another script to dynamically produce the page there will be a different level of control, but using the carriage return, line feed and tab character strings might help, as will breaking up the output into seperate portions.
On a similar note, use comments throughout the code to explain what each section or line does, or is expected to do, and you will have a better chance of debugging problems in the future. The comments make it easier on you or the person following you to understand what is supposed to be happening inside the code.
Good luck with your project. And I hope this helps.

Share this post


Link to post
Share on other sites

Nice but when it comes down, you can't see the top letters and words. Maybe move it so it pop down, down a little more? Just a suggestion sincew I can't really read the top line. But it looks nice and I will have to try that out. I know very little PHP and this will help me a lot when designing. I bet you could even change the color of the words to match the template.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.