Jul 26, 2008

Tooltips - need help unfortunately

Free Web Hosting, No Ads > CONTRIBUTE > The Internet > Website Discussion

free web hosting

Tooltips - need help unfortunately

Trystim
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
CODE
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.

CODE


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <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.

CODE

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


thanks again in advance.

 

 

 


Reply

rogeruk
Just looking...

CODE

<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...

CODE

<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

 

 

 


Reply

jlhaslip
QUOTE
Dang, I noticed that too. Rogeruk is on the job. Good Catch!

Reply

Trystim
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.

Reply

rogeruk
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

Reply

jlhaslip
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:
CODE

<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>

Use something along these lines:
CODE

<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>


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.

Reply

wild20
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.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. domtt_activate - 19.21 hr back. (2)
  2. xhtml whitespace onmouseover - 102.67 hr back. (1)
Similar Topics

Keywords : tooltips


    Looking for tooltips

Searching Video's for tooltips
advertisement



Tooltips - need help unfortunately



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE