JavaScript - Video Is Invisible Until Mouseover
Hi everyone. I'm new to the forum, and in need of help.
The code below sometimes works the way I want it to...by downloading a video from an external site and displaying a placeholder whenever the page loads. But most of the time, the video won't download and display until a user hovers their mouse over the blank area. Is it possible to modify the code so that it functions consistently by always downloading and displaying the placeholder when the page loads? I don't want users to think there's a missing/broken video because there's a blank space where the video is supposed to be, and they don't realize they have to mouse over it. I would be grateful for any pointers. I searched the forums for a solution, but I don't think I'm using the correct keywords. Thanks so much for your help. Code: <a href="#" onclick="return(false);" rel="videoGUID=4cd75af679b39g4963V828c00c581024ae86&" style="display: block; width: 550px; height: 310px" id="4cd75af679b39g4963V828c00c581024ae86" width="550" height="310">How to Take Care of Your Dog's Teeth: VetVid Episode 001</a><script type="text/javascript" src="http://360.sorensonmedia.com/4cd75af679b39g4963V828c00c581024ae86/embedv2.js"></script> Similar TutorialsI am trying to mimic the video mouseover preview which can be viewed at the website below once you put your mouse over a picture a video preview window is opened which plays back the video and stops once the mouse is moved. http://videocopilot.net/tutorials/ How can i mimic this effect... any suggestions? Hey folks, I'm really wanting to mess around with doing something like the button at the bottom of this web page: http://www.major-confusion.co.uk/tut...sh-button.html The button has a short looping animation that plays when the button is moused over. It could create a very cool effect. Any JS gurus know if this or something similar can be done using JS and/or html5? I'm trying to avoid using flash at all costs. Thanks in advance. Hi, I currently created a video uploader, but when the video is too big in size, the page seems to be not doing any until the video is completely uploaded. I want to put somewhat like "loading.. please wait" script until the video is not completely uploaded. Thanks. //Ana Hi, I am going to open a new window on my web page , and run one link (which is important for me to be run ), then close that window after some seconds, but I do not want this window be visible by users. This is the code I used, but when I add visible= none, the function does not work, and my link cannot be run. <button onclick="myFunction()">Click</button> <script type="text/javascript"> function myFunction() { var win = window.open("link", '1366002941508','width=x,height=y,left=xx,top=yy', visible=none); setTimeout(function () { win.close();}, ss); } </script> I really appreciate for your suggestion ) Hello, I need your help. I would like to insert a few blank spaces in a text string: eg. string = 123456(space)(space)(space)7891011 How do you do this? Thanks a bunch Jay Made a topic earlier about "auto klick" for swf button but i got response ,its not posible todo that.. so i have another question!! Is it posible to make the swf button invisible but still clickable and then have a background so it looks like its another button? or is there any other way to edit design for the button! OBS! i only have the swf not the flv file! Code: <html class="no-js" lang="en" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <script src="http://www.google.com/jsapi?key=ABQIAAAAAJ5I0tmbz-jcO3Ja4fwvEBTb9u7IFi28hLXI-qXjI6UBBcarTBQ49g-wp7Wxnow1_w9F-7_GcOOnyg"></script> <script> google.load("jquery", "1.7.0"); google.load("swfobject", "2.2"); </script> </head> <body> <div id="container"> <div id="main" role="main"> <div id="data" class="channel"> <div id="openbutton"> <div id="flashcontent1";></div> <!-- DR1 Start --><script> params = {}; params.text = 'DR1'; params.action = "channel"; params.value = "40"; swfobject.embedSWF('content/linkbutton.swf', 'flashcontent1', '145', '30', '9.0.115', 'content/expressinstall.swf', params, {allowFullscreen:'true', wmode: 'transparent' ,bgcolor: '#FFFFFF', menu: 'false'}, {id: 'flashcontent1'}); <!-- DR1 Ends --></script> </div></div></div> </div></body></html> I have a text input field that was created with JS on a screen. The input is padded with a 0 for the first character to work with the server. I was wondering if there is any way to make that 0 invisible so the user doesn't get confused?
I am creating a customized home page that can display regular links and login forms. I am adding Gmail login form into it. I can further customize it by putting multiple sign in buttons that can fill in username/password for different accounts before submitting. Here's the preview: http://imgur.com/s4Ert.jpg Now the problem is, in Gmail login form a hidden variable called "dsh" is filled with a value that is matched with server as well as a cookie, this value changes in some hours. So this means that I cannot create a complete offline form, but is it possible to load the login page hidden, and catch the value from it? I tried with an iframe with display:none and src="http://mail.google.com" but it opened in the top frame. Any other ideas? In short, what we need is, every time a page is opened from my computer, an online page should be open invisible from the user, and a hidden form value is to be fetched from it. Hi I discovered something weird that happend to me when trying to add a javascript created table to the document.body. Basically it doesn't add it in IE, but works fine in FF. Actually it does add it in IE, but only shows up if I add a <br/> later in a new statement... What?!?! try my code to see what is going on. (works fine in FF, does bad thing in IE) I tried to narrow the code i was working with down to basics and still have the glitch happen so maybe it's just something wrong with this code, but i couldn't pinpoint it. Also, it's only when i do document.body.appendChild(), not document.body.innerHTML += entireMassiveElement.innerHTML; I need it to work in both browsers with the appendChild() method, because innerHTML is much slower. Any advice appreciated! Thanks! Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Interace v1.0</title> <style type="text/css"> /****************** * --Panel Style ******************/ .panel { } .panel table td {padding: 0px;} .panel_corner { background-color: #00c0ff; background-repeat: no-repeat; width: 3px; height: 3px; } .panel_sideX {height: 3px; background-color: #00c0ff; background-repeat: repeat-x;} .panel_sideY {width: 3px; background-color: #00c0ff; background-repeat: repeat-y;} .panel_topLeft {background-position: 0px 0px;} .panel_topRight {background-position: -3px 0px;} .panel_bottomLeft {background-position: -0px -3px;} .panel_bottomRight {background-position: -3px -3px;} .panel_top {background-position: -3px -6px;} .panel_right {background-position: -3px 0px;} .panel_left {background-position: 0px 0px;} .panel_bottom {background-position: -3px -9px;} .panel_main { background-color: #00c0ff; } .panel_titlebar { color: #ffffff; font-family: verdana; font-size: 10pt; padding: 3px; padding-top: 0px; overflow: hidden; /* display: none; */ } .panel_title { float: left; height: 18px; overflow: hidden; } .panel_buttons { float: right; } .panel_toolbar { background-color: #444444; color: #eeeeee; font-family: verdana; font-size: 10pt; padding: 3px; overflow: hidden; display: none; } .panel_content { overflow: auto; font-family: arial; color: #eeeeee; font-size: 7pt; font-weight: bold; padding: 10px; border: 1px inset #cccccc; background-color: #444444; } </style> <!--///////////////////////////////////--> <script type="text/javascript"> function makeElement() { var layout = document.createElement("table"); //the table that is the basic layout var top = document.createElement("tr"); var tl = document.createElement("td"); top.appendChild(tl); var tc = document.createElement("td"); top.appendChild(tc); var tr = document.createElement("td"); top.appendChild(tr); var middle = document.createElement("tr"); var ml = document.createElement("td"); middle.appendChild(ml); var mc = document.createElement("td"); middle.appendChild(mc); var mr = document.createElement("td"); middle.appendChild(mr); var bottom = document.createElement("tr"); var bl = document.createElement("td"); bottom.appendChild(bl); var bc = document.createElement("td"); bottom.appendChild(bc); var br = document.createElement("td"); bottom.appendChild(br); layout.appendChild(top); layout.appendChild(middle); layout.appendChild(bottom); layout.style.borderCollapse = "collapse"; tl.className = "panel_corner panel_topLeft"; tc.className = "panel_sideX panel_top"; tr.className = "panel_corner panel_topRight"; tl.style.padding = "0px"; tc.style.padding = "0px"; tr.style.padding = "0px"; ml.className = "panel_sideY panel_left"; mc.className = ""; mr.className = "panel_sideY panel_right"; ml.style.padding = "0px"; mc.style.padding = "0px"; mr.style.padding = "0px"; bl.className = "panel_corner panel_bottomLeft"; bc.className = "panel_sideX panel_bottom"; br.className = "panel_corner panel_bottomRight"; bl.style.padding = "0px"; bc.style.padding = "0px"; br.style.padding = "0px"; //-- Set up the cursors for the bottom, right, and bottomright sides to resize mr.style.cursor = "e-resize"; bc.style.cursor = "s-resize"; // --Now create the internal structure, titlebar, toolbar, content area var main = document.createElement("div"); var titlebar = document.createElement("div"); var toolbar = document.createElement("div"); var content = document.createElement("div"); content.innerHTML = "success!"; main.appendChild(titlebar); main.appendChild(toolbar); main.appendChild(content); mc.appendChild(main); main.className = "panel_main"; titlebar.className = "panel_titlebar"; toolbar.className = "panel_toolbar"; content.className = "panel_content"; //-- create the titlebar internals, title, buttons, cleardiv var title = document.createElement("div"); var buttons = document.createElement("div"); var clear = document.createElement("div"); titlebar.appendChild(title); titlebar.appendChild(buttons); titlebar.appendChild(clear); clear.style.clear = "both"; title.className = "panel_title"; buttons.className = "panel_buttons"; main.style.width = "200px"; return layout; } function go(select) { var stuff = makeElement(); if(select == 1) { //-- Add everything to the container document.body.appendChild(stuff); } else if (select == 2) { //-- Add everything to the container //layout is a table, but innerHTML only returns the inner, so i just added on the outer tags. document.body.innerHTML += ('<table cellpadding="0" cellspacing="0">' + stuff.innerHTML + '</table>'); } //document.body.innerHTML += "<br/>"; } </script> </head> <body> <input type="button" value="test append Element" onclick="go(1);"/><input type="button" value="test innerHTML add" onclick="go(2);"/> <body> </html> Hello everyone. I'm new to programming, although I've learned HTML and CSS pretty thoroughly. I think I have most of the Javascript basics down as far as definitions, but I'm getting hung up on the actual coding. I'm working on an information request form for my fiancee's business site. In it, I want to have options that users select via radio buttons. Rather than having additional input fields static on the page, I would like to program some of the radios, when clicked, to open a previously unseen option where users will then be able to type in the necessary information. More specifically, since she only works in two states, I want a third option of "other," which, when opened, will allow the user to input any other state. Then, should the radio be deselected or reset, the field would disappear again. If my understanding is correct, I think I will need to use a javascript function in the header, an HTML "div" section with ID, "onclick" and "offclick" events in the button mark-up, and the specific javascript code to call the function (getElementById?). Or maybe I'm way off. Please help. Thanks I set up an image mouseover for the next button but its not working. I have two images set up but the second one wont appear when mousing over image. You can see it at www.college-ebook.com I have created a page using the code below and it works fine. Is there any way that I can replicate the gallery further down the page using different images? When I try, the mouseover on the top gallery opens the images in the bottom gallery. Code: <script> function changeimage(towhat,url){ if (document.images){ document.images.targetimage.src=towhat.src gotolink=url } } function sshow(){ window.location=gotolink } </script> <script language="JavaScript1.1"> var myimages=new Array() var gotolink="#" function preloadimages(){ for (i=0;i<preloadimages.arguments.length;i++){ myimages[i]=new Image() myimages[i].src=preloadimages.arguments[i] } } preloadimages("i/1-big.jpg","i/2-big.jpg","i/3-big.jpg","i/4-big.jpg") </script> <script> function changeimage(towhat,url){ if (document.images){ document.images.targetimage.src=towhat.src gotolink=url } } function sshow(){ window.location=gotolink } </script> http://www.outwarstop.com/woz/woz09r3a.php On this page located around where it says Drops under where it says "Sha-Zhul ArchDemon [60]" are the mouseover's but the location of the popup doesnt come up at the mouse, but on the left side of the table, i need help gettin the popup to appear where the mouse is located. I tried to use the CSS Horizontal List Menu from http://www.javascriptkit.com/script/...stopmenu.shtml, and it is working with the one exception of the three images not showing up. I did did save them to the directory that contains the page I pasted the scripts to, and all of the links are showing in plan test only. I placed them original in a sub-folder call graphics which is the folder I have all of the graphics in. I also place them in the root director that has all of the HTML fiiles.
Hi there. I'm trying to make a little valentines website 'card' for my ladyfriend. I was going to be clever about it and use javascript, but as it turns out I'm really not that clever with it anymore. I need a single image to change into a different image on each following mouseover event. A planned 'route' of images, for exameple A -> B -> C -> D -> E -> A -> F - > B -> .. and so on. I thought I could do this, but I'm getting nowhere. I did try to look for similar attempts to make this, but it's kind of hard to find since 'mouseover' is such a generic search term. Thanks. Edit: there's little point for me in posting my code so far.. it's just a long list of imagecodes and a little mousover script that would probably make you laugh. Good morning all, I am trying to write a JavaScript that performs the following action: When I roll my mouse over on a paragraph with a Code: <p class="hover-target"> Paragraph goes here</p> It will do a reverse video of it. Currently the web page is in white background, black text. So when the mouse rolls over that particular paragraph it will be a black background, white text for that paragraph only. The JavaScript I wrote is: Code: { Core.start ( ( function() { function mouseoverListener(evt) { evt = evt ? evt : window.event; core.addClass (this, " over"); } function mouseoutListener(evt) { evt = evt ? evt : window.event; core.removeClass (this, " over"); } return { init: function() { var allElements = document.getElementsByTagName('*'); for (var i = 0; i < allElements.length; i++); { if (core.hasClass(allElements[i], "hover-target")) core.addEventListener(allElements[i], 'mouseover', mouseoverListener); core.addEventListener(allElements[i], 'mouseout', mouseoutListener); } } }; } )() ); } The HTML document has the right path to the scripts (core. js and the rollover.js) as well as the stylesheet (index_style.css). Also, the CSS stylesheet code is: Code: .over{ color:white; background:black; } There is more to this stylesheet but I am only highlighting the rollover style. Am I missing something from my code? Thanks for your time. The following piece of codes work like this: When mouse pointer is moved over the Button, the text of the button changes; When it is moved out of the button, the background color of the button changes. <html> <head> <script type="text/javascript"> function over(e) { if(e.toElement){ if(e.toElement.tagName.toLowerCase() == "input"){ e.toElement.value="IE New"; } } } function out(event) { if (event.srcElement){ if(event.srcElement.tagName.toLowerCase() == "input"){ event.srcElement.style.background= "green"; } } } </script> </head> <body> <div id="1">aaaaaaaaaaaaaaaaaa </div> <input type="button" value="Button 1" onmouseout="out(event)" onmouseover="over(event)" /> </body> </html> This sequence works fine, until the following case: First let's see the direction of the button: (left) <--------> BUTTON <--------> (right) Now, move the mouse over to the button, from the right side of the button, both the text and the background color of the button are changed. Obviously, the mousemoveout event is also triggered. I believe in this case, only the mousemoveover event should be triggered. What caused this? Thanks Scott Hey guys, I need some help. I have divs placed in a html document, and what I need to do is have a sound play when a person is to hover their mouse over the,. I used this code that I've butchered together from researching on the internet, but it just isn't working. The sound plays automatically as soon as the site loads. Can you please help me? Here is my code: Code: <html> <head> <script> function EvalSound(soundobj) { var thissound= eval("document."+soundobj); thissound.Play(); } </script> <embed src="C.mp3" autostart=false width=0 height=0 name="C" enablejavascript="true"> <embed src="D.mp3" autostart=false width=0 height=0 name="D" enablejavascript="true"> </head> <link rel="stylesheet" type="text/css" href="NavTest.css"> <div id=red alt="#" onMouseOver="EvalSound('C')"></div> <div id=blue alt="#" onMouseOver="EvalSound('D')"></div> </html> Thank you! [: Sorry, maybe I should also mention that my knowledge of Javascript is NONE! :| Hello, I've got a strange image with mouse overs on a menu. my code; Code: function SwapImage(strName,strImage){ ImageFlip= new Image() ImageFlip.src = "images/" + strImage; var strImageOn = document.getElementById(strName); strImageOn.src = ImageFlip.src; return true; } <table border='0' cellpadding='5' cellspacing='5'> <tr> <td width='33' onMouseOver=\"SwapImage('MenuItem1','MouseOver.png');\" onMouseOut=\"SwapImage('MenuItem1','MouseOut.png');\"><a href='/'><img src='images/home_btn.png' border='0' /></a></td> <td width='11'><img src='images/MouseOut.png' border='0' id='MenuItem1' /></td> </tr> <tr> <td width='33' onMouseOver=\"SwapImage('MenuItem2','MouseOver.png');\" onMouseOut=\"SwapImage('MenuItem2','MouseOut.png');\"><a href='/artwork.php'><img src='images/artwork_btn.png' border='0' /></a></td> <td width='11'><img src='images/MouseOut.png' border='0' id='MenuItem2' /></td> </tr> <tr> <td width='33' onMouseOver=\"SwapImage('MenuItem3','MouseOver.png');\" onMouseOut=\"SwapImage('MenuItem3','MouseOut.png');\"><a href='/artists.php'><img src='images/artists_btn.png' border='0' /></a></td> <td width='11'><img src='images/MouseOut.png' border='0' id='MenuItem3' /></td> </tr> <tr> <td width='33' onMouseOver=\"SwapImage('MenuItem4','MouseOver.png');\" onMouseOut=\"SwapImage('MenuItem4','MouseOut.png');\"><a href='/about.php'><img src='images/about_btn.png' border='0' /></a></td> <td width='11'><img src='images/MouseOut.png' border='0' id='MenuItem4' /></td> </tr> <tr> <td width='33' onMouseOver=\"SwapImage('MenuItem5','MouseOver.png');\" onMouseOut=\"SwapImage('MenuItem5','MouseOut.png');\"><a href='/links.php'><img src='images/links_btn.png' border='0' /></a></td> <td width='11'><img src='images/MouseOut.png' border='0' id='MenuItem5' /></td> </tr> </table> this is in a php page, thats the reason for the extra slashes/espaces. for some reason, only the last row of the menu works with the mouse over, maybe I'm missing something, but it seems like it should all work. any ideas would be really helpful. cheers, -Ken |