473,396 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Javascript + css tooltip (problem with DOMs)

Hi,

I've encoutered a problem with javascript. I can read and edit basic java. however I'm working on with a free script that I found on the internet and encountered a problem.

First I'll explain the structure of the site.

main.htm has an empty DIV called 'contentDIV'
clicking on the 'design graphique' calls a javascript to load an external .htm into that specific DIV.

inside that DIV I'll have imgs of my portfolio. I want to have custom-CSS roll-over tooltips for those images. The tooltip is replaced by a DIV called qTIP.

So it's

HTML
-BODY
- - DIV (id=contentDIV)
- - - IMG
- - - DIV (qTip, this is the rollover)


However, I'm having trouble figuring out the coding for DOM-levels. The script was created for use of IMGs on the main BODY. but since my IMGs are located inside a DIV and not on the root document, i can't figure out how to modify the script to look inside contentDIV for the nodes to read and etc.

here's my web site :

http://www.frerejacques.ca/reboot8/

here's a working example with everything located on the root BODY :

http://frerejacques.ca/reboot8/workingtooltip.htm

here's the javascript file :

http://www.frerejacques.ca/reboot8/qTip2.js

I tried contacting the creator of the script but he hasnt responded at all.

Thanks in advance if anybody can give me advice to this JS rookie.
Jun 11 '07 #1
3 1381
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

Instead of
Expand|Select|Wrap|Line Numbers
  1. document.getElementsByTagName("BODY")
try
Expand|Select|Wrap|Line Numbers
  1. document.getElementById("contentDIV")
Jun 11 '07 #2
Thanks for the suggestion. But still no luck.

Here is a better example of what might be going wrong :

http://frerejacques.ca/reboot8/index5.htm

i think its the fact that a script loads in the HTML content of an external site into the DIV that screws everything up. I think its acting as if the browser doesnt think those images exist at all. Check the Source once you click on "design graphique" and you'll see nothing changed.

i tried forcing the external file to run the script however, it seems to ignore everything outside the BODY tag.

any ideas?
Jun 11 '07 #3
acoder
16,027 Expert Mod 8TB
Thanks for the suggestion. But still no luck.

Here is a better example of what might be going wrong :

http://frerejacques.ca/reboot8/index5.htm
That link doesn't work, but when I checked the previous link, it seems to work?

i think its the fact that a script loads in the HTML content of an external site into the DIV that screws everything up. I think its acting as if the browser doesnt think those images exist at all. Check the Source once you click on "design graphique" and you'll see nothing changed.
The reason why the source doesn't change is that you're using Ajax to load the content.
Jun 12 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

17
by: Ian | last post by:
Hi there, Can anybody tell me where I can find a standards documents like you have in c#. I am trying to write javascript and would like to know what standards are i.e. Where to put the...
11
by: :o) | last post by:
Does anyone know a (better) way to automatically adjust "newspape style" columns to window-resize? See old discussion o stylesheets-forum:...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
5
by: ZildjianB | last post by:
Hi All, I hope you can help me with this, as I have done some exhaustive searching over the past couple days and cannot find a solution. What I am trying to do is dynamically update an image...
4
by: Rusty | last post by:
Hi, I've seen something on a web site that I want to do for our Intranet web site. I'm not advocating pop-ups but for our company app, this would be perfect. Please go to this page and hold...
5
by: John Dolinka | last post by:
I am trying to change a tooltip on an asp.net (framework 2) textbox with out a post back to the server. I can access many of the textbox properties and change them but not the tooltip. Below is a...
10
by: MichiganMan | last post by:
This is a program to just calculate a weekly gross salary based on the hourly wage and hours worked (with overtime too). I am not getting the alert box when it calculates it. Can anyone see what I...
6
by: john | last post by:
I have the following textbox setup with Text & ToolTip Bindings as follows; I'm using Visual Studio 2008 VB: <asp:TextBox ID="txtDay1" runat="server" Text='<%# Eval("Day1") %>'...
19
by: maya | last post by:
hi, so what is "modern" javascript?? the same as "DOM-scripting"? i.e., editing content (or changing appearance of content) dynamically by massaging javascript objects, html elements, etc? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.