Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: hints in wrong place
gleep
Newbie

Posts: 1
Registered: 6/22/2003
Member Is Offline
posted on 6/22/2003 at 06:54 PM Reply With Quote
hints in wrong place


i am using a site with frames. for some reason, the hint box always appears in the top left hand corner of the frame and not next to the mouse cursor. why is this? is it cos i am using frames? how do i stop it?
View User's Profile View All Posts By User U2U Member
Coolbru
Junior Member

Posts: 2
Registered: 7/2/2003
Location: London
Member Is Offline
posted on 7/2/2003 at 11:23 AM Reply With Quote

I'm seeing this as well, however, the hints example works as expected. Then I noticed where the difference is: the demo page lacks a DTD. I removed the DTD from my test page and the hint now appears in the right place. However, that's not much consolation, as a page with no DTD has bigger problems than just hints not working.

I'm using the HTML 4.0.1 transitional DTD. I don't know what's in that DTD that will prevent hints from working, but it's clearly something that doesn't agree with the HTML spec. This happens in all of Safari 1.0, Mozilla 1.4 and IE (both Mac & Win).

Would it be too much to ask for Softcomplex to make sure their pages and scripts pass W3C validation? It would save a huge amount of support I suspect.
View User's Profile View All Posts By User U2U Member
larla
Newbie

Posts: 1
Registered: 7/31/2003
Member Is Offline
posted on 7/31/2003 at 10:53 AM Reply With Quote

i do have the same problem on a page with iframe, but the hints 'jumping' around on the page, meens that they appead in different places every time they show up! can you (softcomplex) estimate the time you will need to find / fix this bug? i really would like to use tigra hints in my project....
View User's Profile View All Posts By User U2U Member
ominobufo
Junior Member

Posts: 2
Registered: 6/10/2004
Member Is Offline
posted on 6/10/2004 at 09:54 AM Reply With Quote
Still wrong position


Hello,

I am trying to use the excellent tigra_hints on my webpage but I am facing the same problem about the position of the hintbox when specifying the doctype of the html document.

Maybe it's something about the css positioning that doesn't work as expected. I have tryed to place a static positioned div box in the page but it is rendered correctly, so it could be some object properties not present in the html dtd specs.

many thanks
View User's Profile View All Posts By User U2U Member
ominobufo
Junior Member

Posts: 2
Registered: 6/10/2004
Member Is Offline
posted on 6/10/2004 at 11:59 AM Reply With Quote
No more wrong position ;)


Hello to everybody,

I got it!

the problem of the hint being placed in top left corner when using a dtd doctype declaration is because the dtd _requires_ the top and left position have as a suffix the px, otherwise it will not work.

so this is the correct version of TTipMove()

function TTipMove (id) {
var n_x = this.x + this.left, n_y = this.y + this.top;

if (this.b_wise) {
var n_w = this.getSize(id), n_h = this.getSize(id, true),
n_win_w = this.getWinSz(), n_win_h = this.getWinSz(true),
n_win_l = this.getWinSc(), n_win_t = this.getWinSc(true);
if (n_x + n_w > n_win_w + n_win_l) n_x = n_win_w + n_win_l - n_w;
if (n_x < n_win_l) n_x = n_win_l;
if (n_y + n_h > n_win_h + n_win_t) n_y = n_win_h + n_win_t - n_h;
if (n_y < n_win_t) n_y = n_win_t;
}
this.divs[id].o_css.left = n_x+'px';
this.divs[id].o_css.top = n_y+'px';
}

hope this helps somebody.

only a question, could you explain what the wise attribute means in the cfg? or better could you write a littel doc?

ciao
View User's Profile View All Posts By User U2U Member
steadman676
Junior Member

Posts: 2
Registered: 8/27/2004
Member Is Offline
posted on 8/31/2004 at 01:29 PM Reply With Quote

was interested to see the last post in this thread as I have been looking for sometime for a solution to the problem with hint positioning when page html includes a DTD reference.

Unfortunately, the suggested solution of adding pz units to the TTipMove function did not work for me. It did, however, encourage me to attempt a solution myself.

After a bit of research on the Internet, I realised the problem is a change in the way MS IE6 handles some properties when it reads a file with a DTD reference. A quick change of all references to 'document.body' to read 'document.documentElement' throughout hints.js solves the problem but I quickly realised the end result was not compatible with earlier versions of IE.

I have therefore amended hints.js to add additional 'if else' loops to capture the different IE options. The end result works but I do not claim it is elegant. It is the best I can do in a short time without reconstructing the whole file.

I attach my revised file, as .txt in order to get through the firewall at this end.

Attachment: hints.txt (5.27kb)
This file has been downloaded 1291 times
View User's Profile View All Posts By User U2U Member
steadman676
Junior Member

