Hey there.

First of all I need to explain what it is that I am looking for.

But, I should like to take the opportunity to appologise if I have posted a question that someone else may have asked, but as I don't know what you call it, I don't know what to search on. (oh, and I have a feeling it maybe a php question rather than a html question, but not sure, so please forgive if this is in the wrong forum...)

So what am I looking for?

You may have noticed when you go to some web pages there is text that is underlined, these are usually keywords either relating to products or companies, when you roll your mouse over them a small box appears and a description or advert is displayed.

I want to try to use this 'technology' or scripting, what ever you might class it as, so that I can supply context based information, not adverts, I am not asking you to tell me how to bug people with more adverts, I want to be able to create my own list of words for which I can provide links to other related topics for example throughout my own site.

I am guessing that it is probably php rather than html based, but not sure, and I am guessing that it must be dynamic in that all I need to do is call it in the header of each page (for example) and it will look for keywords that match a list of words and descriptions within some kind of text file or array that I have already created.

So, if theres anyone still with me at this point, can you tell me what this 'technology' is called, or even better can you tell me how I might go about creating my own version.

Thanks for any help.

SE

As I know you can do it in two ways:
1. Javascript using onMouseOver then call the script to popup a new windows (you may find problem when someone use browser with popup blocker).
2. CSS to display dropdown menu (don't forget some old browser do not support CSS).

If you only need to display text information for a link or image, you can use title in the tag to show some text. This is most straigtforward and no problem with browser type or version.

Thanks for the tip.

I have scanned the web for tooltips etc, but the one draw back seems to be that I need to add 'onmouseover' tags to each and every instance.

I already have a lot of content, and providing onmouseover tags would be far more work than I want to do (LAZY...)

What I want to do is create a list of keywords, which I can add to over time, these keywords will have descriptions, and possibly a link to a knowledgebase, but the link is not important, and to be honest I might not have the knowledgebase if the tooltips work well.

When a page is called, I want something (I am guessing a php script) to scan the document find any words that match my 'array' of keywords and replace them dynamically so that the php script adds the onmouseover tag so that descriptions etc for words I have added to the array can be displayed as a tool tip.

Any more ideas, or if your idea will do this, could you give me a couple more nudges in the right direction.

Thanks

SE

You may dynamically generate all the link that contain either javascript onmouseover or title placeholde in the link tag. But this mean you need to redesign the all the links in you site.

1. replace link with php call subroutine/function. for example repalce <a href="index.php"> with <?php popout(123); ?> where 123 is the id of the popout text.
2. create the popout function (i.e. popout($key). Query to database for id = '$key', get the location, popout text, _blank/_top etc and finally print the link (with either onmouseover or title placeholder).

Good luck. I never done this, sorry cannot provide script... but would love to have your final script, if you get it :mrgreen:
.

You can dynamically, through JavaScript, provide a global onmousever handler for all links in your document. Hopefully someone else will catch this thread and give you some more pointers, as I'm travelling and just checking in sporadically.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.