JavaScript - Wz_tooltip: Need To Center Tip Top Of Screen
I have been using wz_tooltip and have a big tooltip that needs to be opened at the top of the screen, not by the cursor in order to be read. What do I add to the script to do this?
Thanks, Wina Similar TutorialsI have a popup(telerik radwindow) which is in iframe.And i wnt that popup to be opened at the center of the screen and not at the center of iframe. If I scroll the page it should reamain at the center of the screen. Thanx in advance I am able to align the tooltip using the offset command, but would like to align the tooltip to open in the upper left of the screen. How can I do this? Thanks, Wina I want to have a screen (50% transparent white) pop up over an image on rollover with a button that, when pushed, will swap the image with a different one. Anyone know the easiest way to do this. The image is in a scrolling bunch of images similar to this: http://kellyperso.com
I use a program that produce a graphic (imagine a sinusoid, more or less). There is no opportunity to obtain from the program an output of the coordinates of the points of this curve. I desperately tried a way to achieve this, for example using a program that transform a normal raster image in a vector, and after read the vector, but all this is not precise nor accurate. I wonder if there is a way to obtain this result. Bye Hi I have the code below which geocodes a postcode and returns a lat a long value. Its standard code from Google maps. I just want to print these values to a screen. I tried document.write(value) but this produces nothing. Any help would be greatly appreciated. Code: <script type="text/javascript"> var localSearch = new GlocalSearch(); function usePointFromPostcode(postcode) { localSearch.setSearchCompleteCallback(null, function() { if (localSearch.results[0]) { var resultLat = localSearch.results[0].lat; var resultLng = localSearch.results[0].lng; } document.write(resultLat+resultLng); //alert("Latitude: " + resultLat + "\nLongitude: " + resultLng + " q"); }); localSearch.execute(postcode + ", UK"); } </script> TIA Stew All- I have a page coded that pulls files from a directory using PHP then sets them up using a Flash type player to stream the video. My problem is that I have to resize the video window for each computer I play it on. They all have different resolutions. I was able to use: Code: <script type="text/javascript" src="/jwplayer/swfobject.js"></script> <script type="text/javascript"> var x = (+screen.width); var y = (+screen.height); if (x == '1920' & y == '1080') { var xn = 1440; var yn = 900; document.write(xn); document.write(yn); } if (x == '1024' & y == '600') { var xn = 900; var yn = 400; document.write(xn); document.write(yn); } swfobject.registerObject("player","9.0.98","/jwplayer/expressInstall.swf"); </script> To pull out the current Resolution of the user and pass to a variable the resolution I want the video to be. Here is where the video code is Code: <object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="900" height="400"> <param name="movie" value="/jwplayer/player.swf" /> <param name="allowfullscreen" value="true" /> <param name="allowscriptaccess" value="always" /> <? echo "<param name='flashvars' value='file=../Movies$full_dir.mp4 =../Movies$full_dir.jpg' />"; ?> <object type="application/x-shockwave-flash" data="/jwplayer/player.swf" width="900" height="400"> <param name="movie" value="/jwplayer/player.swf" /> <param name="allowfullscreen" value="true" /> <param name="allowscriptaccess" value="always" /> <? echo "<param name='flashvars' value='file=../Movies$full_dir.mp4&image=/Movies$full_dir.jpg' />"; ?> <p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p> </object> </object> In the video part, where it says Height and Width, I just need to have it take the 2 variables i created depending on the resolution used. Variables xn or yn. Any ideas? Please Please help! been stumped on this all afternoon!! Thanks Defyer! I wish to create an applett, which i am working on, Though I want to know if there is any way to: 1) Take screenshots of entire web page 2) Take screenshots of a certian part of the web page selected by the user with a Rectangle tool 3) Take screenshots of a certian part of the web page selected by the user with a FreeForm tool Im not asking for a full code or anything, But I just wish to know in what way could i go about this? I am using this javascript code to detect screen size and display an alternate css. Code: if (screen.width<1600) { document.write('<link rel="stylesheet" href="<?php echo $path ?>/css/templateadjust.css" type="text/css" />'); } This works fine in FF and Chrome but doesn't seem to work in IE. Any idea why? Hey guys, I was trying to make a Javascript game that moves an image across the screen randomly. Instead of executing properly, it just shows the image's starting point, and stops. No movement. Is there anyway I could fix this? Thanks, Fizz. Code: <html> <head> <title>Image Mover</title> <style> DIV.movable { position:absolute; } </style> </head> <script language="javascript"> function Start() { var x = 5; //Starting Location - left var y = 5; //Starting Location - top var dest_x = Math.floor(Math.random()*650); //Ending Location - left var dest_y = 500; //Ending Location - top var interval = 10; //Move 10px every initialization moveImage(); } function NewDest() { var x = 5; //Starting Location - left var y = 5; //Starting Location - top var dest_x = Math.floor(Math.random()*650); //Ending Location - left var dest_y = 500; //Ending Location - top var interval = 10; //Move 10px every initialization moveImage(); } function moveImage() { //Keep on moving the image till the target is achieved if(x < dest_x) x = x + interval; if(y < dest_y) y = y + interval; //Move the image to the new location document.getElementById("ufo").style.top = y+'px'; document.getElementById("ufo").style.left = x+'px'; if ((x+interval < dest_x) && (y+interval < dest_y)) { //Keep on calling this function every 100 microsecond // till the target location is reached window.setTimeout('moveImage()',30); if (x == dest_x) && (y == dest_y) { NewDest(); } } } </script> <body onload="Start()"> <div id="ufo" class="movable"> <img src="Mouse.jpg" alt="mouse" WIDTH = 30/> </div> </body> </html> Hi guys, I'm completely new here and seeking some help on this js: http://www.javascriptkit.com/script/...ow/index.shtml i'm building my picture website, an example is this one: http://www.lucagodina.com/mello/test.htm do you know how can i have all the thumbnails on the same row, and scrolling? because if i've let's say 100 pictures, the thumbnails will cover the pics itself! Would also be great to have play-next-previous button... i know i'm asking a lot! hope someone can help me out! Hi there I know this picture_viewr js is a fullscreen slide Would it be possible to set a screen size (700x500 e.g.) and then set a background color or the part that would be outside this window??? Thx a lot allberto http://www.alfaaudiovisual.com/pictu...er/ByB/ByB.htm Ok. My first fish is swimming across the screen perfectly fine. He starts from the left side and goes to the right side. But for the second fish, he is on the right side and he won't swim to the left side. How do I get him to start swimming? Then he will stop after the interval of 80 reaches like the left one and then start over from the left to the right. Here is my code: Code: var fish1Position = 0; var fish2Position = 0; horizontal = new Array(80); var fillPosition = 10; for(var i = 0; i < 80; ++i) { horizontal[i] = fillPosition; fillPosition += 10; } horizontal2 = new Array(80); var fillPosition2 = 10; for(var i2 = 80; i2 > 0; i2--) { horizontal2[i2] = fillPosition2; fillPosition2 = fillPosition2 - 10; alert(fillPosition2); } function fish1Swim() { document.getElementById("fish1").style.left = horizontal[fish1Position] + "px"; ++fish1Position; if (fish1Position == 79) fish1Position = 0; } function fish2Swim() { document.getElementById("fish2").style.right = horizontal2[fish2Position] + "px"; ++fish2Position; if (fish2Position = 79) fish2Position = 0; } function startSwimming() { setInterval("fish1Swim()",100); setInterval("fish2Swim()",100); } Hi nerds, We have some problems with some javascript code. We are creating a new button like the ones known from addthis/sharethis and would like the same behavior as there popups. We have tried by putting together some different scripts, and the action is about right. We do still have one problem, and that is the position of the popup. If the button is placed at the right site of a website, it floats out of the screen, making scrollbars. Also it don't have same position behavior in Firefox, IE, Opera ... The button can be seen he http://www.langthis.com The code related to this problem should bed this: Code: function move_box(an, box) { var cleft = 0; var ctop = 0; var obj = an; while (obj.offsetParent) { cleft += obj.offsetLeft; ctop += obj.offsetTop; obj = obj.offsetParent; } var winW = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth; var winH = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight; if (cleft+box.offsetWidth > winW) { cleft = cleft - box.offsetWidth - 30; if (cleft < 3) cleft = -3; } box.style.left = cleft + 'px'; ctop += an.offsetHeight + 8; // Handle Internet Explorer body margins, // which affect normal document, but not // absolute-positioned stuff. if (document.body.currentStyle && document.body.currentStyle['marginTop']) { ctop += parseInt(document.body.currentStyle['marginTop']); } if (ctop+box.offsetHeight > winH) { ctop = ctop - box.offsetHeight - 20; if (ctop < 3) ctop = -3; } box.style.top = ctop + 'px'; } If someone would be interested in rewriting the script, we would credit this in our about page. Else we would be thankful if someone just could help with the existing code. Best regards Langthis team Hi friends, I have a dropdown menu,when i select one item from the dropdown menu,i want a checkbox to be created on the screen.How do i achieve this? Thank You Madhusudan Hi all, I'm new to javascript and im trying to teach myself how to use it, however, ive come accross a problem. I'm using this code embeded in a HTML page for rollover images: Code: <script language="JavaScript" type="text/javascript"> <!-- if (document.images) { homebuttonup = new Image(); homebuttonup.src = "./Images/nav/home2.png" ; homebuttondown = new Image() ; homebuttondown.src = "./Images/nav/home2.png" ; newsbuttonup = new Image(); newsbuttonup.src = "./Images/nav/news.png" ; newsbuttondown = new Image() ; newsbuttondown.src = "./Images/nav/news2.png" ; gallerybuttonup = new Image(); gallerybuttonup.src = "./Images/nav/gallery.png" ; gallerybuttondown = new Image() ; gallerybuttondown.src = "./Images/nav/gallery2.png" ; } function buttondown( buttonname ) { if (document.images) { document[ buttonname ].src = eval( buttonname + "down.src" ); } } function buttonup ( buttonname ) { if (document.images) { document[ buttonname ].src = eval( buttonname + "up.src" ); } } // --> </script> <a href="index.html?cmd=welcome" onmouseover="buttondown('homebutton')"onmouseout="buttonup('homebutton')"> <img src="./Images/nav/home2.png" name="homebutton" border="0" /></a> <a href="about.html?cmd=welcome" onmouseover="buttondown('newsbutton')"onmouseout="buttonup('newsbutton')"> <img src="./Images/nav/news.png" name="newsbutton" border="0" /></a> <a href="services.html?cmd=welcome" onmouseover="buttondown('gallerybutton')"onmouseout="buttonup('gallerybutton')"> <img src="./Images/nav/gallery.png" name="gallerybutton" border="0" /></a> This works completly fine in 1280 x 800 but goes mental when you hover over it in 1024 x 768 screen resolution. Can anyone help please, it would be greatly appreciated! Good day, This program is supposed to have a "box" cover the entire screen and then collapse upon opening the page... I cannot find what is wrong, other than the obvious error that there is no object or it is null, but this is the example the book gave... Anyone care to give me a point in the right direction Thanks, in advance. ao5431 <code> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Boxed In</title> <link rel="stylesheet" href="js_styles.css" type="text/css" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript"> /* <![CDATA[ */ var clipSpeed = 5; var clipRight = 0; var clipLeft = 0; var clipTop = 0; var boxSize; var stopShrinking; var clipBottom = 0; var clipBox; var clipBox = document.getElementById("box").style; function startShrinking() { if(navigator.appName == "Microsoft Internet Explorer") { boxSize = document.documentElement.clientWidth / document.documentElement.clientHeight; clipRight = document.documentElement.clientWidth; clipBox.width = clipRight + "px"; clipBottom = document.documentElement.clientHeight; clipBox.height=clipBottom + "px"; } else { boxToShrink = window.innerWidth/window.innerHeigth; clipRight = window.innerWidth; clipBox.width = clipRight + "px"; clipBottom = window.innerHeight; clipBox.height = clipBottom + "px" } stopShrinkingInterval("shrinkBox()", 100); } function shrinkBox() { if(navigator.appName == "Microsoft Internet Explorer") minBoxSize=document.documentElement.clientWidth/2; else minBoxSize = window.innerWidth/2; if (clipLeft > minBoxSize) { clearInterval(stopShrinking); clipBox.display = "none"; } clipBox.clip = "rect(" + clipTop + "px" + clipRight + "px" + clipBottom + "px" + clipLeft + "px)" clipLeft += boxSize * clipSpeed; clipTop += clipSpeed; clipRight -= boxSize * clipSpeed; clipBottom -= clipSpeed; } /* ]]> */ </script> </head> <body onload="startShrinking()" > <div id="box" style="position:absolute; background-color:blue"></div> </body> </html> </code> Hi Guys, I would like to be able to change my webpage background image according to the screen resolution the user uses so: if screen resolution is greater than or equals to 1200*600 then background = mybackground.jpg no-repeat else background = #000000 THANKS A MILLION! Hi, I want a link on my website where when you press it, it print screens. somthing like, <a href=printscrn();">Print Screen</a> anyone any ideas? Simon Hello I want to add something to my web site. when the user clicks to download. i want to see a pop up screen which says your download has started. <script type="text/javascript"> function show_alert() { alert("Your Download Started!"); } </script> <input type="button" onclick="show_alert()" onclick="get value="Download" /> I dont get where should i put the download link I have the div box Code: <div id="ajax_loader"><center><img src="/css/ajax-loader.gif" alt=""/></center></div> Quote: #filter { display: none; position: absolute; top: 0%; left: 0%; width: 100%; min-height: 900px;; overflow:visible; background-color:#000; z-index:900000; opacity:0.5; filter: alpha(opacity=50); } #ajax_loader{ display: none; position: absolute; top: 50%; left: 50%; z-index:900001; overflow: visible; height:40px; width:60px; background-color:white; vertical-align:middle; padding-top:10px; border:1px solid black; } The problem when the page loads then my content height is around 2000px. So the animations loads on the center of screen but on the upper portion of page which is visible when the page loads. bUt my submit button is at the bottom of page so when i click submit the ani,atiosn stays at the top . I want the animation to load on the screen which is currently visible not which is at the startup |