Posts: 2
Registered: 8/27/2004
Member Is Offline
posted on 8/31/2004 at 01:29 PM Reply With Quote

was interested to see the last post in this thread as I have been looking for sometime for a solution to the problem with hint positioning when page html includes a DTD reference.

Unfortunately, the suggested solution of adding pz units to the TTipMove function did not work for me. It did, however, encourage me to attempt a solution myself.

After a bit of research on the Internet, I realised the problem is a change in the way MS IE6 handles some properties when it reads a file with a DTD reference. A quick change of all references to 'document.body' to read 'document.documentElement' throughout hints.js solves the problem but I quickly realised the end result was not compatible with earlier versions of IE.

I have therefore amended hints.js to add additional 'if else' loops to capture the different IE options. The end result works but I do not claim it is elegant. It is the best I can do in a short time without reconstructing the whole file.

I attach my revised file, as .txt in order to get through the firewall at this end.

Attachment: hints.txt (5.27kb)
This file has been downloaded 1118 times
View User's Profile View All Posts By User U2U Member
onslo
Junior Member

Posts: 4
Registered: 1/16/2005
Member Is Offline
posted on 1/27/2005 at 09:58 AM Reply With Quote
does this work ?


Hi there....

Same problem as everyone else. When the DTD is omitted it works ok, when it's not the hint appears top left of the screen in Firefox (works fine in IE).

I tried the fixes mentioned in this thread but none of them seemed to work for me.

Can anyone help?

Regards
View User's Profile View All Posts By User U2U Member
Freez
Junior Member

Posts: 3
Registered: 5/20/2005
Location: Netherlands
Member Is Offline
posted on 9/12/2005 at 10:51 AM Reply With Quote

Hello,

I have the same problem. i replace hints.js with the attachement few posts above this. It returns an error: 'TT1' undefinied

I hope someone can help
View User's Profile View All Posts By User U2U Member
thegroover
Newbie

Posts: 1
Registered: 9/14/2005
Member Is Offline
posted on 9/14/2005 at 11:18 AM Reply With Quote
Hints move when page scrolled - IE6


I experienced a manifiestation of this problem where 'hints' moved away from the required location when the page was scrolled (IE6 only). steadman676's revised tv_hints.js script resolved the problems (many thanks!!) though I then had some follow on problems with Firefox and Netscape.

The solution I then implented (.asp project) was to detect the browser type using vbscript and send the orginal or (steadman676) modified tv_hints.js according to the browser type.

i.e. detect browser and set session in global.asa:

ua = Request.ServerVariables("HTTP_USER_AGENT")

if Instr(ua, "MSIE") then
session("br") = "ie"
else
session("br") = "nn"
end if

Add follow call to page:

<SCRIPT LANGUAGE="JavaScript" SRC="/includes/tv_hints_<%= session("br") %>.js"></SCRIPT>

I guess it could all be done in javascript, but my javascript skills aren't up to it! - that's why I use Softcomplex's products.
View User's Profile View All Posts By User U2U Member
dalesmatrix
Newbie

Posts: 1
Registered: 10/17/2005
Member Is Offline
posted on 10/17/2005 at 01:54 AM Reply With Quote

same problem as everyone else, if the DTD is included, hint location is wrong. Tried the other file linked to in this topic without success. Any word of when a fix is going to be released?

Other than that it's a great little piece of code!

Cheers
Dale
View User's Profile View All Posts By User U2U Member
Aliving
Newbie

Posts: 1
Registered: 1/25/2006
Location: UNT, TX
Member Is Offline
posted on 1/25/2006 at 05:34 PM Reply With Quote
Another try at correcting the DTD problem


After reviewing the solutions presented here and everyone's attempts were definitely getting closer. I tried my hand at a solution. I noticed on the reposition code in TTipMove() that a units value was not used when setting the left and top positions.

When the doctype is used in a Gecko based browser, the position must be set in units (20px, not 20). However, many older browsers do not recognize this. So I added a line to check whether or not to add the units value.

Also, I modified the DIV definition of the s_tag value to include the display and float values to ensure default values.

I've attached my attempt. Let me know if it works for you or not.

Adios, Alan

Attachment: hints.js (6.53kb)
This file has been downloaded 1092 times
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 1/26/2006 at 12:38 AM Reply With Quote

Yeah, DTD can cause some headache. The way hints obtain information about window size must be updated too. Check out the article about this at: http://www.softcomplex.com/docs/get_window_size_and_scrollbar_position.html

We'll utilize this solution in next release of the script. Attached is the preliminary version.

Attachment: hints.js (5.28kb)
This file has been downloaded 1101 times
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
 Product Demonstrations Live Demo
Free Download Free Download
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004