JavaScript - Making A Javascript Music Player
so i am trying to make a music player where you select a song from a drop down list and then click submit. it then brings up the audio controls with the HTML5 "<audio>" tags and then you can click play and it should work. i am having trouble actually doing this though. the html is
Code: <html> <head> <title>Music Player</title> <script language="javascript" type="text/javascript" src="popup.js"> </script> </head> <body bgcolor="000000"> <font color="lime" size="6"> <div align="center"> <u>The Mighty Peacock Music Player</u> </font> <br> <br> <font color="red" size="5"> <select id="convert_to" name="convert_to"> <option value="danza" id="danza">Danza Kuduro by Dan Omar</option> <option value="iron" id="iron">Iron by Woodkid</option> <option value="boot" id="boot">Das Boot by Vat19</option> </select> <br> <input type="submit" value="submit" onClick="dispResults(convert_to)"> <p>The song selector is not functioning yet. Sorry for the inconvinence.</p> <br> <br> <div class="music_box" id="music_box"> <audio src="/music/Danza Kuduro.mp3" controls="controls"> </audio> </div> </div> </body> </html> and the javascript is Code: function dispResults(convert_to) { if (id == "danza") { document.getElementById("music_box").innerHTML = "<p>" + <audio src="/music/Danza Kuduro.mp3" controls="controls"></audio> + "</p>"; } if (id == "iron") { document.getElementById("music_box").innerHTML = "<p>" + <audio src="/music/woodkid.mp3" controls="controls"></audio> + "</p>"; } } any help would be greatly appreciated. Thanks Similar TutorialsI am trying to make it so that when the page loads, it will random play a song from a list of songs. Also, when the first song finishes, another random song should play. I have this code: Code: <script type="text/javascript"> var numberOfSongs = 5 var sound = new Array(numberOfSongs+1) sound[0]= "music/Rock/1.mp3" sound[1]= "music/Rock/2.mp3" sound[2]= "music/Rock/3.mp3" sound[3]= "music/Rock/4.mp3" sound[4]= "music/Rock/5.mp3" sound[5]= "music/Rock/6.mp3" function randomNumber() { var randomLooper = -1 while (randomLooper < 0 || randomLooper > numberOfSongs || isNaN(randomLooper)){ randomLooper = parseInt(Math.random()*(numberOfSongs+1)) } return randomLooper } var soundFile = sound[randomNumber ()] document.writeln ('<BGSOUND SRC="' + soundFile + '" loop=5>'); document.writeln ('<EMBED SRC= "' + soundFile + '" loop=5 PLAYCOUNT=3 hidden=true autostart=true><P>'); </script> How would it be possible to play another random song after the song finishes? I just added the SCM Music Player script to my WordPress site but now whenever I navigate to another page or news post the URL address doesn't change. The address bar stays static. How can I fix this? Here is the script code which was placed in Header.php within the <Body> tags: ======================================== <!--SCM Music Player by Adrian C Shum - http://scmplayer.net--> <script type="text/javascript" src="http://scmplayer.net/script.js" ></script> <script type="text/javascript"> SCMMusicPlayer.init("{'skin':'skins/black/skin.css','playback':{'autostart':'false','shuffle':'false','volume':'50'},'playlist':, <!-- playlist songs inserted here --> 'placement':'bottom','showplaylist':'false'}"); </script> <!--End of SCM Music Player script--> ====================================== Should I be adding this code someplace else? Thank you! Hey all, I've built a website for my music and I'm fairly new to all this so bear with me. Essentially, I have two flash-based music players on my site. One is a simple single-track player that auto-plays some background music for the site. The functionality is limited to the user starting/stopping the music and adjusting the volume. The other is an advanced music player featuring a playlist of preselected tracks and allows the user to start/stop music, rewind, fast forward, adjust volume and select tracks in the playlist. This player does not start automatically. My question is this: when someone visits the site, the single-track background music player will start. Is there code that would allow the advanced music player, should it be turned on (i.e. someone selects a track and plays it), to override and actually stop the play of the single-track? TIA! I have a tiny flash player(with controls) in a table on it's own html page. It only plays one piece of music. But I need an unusual popup script which I can't seem to find. I want the tiny player (75 x 30) to popup on it's own without all the window (chrome?) surrounding it. I want it to be in either the top or bottom left corner. I would also like it to popup on load but turn off when I go to a particular page that I have a sound video on and then turn off completely when they leave the domain. It is a music site. Can some one please write a script like this for me and how do I get around annoying popup blockers. I hope someone can help me...I need to tweak this code so that background music will play randomly for an unlimited time. Right now, it plays a random song and then repeats it over and over. I just need to have it randomly change songs and keep playing! Here is the code I am using... Code: <script type="text/javascript"> var musicSource = [ "http://www.bigmacktrucks.com/music/1.mp3", "http://www.bigmacktrucks.com/music/2.mp3", "http://www.bigmacktrucks.com/music/3.mp3", "http://www.bigmacktrucks.com/music/4.mp3", "http://www.bigmacktrucks.com/music/5.mp3", "http://www.bigmacktrucks.com/music/6.mp3", "http://www.bigmacktrucks.com/music/7.mp3", "http://www.bigmacktrucks.com/music/8.mp3" ]; var rand = Math.floor(Math.random()*musicSource.length); document.write('<embed src="'+musicSource[rand]+'" autoplay="true" hidden="true" loop="true" />'); // --> </script> I think this is simple but I am a total noob at javascript! Thanks in advance! Hello guys, I've made a music playlist where you should be able to listen to music (of course). All works fine, i am capable too listen to all the music in my playlist. But, when i reload my website and click on a song, it send me an error message - "Adobe Flash Player has stopped a potentially unsafe operation. If you want the program to communicate with Internet, click on settings." When i click on settings, i get another message - "Sorry, this page is not available". I had also another Option instead of settings which where, "ok". When i click on OK it works fine and it's no problem to scroll through the musiclist and listen to all of the soft songs. But i don't even want the message to appear from the very first time. Do you know what i should do to get rid of the message? Here's my code: Code: <!-- BEGIN JAVASCRIPT PLAYER EMBED CODE --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> <div id="player-holder"></div> <script type="text/javascript"> var options = {}; options.playlistXmlPath = "playlist.xml"; var params = {}; params.allowScriptAccess = "always"; swfobject.embedSWF("OriginalMusicPlayerPlaylist.swf", "player-holder", "250", "250", "9.0.0",false, options, params, {}); </script> <!-- END PLAYER EMBED CODE --> Regards Webjoker Hi, I'm trying to make a dice game, as well as making it two player. I need to be able to have a scoreboard displayed (eg. player 1 has won 7 times and player 2 has won 4) and I need to be able to prompt the user on if they want to play the game again. So far I have the following: Code: <html> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Dice Game --> <!-- player 1 var die = 6; var dice = 2; var player1 = 0; var player2 = 0; function dice_roll(die, dice) { var roll = 0; for (loop=0; loop < dice; loop++) { roll = roll + Math.round(Math.random() * die) % die + 1; } document.form.text.value = roll; } player1 = roll; // End --> <!-- player 2 function dice_roll2(die, dice) { var roll = 0; for (loop=0; loop < dice; loop++) { roll = roll + Math.round(Math.random() * die) % die + 1; } document.form.text.value = roll; } player2 = roll; // End --> if player_1 = player_2 alert("DRAW!") else if player_1 > player_2 alert("Player 1 is the winner!") else if player_1 < player_2 alert("Player 2 is the winner!") </script> <body> <form name=form> <table border=2 cellpadding=5> <tr> <td colspan=2 align=middle>No. of sides/dice</td> </tr> <tr> <td valign=top align=middle> <p><input type=radio checked name=sides onClick="die = 6">6 Sided </td> <td valign=top align=middle> <p><input name=number type=radio onClick="dice = 2" checked> 2 </td> </tr> <tr> <td align=middle colspan=4> <input type=button value="Roll Dice" name=button onClick="dice_roll(die, dice)"> <input type=text size=10 name=text> </td> </tr> </table> </form> </center> </body> </html ^^ I basically just tried duplicating the original function that adds up the 'dice'. But it doesn't work, I've tried playing around with if/else statements etc to get it to display messages and so fourth, but I have failed. Any help would be appreciated. I only started javascript last week and my teacher isn't really helping explain lots of it. Thanks in advance. Hi, I am trying to run multiple videos in the JW player by clicking on different links.Its working fine in chrome and firefox, But it doesn't play viseos in IE. Kindly suggest me ...Thanks in advance..Here is the code. <script type="text/javascript"> function start(){ return playVideo("mediaspace","mediawindow"); } function playVideo(sourceId, targetId) { if (typeof(sourceId)=='string') {sourceId=document.getElementById(sourceId);} if (typeof(targetId)=='string') {targetId=document.getElementById(targetId);} targetId.innerHTML=sourceId.innerHTML; return false;} </script> <body onload="start()"> <div id="mediawindow"></div> <div id="mediaspace" class="fltrt" style="display:none"> <script type='text/javascript' > var so = new SWFObject('player.swf','mpl','360','295','9'); so.addParam('allowfullscreen','true'); so.addParam('allowscriptaccess','always'); so.addParam('wmode','opaque'); so.addVariable('playlistfile','IIA2010.xml'); so.addVariable('stretching','fill'); so.addVariable('autostart','true'); so.addVariable('repeat','list'); so.addVariable('skin','stormtrooper.zip'); so.write('mediaspace');</script></div> <p><a href="#" onclick='return playVideo("mediaspace","mediawindow")'>Play all</a><br /> <a href="#" onclick='return playVideo("welcome","mediawindow")'>MC Linda Clark welcomes guests</a><br /></p> You can also have a look on the webpage. Its working well in FF and chrome. you can test it there. http://www.internetindustryawards.co.nz/2010.html Its really urgent... I have 3 tabs with a flash video playing in each. If a user clicks on a video and then decides to move to another tab while the video is playing.... the video stops and the tab is switched. I am using the code below to achieve that. Code: onClick=player1.sendEvent('STOP'); player2.sendEvent('STOP'); player3.sendEvent('STOP'); this works fine if I have the tabs appearing in sequence with player1 embedded in the first tab, player2 in the second and player3 in the third. However, I wanted to randomize the tabs, in which case if tab 3 containing player3 appears first and is played and then the user switches to another tab the video keeps playing.... meaning the above code does not work in that instance. I am at a loss here cause i thought that the onClick event should be going through all the players and stopping them. website: http://tinyurl.com/ydalz2r (at the moment the tabs are displayed in sequence) Hi all, I need Media player to stream and play video in javascript...any help or working link will work. My requirement is I have .wmv files but when i embed them in html pages first it gets downloaded and then it gets played. I need them playing while they are getting downloaded. please help, i have tried lots of codes but got no success I am working on a website that features a custom javascript enabled audio player with an animated playhead to follow along with the provided spectrogram. An example of this is included below. http://cetus.ucsd.edu/voicesinthesea.../humpback.html I am having difficulty figuring out why the audio/spectrogram player does not work on an iPad. This component was built by a developer who I am not longer in contact with, thus I am in urgent need of some advice/wisdom. Thank you! Hi, I am a JavaScript novice, and appreciate any help you can give. For design reasons, we did not like the appearance of a still video on our web page. So I write a short little script to replace a picture that we selected, with the code for a flash player, once the image was clicked. The code works exactly as designed on IE and Chrome. It works *almost* as designed on Firefox and Safari -- but on those browsers the "fullscreen" button in the plugin doesn't work. It is *not* a problem with the FlowPlayer code. If I simply put the FlowPlayer code into a web page, it works fine. I think that somehow some browsers do not want to let the FlowPlayer expend outside of the JavaScript object box I created -- though that is just an hypthesis. If you have any insight or suggestions, I would appreciate it. The page is at http://sudval.org/test.html The code: Code: <div style="line-height: 12px;letter-spacing: 0px;"> <script type="text/javascript"> function changeText(){ var strOut; strOut = " <object id=\"videoplayer\" width=\"334\" height=\"204\" type=\"application/x-shockwave-flash\" data=\"http://app.provdn.com/flash/flowplayer.swf\">"; strOut = strOut + " <param name=\"movie\" value=\"http://app.provdn.com/flash/flowplayer.swf\" />"; strOut = strOut + " <param name=\"allowFullScreen\" value=\"true\" />"; strOut = strOut + " <param name=\"allowscriptaccess\" value=\"always\" />"; strOut = strOut + " <param name=\"flashvars\" value=\"config={\'playlist\':[{\'url\':\'http://cdn.provdn.com/4931/thumbnail/frame_0000.png\',\'scaling\':\'fit\'},{\'url\':\'http://app.provdn.com/output_videos/0e7c9ace9c16d4351b5108133cf1efaceebe89bb\',\'autoPlay\':true,\'scaling\':\'fit\'}],\'plugins\':{\'controls\':{\'url\':\'http://app.provdn.com/flash/flowplayer.controls.swf\',\'playlist\':false,\'backgroundColor\':\'#000000\',\'tooltips\':{\'buttons\':true,\'fullscreen\':\'Enter Fullscreen mode\'}},\'bwcheck\': { \'url\': \'http://app.provdn.com/flash/flowplayer.bwcheck-3.1.3.swf\', \'netConnectionUrl\': \'http://cdn.provdn.com/bitrate/test.mp3\', \'bitrates\': { \'http://app.provdn.com/output_videos/542539e49d4056ce6d3968958313be3dee94614b\':200, \'http://app.provdn.com/output_videos/d31b9a3562c35244cb2c2a28bb4a9aaa1edd1995\':600, \'http://app.provdn.com/output_videos/0e7c9ace9c16d4351b5108133cf1efaceebe89bb\':1000 }, \'urlPattern\': \'{1}\', \'urlExtension\': \'swf\' }}}\" />"; strOut = strOut + " <param name=\"bgcolor\" value=\"#000000\" />"; strOut = strOut + " <param name=\"wmode\" value=\"opaque\" />"; strOut = strOut + " <!--[if gt IE 6]><!-->"; strOut = strOut + " <object width=\"334\" height=\"204\" type=\"video/quicktime\">"; strOut = strOut + " <param name=\"src\" value=\"http://cdn.provdn.com/4931/thumbnail/frame_0000.png\" />"; strOut = strOut + " <param name=\"href\" value=\"http://app.provdn.com/output_videos/54339bc0f4a7c39dd0d746f52139d3a6b6c46375\" />"; strOut = strOut + " <param name=\"target\" value=\"myself\" />"; strOut = strOut + " <img src=\"http://cdn.provdn.com/4931/thumbnail/frame_0000.png\" width=\"334\" height=\"204\" alt=\"No Video\" title=\"No video playback capabilities.\" />"; strOut = strOut + " </object>"; strOut = strOut + " <!--<![endif]-->"; strOut = strOut + " </object>"; document.getElementById('boldStuff').innerHTML = strOut ; } </script> <b id='boldStuff' onclick='changeText()'><img src="images/videoimg.png" alt="no video" title="Introductory Video" width="334" height="204"></b> <p><A HREF="/08_cont_03.html"><img src="images/OH012211.jpg" alt="button" width="161" height="181" title="Open House!" BORDER="0" ALIGN="right" style="margin-left: 10px;"> </A></p> <font size="2" style="font-family:arial; font-size:80%; line-height:1.3;"> <p id='boldStuff' onclick='changeText()' align="left"> This video is a glimpse into the life of our school. Enter a world of young people who are exuberant about their lives, and are fully in control of their education. We hope you will enjoy their spirit, their focus, and above all their intensity in pursuing their passions. <br><img src="images/playvid.png" alt="Play Video" title="Play Video" width="100" height="25" style="margin-top:10px;"> </p> </font> </div> hey guys, new to the forum here but i think i may be staying here for the long haul i've lurked around here a while but recently i havent been able to find a solution to something i'm having trouble with. i need to create a script that allows me to take an image and a button and apply it to the page the button will have a value of "Start" and when the "onClick" event is triggered the image will begin to reposition itself towards the right side of the page (as if it were panning towards the right, like if it were on wheels). once it reaches the end of the window i have get it to come back to the starting position and just keep on looping. the trickiest part (imo) is getting the value of the button to change to "stop" and onClick it needs to reset everything back to neutral. now i am a HUGE javascript "nub" and i dont want someone to do the code for me, i just want some help. i need to learn this. i'll post what i have so far in post #2. if anyone can help with this ASAP i would love you forever. thanks! Hi! I need to make my own web page with quiz on it! Something like this http://www.javascriptkit.com/script/popquiz.htm The main problem - how to calculate scores? I need to make, for example, pop up box that shows, how many answers are right/wrong. What should I use for that? Right now, I am trying to use this widget from widget box to figure stuff out but its not working. I want to make a moving ticker The text would be from a rss This is what there source was: <script type="text/javascript" src="http://cdn.widgetserver.com/syndication/subscriber/InsertWidget.js"></script><script type="text/javascript">if (WIDGETBOX) WIDGETBOX.renderWidget('23bf7f48-242e-489d-99b9-4a1ac7b47eac');</script> And inside it is this... (http://cdn.widgetserver.com/syndicat...nsertWidget.js) Code: // // // if(!window.WIDGETBOX){(function(){var D=false;var C=function(){WIDGETBOX.setPageLoaded();};var B=function(){WIDGETBOX.setPageUnloaded();};WIDGETBOX={libs:{},version:"41509",urls:{runtimeBaseUrl:"http://widgetserver.com/syndication",galleryBaseUrl:"http://www.widgetbox.com",cdnRuntimeBaseUrl:"http://cdn.widgetserver.com/syndication",cdnGalleryBaseUrl:"http://pub.widgetbox.com",metricsBaseUrl:"http://t.widgetserver.com/t",proxyBaseUrl:"http://p.widgetserver.com/p",markupRuntimeBaseUrl:"http://widgetserver.com/syndication",mobileSiteRuntimeBaseUrl:"http://m.wbx.me",linkbarBaseUrl:"http://l.wbx.me/l",imageProxyBaseUrl:"http://i.widgetserver.com"},globals:{token:"",tokenTime:0,widgets:[],widgetCount:0,pageLoaded:false,pageUnloaded:false,eventListeners:[],pageLoadListeners:[],pageUnloadListeners:[],panels:[],panelCount:0,showPanelMarks:true,suppressGetWidget:false,disableGetWidget:false,suppressQuantcast:false,enableLogging:false,disableHitTracking:false,log:"",trustedPage:false,disableInstallerMenu:false,renderInstallerMenuInline:false,anchorEl:null,vid:null,startTime:new Date().getTime()},init:function(){if(!D){D=true;if(window.WIDGETBOXLOADLISTENERS){for(i=0;i<WIDGETBOXLOADLISTENERS.length;i++){A.addPageLoadListener(WIDGETBOXLOADLISTENERS[i]);}}A.addEvent(window,"load",C);A.addEvent(window,"unload",B);if(window.WIDGETBOXINITLISTENERS){for(i=0;i<WIDGETBOXINITLISTENERS.length;i++){try{WIDGETBOXINITLISTENERS[i]();}catch(E){WIDGETBOX.logMessage(E);}}}}},namespace:function(G){G=G.replace(".","/");if(G.indexOf("WIDGETBOX/")===0){G=G.substr(10);}if(G.indexOf("POSTAPP/")===0){G=G.substr(8);}var E=G.split("/");var I=WIDGETBOX;if(E){var H;for(var F=0;F<E.length;F++){H=E[F];if(!I[H]){I[H]={};}I=I[H];}}return G;},logMessage:function(E){if(A.globals.enableLogging){A.globals.log+=E+"\n";}},newLibInfo:function(G){G=G.replace(".","/");var J=G;var H="";var F=G.lastIndexOf("/");if(F>=0){H=G.substr(0,F);J=G.substr(F+1);}H=A.namespace(H);G=H+"/"+J;var I=G.replace("/","_").toLowerCase();var E={ns:H,name:J,path:G,id:I,status:null,callback:null};return E;},load:function(I,H,J){var G=A.newLibInfo(I);if(!WIDGETBOX.libs[G.id]){WIDGETBOX.libs[G.id]=G;G.status="loading";if(H){if(!G.listeners){G.listeners=[];}G.listeners.push(H);}var E=document.createElement("script");E.id="widgetbox_lib_"+G.id;E.type="text/javascript";E.setAttribute("async","true");if(!J){E.src=WIDGETBOX.urls.runtimeBaseUrl+"/"+G.path+".js?"+WIDGETBOX.version;}else{E.src=WIDGETBOX.urls.cdnRuntimeBaseUrl+"/"+G.path+".js?"+WIDGETBOX.version;}var F=document.documentElement.firstChild;if(!F||(F.nodeName&&F.nodeName.toLowerCase().indexOf("comment")>-1)){F=document.getElementsByTagName("head")[0];}F.appendChild(E);}else{G=WIDGETBOX.libs[G.id];if(H){if(G.status=="ready"){try{H(G);}catch(K){WIDGETBOX.logMessage(K);}}else{if(!G.listeners){G.listeners=[];}G.listeners.push(H);}}}},ready:function(F){var E=A.newLibInfo(F);if(!WIDGETBOX.libs[E.id]){WIDGETBOX.libs[E.id]=E;}E=WIDGETBOX.libs[E.id];return E.status=="ready";},setReady:function(G){var F=A.newLibInfo(G);if(!WIDGETBOX.libs[F.id]){WIDGETBOX.libs[F.id]=F;}F=WIDGETBOX.libs[F.id];F.status="ready";if(F.listeners){var E=0;for(E=0;E<F.listeners.length;E++){var H=F.listeners[E];try{H(F);}catch(I){WIDGETBOX.logMessage(I);}}}},addEvent:function(I,H,F,E){if(I.addEventListener){I.addEventListener(H,F,E);return true;}else{if(I.attachEvent){var G=I.attachEvent("on"+H,F);return G;}else{alert("Handler could not be attached");}}},removeEvent:function(H,G,F,E){if(H.removeEventListener){H.removeEventListener(G,F,E);return true;}else{if(H.detachEvent){return H.detachEvent("on"+G,F);}else{alert("Handler could not be removed");}}},addEventListener:function(E,G){if(G){if(!A.globals.eventListeners){A.globals.eventListeners={};}if(!A.globals.eventListeners[E]){A.globals.eventListeners[E]=[];}var F=A.globals.eventListeners[E];F[F.length]=G;}},notifyEventListeners:function(F){if(!A.globals.eventListeners){return ;}var G=A.globals.eventListeners[F];if(!G){return ;}for(var E=0;E<G.length;E++){var H=G[E];try{H(this);}catch(I){WIDGETBOX.logMessage(I);}}},addPageLoadListener:function(E){if(E){if(!A.globals.pageLoaded){A.globals.pageLoadListeners.push(E);}else{try{E();}catch(F){WIDGETBOX.logMessage(F);}}}},addPageUnloadListener:function(E){if(E){if(!A.globals.pageUnloaded){A.globals.pageUnloadListeners.push(E);}else{try{E();}catch(F){WIDGETBOX.logMessage(F);}}}},setPageLoaded:function(){if(A.globals.pageLoaded){return ;}A.globals.pageLoaded=true;A.removeEvent(window,"load",C);var F=A.globals.pageLoadListeners;var E;for(E=0;E<F.length;E++){try{F[E]();}catch(G){WIDGETBOX.logMessage(G);}}},setPageUnloaded:function(){if(A.globals.pageUnloaded){return ;}A.globals.pageUnloaded=true;A.removeEvent(window,"unload",B);var E=A.globals.pageUnloadListeners;for(i=0;i<E.length;i++){try{E[i]();}catch(F){WIDGETBOX.logMessage(F);}}},generateGUID:function(H,E){var I=(H)?H:Math.random;var K=(E)?36:32,M="0123456789abcdef".split(""),F,G=[];if(E){G[8]=G[13]=G[18]=G[23]="-";G[14]="4";}for(var J=0;J<K;J++){if(!G[J]){F=0|I()*16;G[J]=M[(J==19)?(F&3)|8:F];}}var L=G.join("");if(!WIDGETBOX.globals.vid){WIDGETBOX.globals.vid=L;}return L;},generateProxiedImageUrl:function(E,H,G,F){var I=E;I=this.urls.imageProxyBaseUrl+"/ip/origin=="+encodeURIComponent(I);if(H){I+="&&w=="+Math.round(H);}if(G){I+="&&h=="+Math.round(G);}if(F){I+="&&type=="+F;}I+="?token="+WIDGETBOX.globals.token;return I;},createElement:function(F,E){if(E){return E.ownerDocument.createElement(F);}else{return document.createElement(F);}}};POSTAPP=WIDGETBOX;var A=WIDGETBOX;A.init();})();} // //SOF: subscriber/InsertWidget.js // //support rendering a widget in an element by supplying and id to the element WIDGETBOX.renderWidgetInElement = function(appId, parentNodeId) { return WIDGETBOX.renderWidget(appId, false, parentNodeId); }, WIDGETBOX.renderWidget = function(appId, mode, parentNodeId) { if (!parentNodeId) { parentNodeId = "widgetbox_widget_parent_" + WIDGETBOX.globals.widgetCount++; document.write("<div id=\"" + parentNodeId + "\" style=\"line-height:0\"></div>"); } function libReadyCallback() { var parentNode = document.getElementById(parentNodeId); if (!parentNode) { document.write("<div id=\"" + parentNodeId + "\" style=\"line-height:0\"><span style=\"visibility:hidden\">-</span></div>"); parentNode = document.getElementById(parentNodeId); } WIDGETBOX.subscriber.Main.insertWidget(appId, null, parentNode, mode, null, null); } WIDGETBOX.load("subscriber.Main", libReadyCallback, true); }; // //EOF: subscriber/InsertWidget.js What do i change and do to make this work? can u like make games like pong wikth javascript? my friend said he did, but i dont think u can.
Hi there, I am looking to make a javascript hover menu. Like the main hover menus at websites like... http://www.godaddy.com and http://www.mediatemple.com How can i do this? Are there any tutorials? And is javascript the best language to do this in, or ajax or web2.0 ? hey, i am trying to add events to my website...i have all the events stored in my google calender and i am trying to show only four events at the time for example: 10/01/2011 - John's Birthday 12/01/2011 - Party i found this example on google however i am having problems...the problem i am having is that it works fine on my computer however when i look at it on another computer nothing appears http://gdata-javascript-client.googl...le_sample.html thanks |