JavaScript - How To Update The Inline Html Tooltip Script?
Hello, everyone...
I have this problem that is really bugging me. I am trying to implement this script found in Javascriptkit: http://www.javascriptkit.com/script/...ltooltip.shtml It has a very unique feature of grabbing arbitrary HTML tags and attaching tooltips to them. Priceless to my site. But the problem is, the script only works with jQuery up to 1.2.6... after that version, it stops working entirely. Quite an issue, as you can imagine. It also has some issues with browsers other than Firefox that I hope updating the code might fix. I don't have any lead on this... could anybody look into the code and tell me what's wrong? Thank you, Similar Tutorialshello i wanted to add HTML Tooltip script to my website and if i done all what instructions told then that worked with links only is possible to make it work with a image links? i made image with paint so the quality is bad :P There are some VERY similar questions and answers, but I have been unable to get them to work for me. The simple situation is calculate days since a date with JS, and output it as part of a text line: create variable xxx with subtraction, or datediff() <body> <p>XYZ has been in effect for (xxx) days.</p> </body> Nothing more, & thanks. Reply With Quote 01-17-2015, 03:40 PM #2 sunfighter View Profile View Forum Posts Senior Coder Join Date Jan 2011 Location Missouri Posts 4,830 Thanks 25 Thanked 672 Times in 671 Posts When I have a question about javascript I go to w3schools JavaScript Tutorial or MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript. FYI datediff() is not an official JS function. What I normally do is get the date as a UTC number (millsecs after an old date) do the math and then convert back. Code: <!DOCTYPE html> <html lang="en"> <meta charset="utf-8" /> <head> <title></title> </head> <body> <div id="her" style="clear:both;"></div> <script type="text/javascript"> var d1 = new Date("january 01, 2015"); var d2 = new Date(); var work = d2.getTime() - d1.getTime(); var xxx = Math.round(work/86400000); document.getElementById("her").innerHTML = 'XYZ has been in effect for '+xxx+' days.'; </script> </body> </html> The number 86400000 comes from 1000*60*60*24 to convert millisecs to days Hi, I have what is probably a stupid issue. I have a select box that is being filled by an an ajax request to a SQL DB and returns the results in a select box. That part works fine. The second part of the request is that i also want my inline html to change results if i change my selection. that part is not working. I tried to put my onchange event into the option in php, but that doesn't return anything either. $display_string .= "<option onchange=\"getSoftwareUpdate();\"> $row[Software] </option>"; clear as mud? Any help would be much appreciated! //this section gets the results from the php script and returns back the values in the db. <script language="javascript" type="text/javascript"> <!-- //Browser Support Code function getSoftwareFunction() { var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Please contact Trinity Help Desk at ext. 88817"); return false; } } } // Create a function that will receive data sent from the server ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ var ajaxDisplay = document.getElementById('ajaxDiv'); ajaxDisplay.innerHTML = ajaxRequest.responseText; } } var SoftwareName = document.getElementById('results').value; var ManufacturerName = document.getElementById('results').value; var VersionName = document.getElementById('results').value; var InstallLocationName = document.getElementById('results').value; var queryString = "?Software=" + SoftwareName + "&Manufacturer=" + ManufacturerName + "&Version=" + VersionName; + "&InstallLocation=" + InstallLocationName ajaxRequest.open("POST", "getSoftwareName.php" + queryString, true); ajaxRequest.send(null); } </script> //this next part i want to return the results based on an onchange event in the select option <script language="javascript" type="text/javascript"> <!-- //Browser Support Code function getSoftwareUpdate() { var ajaxRequest1; // added try{ // Opera 8.0+, Firefox, Safari ajaxRequest1 = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest1 = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest1 = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Please contact Trinity Help Desk at ext. 88817"); return false; } } } //added // Create a function that will receive data sent from the server ajaxRequest1.onreadystatechange = function(){ if(ajaxRequest1.readyState == 4){ var ajaxDisplay1 = document.getElementById('ajaxDiv1'); ajaxDisplay1.innerHTML = ajaxRequest1.responseText; } } //end add var Software = document.getElementById('results').value; var SoftwareName = document.getElementById('results').value; ajaxRequest1.open("POST", "getSoftwareName1.php" + SoftwareName, true); ajaxRequest1.send(null); } </script> <html> <div id='ajaxDiv1'></div> <div id='ajaxDiv'> <select id='results' onchange="getSoftwareUpdate();" name="Software"> </select> </div> </html> </td> hi, all... haven't found exactly the solution here, and trying to cobble something together but it's just not working. php is doing the heavy lifting in terms of generating the code, but the upshoot is i have a script: Code: <script type="text/javascript"> var values[1] = "This layout includes a 'title' and 'body' content block."; var values[2] = "This layout features everything included in the Standard Page layout as well as a 'comments' block."; function replaceText( var_id) { document.getElementByID(pageLayout_replace).innerHTML = values[var_id]; } </script> and a select box: Code: <fieldset> <legend>Page Layouts</legend> <label for="pageLayout" class="half left">Choose a page layout<br /> <select name="pageLayout" id="pageLayout" size="5" onChange="replaceText(this.options[this.selectedIndex]);"> <option value="1">Standard Page</option> <option value="2">Standard Page w/Comments</option> </select> </label> <label class="half right"> Page Layout Description:<br /> <span id="pageLayout_replace">Click on a page layout title to the left to get a description here.</span> </label> </fieldset> however, the error console in firefox says Code: Error: missing ; before statement Line: 14, Column: 8 Source Code: var values[1] = "This layout includes a 'title' and 'body' content block."; and then when i try to select one of the items, Code: Error: replaceText is not defined Line: 1 any insight? thanks in advance! Hello All, I'm working on a project which requires a small portion from a large table of information to be displayed on a webpage (sort of like a magnifying glass). The display will be a table of fixed size (m by n cells). Some of the cells will be merged. When the table updates, different sets of cells may be merged. It needs to be coded in HTML5, which I assume includes the use of JavaScript and CSS (The specs of this is rather unclear at the moment, so I'm going to cover all bases). Anyhow, looking through the HTML5 and JavaScript tutorials, I found two ways to solve this problem. One way would be to have a script to parse out the relevant information, and have it output into a table (dynamically generating the HTML required). The second way would be to have the script draw the table on its own in a canvas. User events (such as arrow keys on the keyboard) will change the position of the focus (move the magnifying glass in a cardinal direction). I hit a small snag with the first solution - Is it possible to update the table on the page (including changing the structure of it) without having to refresh? If you could point me to a relevant tutorial or example on the web, I'd greatly appreciate it. hi the title pretty much says it but il go into a little more deph, im looking for a piece of script that i can insert into my masterpage which will fetch the year from the server and display it on the footer. just to save our company updating the dates each year. cheers, ant. Hi, i have some users picture in a page that is coming from database with php mysql_fetch_array function. what i want to do it, When mouse moves to any user's picture then then a small box should appear with that user's profile information with ajax and when mouse moves out it should disappear. and the box position should be with the mouse. please give me some sample code Anyone got any idea why this script won't work in IE (crap)? Working example (FF): http://martynleeball.x10hosting.com/tooltip.htm Code: function obj_position(obj,id) { //Setup variables to hold position values var left = top = 0; if (obj.offsetParent) { do { //Get position values and put in variables left += obj.offsetLeft; top += obj.offsetTop; } while (obj = obj.offsetParent); } //Get alt content for tooltip var alt_message = document.getElementById(id).getAttribute('alt'); return left+","+top+","+alt_message; } function display_tooltip(obj) { //Get the elementID first var elmID = obj.id; //First of all get the position data for current element //Also get the message to be displayed- contained in the alt var pos_mess = obj_position(obj,elmID); //Now splitup the returned string to get the lef _position, right //position and the message to be displayed var part = pos_mess.split(","); //Create variables for the parts var left_pos = part[0]; var top_pos = part[1] - 18; var message = part[2]; var container = document.getElementById('tooltip_container'); var newdiv = document.createElement('div'); newdiv.setAttribute('id','tooltip'); newdiv.className = 'tooltip_style'; newdiv.innerHTML = message; //Position div newdiv.style.position="absolute"; newdiv.style.top=top_pos+"px"; newdiv.style.left=left_pos+"px"; //Append newly created div to container container.appendChild(newdiv); } function delete_tooltip() { var container = document.getElementById('tooltip_container'); var old_div = document.getElementById('tooltip'); container.removeChild(old_div); } Is it possible to prevent the tooltip that appears when mousing over an image from appearing? This is without removing the alt or title tags.
I have a the following code for displaying a tooltip: Code: <a style='margin-left: 10px; position:relative' class="tooltip" title="This is some text to display"> The javascript for the tooltip is as follows: Code: $(document).ready(function(){ $("a.tooltip").live( { mouseenter: function(e){ this.t = this.title; this.title = ""; $("body").append("<p id='tooltip'>"+ this.t +"</p>"); $("#tooltip") .css("top",(e.pageY - 10) + "px") .css("left",(e.pageX + 20) + "px") .fadeIn("fast"); var css_width = $('#tooltip').width(); var text_width = $('#tooltip').textWidth(); if (css_width > text_width) { $('#tooltip').width(text_width); } }, mouseleave: function(){ this.title = this.t; $("#tooltip").remove(); } } ); }); $.fn.textWidth = function textWidth() { var html_org = $(this).html(); var html_calc = '<span>' + html_org + '</span>'; $(this).html(html_calc); var width= $(this).find('span:first').width(); $(this).html(html_org); return width; } What I want to do is to be able to add another variable 'width' to be able to set the width of the tooltip like so: Code: <a style='margin-left: 10px; position:relative' class="tooltip" width="100" title="This is some text to display"> This width will then be passed into the javascript above and used to set the width of the tooltip. How can I modify the above code to do this?? Thanks Hi, I am using a tooltip that uses the following javascript Code: <script type="text/javascript"> $(document).ready(function() { //Tooltips $(".tip_trigger").hover(function(){ tip = $(this).find('.tip'); tip.show(); //Show tooltip }, function() { tip.hide(); //Hide tooltip }).mousemove(function(e) { var mousex = e.pageX - 90; //Get X coodrinates var mousey = e.pageY - 400; //Get Y coordinates var tipWidth = tip.width(); //Find width of tooltip var tipHeight = tip.height(); //Find height of tooltip //Distance of element from the right edge of viewport var tipVisX = $(window).width() - (mousex + tipWidth); //Distance of element from the bottom of viewport var tipVisY = $(window).height() - (mousey + tipHeight); if ( tipVisX < 90 ) { //If tooltip exceeds the X coordinate of viewport mousex = e.pageX - tipWidth - 90; } if ( tipVisY < 90 ) { //If tooltip exceeds the Y coordinate of viewport mousey = e.pageY - tipHeight - 90; } //Absolute position the tooltip according to mouse position tip.css({ top: mousey, left: mousex }); }); }); </script> As you can see I have set its X position at -90 and y position at -400 so that It could be displaying well when the mouse is hover over a link and it do appear well in the testing page http://bloghutsbeta.blogspot.com/201...slidernav.html If you put your mouse over ALEX in 'A' category BUT from the same test site but in different location from above here http://bloghutsbeta.blogspot.com/201...ting-main.html if you put your mouse over ALEX under 'SIMULATION' category then you will see that the tooltip is way down. Not even that the tooltip moves away if the screen resolution changes. I changed value again and again but didn't reach any conclusion, can someone help me with this issue as what to do to fix it? Note: If you require a complete markup please let me know in comment, I considered it not required that's why I didn't added it to my post ^^ Hi all, I am fairly new to javascript and finaly found a tooltip script that I want to use. (man there is a lot of them out there). I got it to work no problem and the editing is real easy. The problem is that it is a tool tip for a text link. Would like to know if it is possible to use this with an image that is linked to a site. The script and code is at http://www.javascriptkit.com/script/...ltooltip.shtml The part that I think needs editing is Code: <a href="http://www.javascriptkit.com/dhtmltutors/ajaxticker/index.shtml" rel="htmltooltip">RSS Ajax Ticker</a> Either that or the other part in the body section Code: <!--Inline HTML Tooltips (DIV with class="htmltooltip"--> <!--Matched up with anchor links with rel="htmltooltip" and in the order they appear within page's source--> Thanks in advance for any help in this. Scott hi! i would just like to say first of all, that i only use forums for help unless i've exacerbated all other forms of help as i am such a javascript noob! so please bear with my while i try to explain my problem... i've isolated the javascripts to this page > http://nang-nang.net/tumblr/blog/help.html in this example the plant image is using lightbox 2 and the bird.gif is using prototip2 to create a tooltip (that displays my latest tweet) (i should mention that these scripts will be used to pimp out my tumblr blog/portfolio http://bubblejam.tumblr.com eventually) the problem: i need the tooltip to stay put! i've managed to put the bird in a <div style="position:fixed..." etc so that's fine. but the tooltip isn't fixed and moves as the page scrolls down! can anyone take a look at what javascript i've got so far and fingers crossed there's a simple solution! thanks!! I'm trying to use Zeroclipboard http://code.google.com/p/zeroclipboard/ to copy stuff to the clipboard and add a tooltip when the mouse hover on the flash. but it doesn't seem to be working. my html code: Code: <div rel="<?php echo $url;?>" class="cp-code">copied code</div> <div class="test" style="display: none; border: 1px solid #ccc; padding: 8px;">click copy,test,test</div> My js code: i have added the jquery library. Code: ZeroClipboard.setMoviePath("http://example.com/js/ZeroClipboard.swf"); var clip = null; var url = ''; function init() { clip = new ZeroClipboard.Client(); clip.setHandCursor( true ); $('.cp-code').mouseover( function() { clip.setText(this.innerHTML); $('test').style.display = 'block'; if (clip.div) { clip.receiveEvent('mouseout', null); clip.reposition(this); } else { clip.glue(this); } clip.receiveEvent('mouseover', null); url = $(this).attr('rel'); }); clip.addEventListener('mouseUp', function(client) { window.open(url); }); clip.addEventListener('mouseOut', function (client) { $('test').style.display = 'none'; }); } $(document).ready(function() { init(); }); Hi I would like to use javascript to control what tooltip displays when a tab is rolled over depending on which tab was clicked. Code: <li id='1tab_1a' class='selected'><a id='1link_1a' title="Customer Info Screen"><span >Customer Info</span></a></li> <li id='1tab_1b' ><a id='1link_1b' title="Order Detail" ><span>Order</span></a></li> <li id='1tab_1c' ><a id='1link_1c' title="Phone Detail" ><span>Phone: 7093521232</span></a></li> For example when the Customer Info tab is selected I would like the tooltips to be like above but when Order is the tab selected I would like the tooltip to say Customer Info Detail, Order Detail Screen, and Phone Detail. How could I use an onclick event to control what tooltip is being displayed depending on which tab is selected? I have about 20 sets of customer info and sometimes not everyone contains all of the tabs and I would also like to be able to add more customers. http://www.panic.com/coda/ If you put ur mouse over Download a fancy jquery pops up! I wud want the same popup but flip the image around so its below the mouse pointer not above, the CSS is confusing me can some1 tell me how do i fix that issue? Thanx I was wondering if I could get some help in something. I am working on my church's website, and I previously implemented something called "Reftagger" onto the new website: http://www.logos.com/reftagger It "converts" any bible verse into a hyperlink as well as a tooltip. I thought that this was a neat idea, and wanted to do the same with the Westminster Larger (and Shorter) Catechism as well. Anytime it says "WLC Q58" (for example) I want it to automatically display that specific question and answer. So far, I simply have a basic tooltip and a hyperlink inserted for every WLC Q: http://covenantrpc.freehostia.com/covenant/sermons/ (just look at the page source and you'll see what I did). Then I have the tooltip.js file: http://covenantrpc.freehostia.com/co...ons/tooltip.js What I want to do is create some sort of definition library or glossary. One where it tells the webpage that every time the webpage says "WLC 58" it will be automatically converted into a hyperlink and tooltip, just like Reftagger. Hi. I'm very new to creating webpages. I came across this guide for making tooltips online (here's the link:http://sixrevisions.com/tutorials/ja...cript_tooltip/) I love the look of the tooltip. The problem I'm having is, when I scroll down, the tooltip stays at the top of the page. Does anyone have any idea why? I have had trouble with this problem for a while and I'm open to all suggestions. My problem is one of reference and of appending children to the body of the document. What I am trying to do is calculate the height of a tooltip div so that I can position it vertically away from the mouse dynamically based on where the mouse is while it is still over the link. I have a list of anchors set in an unordered list and they have a tooltip attribute: tooltip="tooltip info goes here". Code: initToolTips = function(){ var anchors = document.getElementsByTagName("a"); for(var i = 0; i < anchors.length; i++){ var tip = anchors[i].getAttribute("tooltip"); if(!tip) continue; var divHolder = document.createElement("div"); var divTop = document.createElement("div"); var divMid = document.createElement("div"); var divBot = document.createElement("div"); divHolder.className = "tooltip"; // color:#333; divTop.className = "tooltiptop"; // background:url(...) ; divMid.className = "tooltipmid"; // background:url(...) repeat-y; divBot.className = "tooltipbot"; // background:url(...); divHolder.appendChild(divTop); divHolder.appendChild(divMid); divHolder.appendChild(divBot); var atts = divHolder.style; anchors[i].onmouseover = function(e){ divMid.innerHTML = e.target.getAttribute("tooltip"); document.body.appendChild(divHolder); alert(divHolder.style.height); //divHolder is } anchors[i].onmousemove = function(e){ var ie = (document.all); if(ie){ atts.marginLeft =(event.clientX) + "px"; //atts.marginTop = (event.clientY - divTop.style.height - divMid.style.height - divBot.style.height) + "px"; } else{ atts.marginLeft = (e.pageX) + "px"; //atts.marginTop = (e.pageY - divTop.style.height - divMid.style.height - divBot.style.height) + "px"; } } anchors[i].onmouseout = function(e){ document.body.removeChild(divHolder); } } } The initToolTips function is called from a window.onload. The problem is that in the onmouseover function i cannot get to the height attribute of the div anymore, I have had people tell me that the reference is gone when the function ends so I cannot use the divHolder variable like that. I have also had people tell me that I cannot reference height values when the object does not exist yet. To me it looks like the div tooltip object exists after the onmouseover function but i cannot obtain a reference to it. I have thought about setting an attribute of the anchor tag the creates the div like offsetToolTipY='divHolder.style.height'; but i can't get a reference of the height outside of the onmouseover function because it hasn't been appended to the document yet. The only other thing I could think of was to setup the div completely and set the display:none; attribute and then append it to the document (all outside of the onmouseover function). And then the onmouseover function would only set the display:inline; but again this did not work because for some reason it still does not have the height information. here is the code for that example: Code: wren.initToolTips = function(){ var anchors = document.getElementsByTagName("a"); for(var i = 0; i < anchors.length; i++){ var tip = anchors[i].getAttribute("tooltip"); if(!tip) continue; var divHolder = document.createElement("div"); var divTop = document.createElement("div"); var divMid = document.createElement("div"); var divBot = document.createElement("div"); divHolder.className = "tooltip"; divTop.className = "tooltiptop"; divMid.className = "tooltipmid"; divBot.className = "tooltipbot"; divHolder.appendChild(divTop); divHolder.appendChild(divMid); divHolder.appendChild(divBot); var atts = divHolder.style; atts.display = "none"; document.body.appendChild(divHolder); anchors[i].onmouseover = function(e){ divMid.innerHTML = e.target.getAttribute("tooltip"); atts.display = "inline"; //alert(divHolder.style.height); //alerts nothing } anchors[i].onmousemove = function(e){ var ie = (document.all); if(ie){ atts.marginLeft =(event.clientX) + "px"; //atts.marginTop = (event.clientY - divTop.style.height - divMid.style.height - divBot.style.height) + "px"; } else{ atts.marginLeft = (e.pageX) + "px"; //atts.marginTop = (e.pageY - divTop.style.height - divMid.style.height - divBot.style.height) + "px"; } } anchors[i].onmouseout = function(e){ atts.display = "none"; } } } I can't get any height information from the dynamically created div at all. Any Help is immensely appreciated. Thank You. -Jon I'm using custom javascript tooltips to show information about designs in a t-shirt shop, such as design name and artist. I downloaded the code and CSS for the tooltips and am attempting to assign the tooltip to each design using a javascript array and a for-in loop. Only problem is that the tooltips aren't showing at all, no matter what I do. I think the problem is related to the onmouseover event that I'm using, but the only thing that seems to work even partway is changing the visibility to "show" in the CSS. From that I can see that the text is being assigned to the tooltips properly and that they are being positioned within the window, but the onmouseover event is having no effect either way when I revert the visibility back to "hidden." Help! Here is the code for the "toolTip.js" file: Code: // Extended Tooltip Javascript // copyright 9th August 2002, 3rd July 2005, 24th August 2008 // by Stephen Chapman, Felgall Pty Ltd // permission is granted to use this javascript provided that the below code is not altered function pw() {return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth}; function mouseX(evt) {return evt.clientX ? evt.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft) : evt.pageX;} function mouseY(evt) {return evt.clientY ? evt.clientY + (document.documentElement.scrollTop || document.body.scrollTop) : evt.pageY} function popUp(evt,oi) {if (document.getElementById) {var wp = pw(); dm = document.getElementById(oi); ds = dm.style; st = ds.visibility; if (dm.offsetWidth) ew = dm.offsetWidth; else if (dm.clip.width) ew = dm.clip.width; if (st == "visible" || st == "show") { ds.visibility = "hidden"; } else { tv = mouseY(evt) + 20; lv = mouseX(evt) - (ew/4); if (lv < 2) lv = 2; else if (lv + ew > wp) lv -= ew/2; lv += 'px';tv += 'px'; ds.left = lv; ds.top = tv; ds.visibility = "visible"; } } } Here is the relevant code where I attempt to assign the event to the tooltip visibility change. Note the syntax in SetLinks() function, where the onclick behavior is set. This syntax is working perfectly here. I modelled the 'controlPopUp() syntax similarly, but no go. Code: window.onload = function() { creationCompleteHandler(); } function creationCompleteHandler() { calcNumDesigns(); setLinks(); controlToolTip(); } function calcNumDesigns() { var numDesignBoxes = designImages.length; var numGalleryRows = Math.ceil( numDesignBoxes / 3 ); for ( n = 0 ; n <= numGalleryRows - 1 ; n++ ) { var newGalleryBox = document.createElement('div'); var newGalleryBoxID = ("galleryRow" + n); newGalleryBox.setAttribute('id',newGalleryBoxID); newGalleryBox.setAttribute('class',"galleryBox"); document.getElementById('content').appendChild(newGalleryBox); squareOff(newGalleryBox); var rowBoxes; if ( ( numDesignBoxes - ( n * 3 ) ) < 3 ) { rowBoxes = ( numDesignBoxes - ( n * 3 ) - 1 ) } else rowBoxes = 2; for ( m = 0 ; m <= rowBoxes ; m++ ) { var boxNum = ( n * 3 ) + m; var newDesignBox = document.createElement('div'); var newDesignBoxID = "design" + boxNum; newGalleryBox.appendChild(newDesignBox); newDesignBox.setAttribute('id',newDesignBoxID); newDesignBox.setAttribute('class',"designBox"); var newDesignImg = document.createElement('img'); var newDesignImgID = "designImg" + boxNum; newDesignImg.setAttribute('id',newDesignImgID); newDesignImg.setAttribute('class',"designImage"); newDesignImg.src = designImages[boxNum][0]; newDesignBox.appendChild(newDesignImg); var newDesignTip = document.createElement('div'); var newDesignTipID = "tt-design" + boxNum; newDesignTip.setAttribute('class',"tip"); newDesignTip.textContent = designImages[boxNum][2] + " Artist: " + designImages[boxNum][3]; newDesignTip.innerText = designImages[boxNum][2] + " Artist: " + designImages[boxNum][3]; newDesignBox.appendChild(newDesignTip); } } } function squareOff(frame) { document.getElementById(frame.id).style.height = ((document.getElementById(frame.id).offsetWidth) * .33) + 'px'; } function setLinks() { for (var x in designImages) { document.getElementById("design"+x).onclick = new Function( "sendToURL(" + x + ")" ); } } function sendToURL(x) { var url = designImages[x][1] MM_goToURL('self',url); return document.MM_returnValue; } function MM_goToURL() { //v3.0 var i, args=MM_goToURL.arguments; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'"); } function controlToolTip() { for (var x in designImages) { var currTip = "tt-design" + x; document.getElementById( "design" + x ).onmouseover = "controlPopUp( event , " + x + ")"; } } function controlPopUp( evt , x ) { var e = evt; var currTip = "tt-design" + x; popUp( e , currTip ); } Here is the CSS: Code: .tip { font:10px/12px Arial,Helvetica,sans-serif; border:solid 1px #666666; width:270px; padding:1px; position:absolute; z-index:100; visibility:hidden; color:#333333; top:20px; left:90px; background-color:#ffffcc; layer-background-color:#ffffcc; } Thanks in advance for your help! |