JavaScript - Load Page Script
Hi,
I was wondering how to add a "loading page please wait" page to my web page, and then run any javascript only after the page loads? My web page contains some fade in/out scripts for pages, and all my pages are basically just divs and in one html file. Just a simple black container (not entire web page) with the words "loading" or something would be fine, then this page would fade out, then my main page would fade in. Thanks. Similar TutorialsHey every1. Im a web design student who is trying to make my first webpage for a school project. my problem: I have 2 javascripts i would like to run smooth on my page, but they wont. I have read the info about using the <body onload="dothis()"; "dothat()"> but my problem is the way the 1 javascript is made. i believe so that is. First script: A matrix look-a-like screen for a link. Code: <script type="text/javascript"> // <![CDATA[ var height=9; // height of the effect in rows - must be an odd number var speed=66; // lower is faster var reveal=99; // between 0 and 100 // the higher, the faster the word is 'decoded' var repeat=10; // if '0' the script does not repeat // if set to a number this is the delay until the script repeats var alink="http://www.noma.nu"; // place to link to // set to alink="" if not needed /***************************\ * The Matrix JavaScripted.. * *(c) 2003-6 mf2fm web-design* * http://www.mf2fm.com/rv * * DON'T EDIT BELOW THIS BOX * \***************************/ var timer, table, x, y, columns, ma_txt, ma_cho; reveal/=100; var m_coch=new Array(); var m_copo=new Array(); window.onload=function() This is part im having troubles with. If i do as your toturial tells me i should put Function() down in the body onload command. But it wont work. { if (document.getElementById) { var matrix, tbody, tr, td; matrix=document.getElementById("matrix"); ma_txt=matrix.firstChild.nodeValue; ma_txt=" "+ma_txt+" "; columns=ma_txt.length; while (matrix.childNodes.length) matrix.removeChild(matrix.childNodes[0]); table=document.createElement("table"); table.cellSpacing=0; table.style.margin="auto"; table.style.width="auto"; table.style.border="none"; tbody=document.createElement("tbody"); for (x=0; x<height; x++) { tr=document.createElement("tr"); for (y=0; y<columns; y++) { td=document.createElement("td"); td.className="matrix"; td.appendChild(document.createTextNode(String.fromCharCode(160))); tr.appendChild(td); } tbody.appendChild(tr); } table.appendChild(tbody); matrix.appendChild(table); ma_cho=ma_txt; for (x=0; x<columns; x++) { m_copo[x]=0; ma_cho+=String.fromCharCode(32+Math.floor(Math.random()*94)); } x=0; timer=setInterval("mytricks()", speed); }} function mytricks() { var mtmp, mrow; var z=x; x=0; for (y=0; y<columns; y++) { x=x+(m_copo[y]==100); mrow=m_copo[y]%100; if (mrow && m_copo[y]<100) { if (mrow<height+1) { mtmp=table.rows[mrow-1].cells[y]; mtmp.firstChild.nodeValue=m_coch[y]; mtmp.style.color="#33ff66"; mtmp.style.fontWeight="bold"; } if (mrow>1 && mrow<height+2) { mtmp=table.rows[mrow-2].cells[y]; mtmp.style.fontWeight="normal"; mtmp.style.color="#00ff00"; } if (mrow>2) table.rows[mrow-3].cells[y].style.color="#009900"; if (mrow<Math.floor(height/2)+1) m_copo[y]++; else if (mrow==Math.floor(height/2)+1 && m_coch[y]==ma_txt.charAt(y)) zoomer(y); else if (mrow<height+2) m_copo[y]++; else if (m_copo[y]<100) m_copo[y]=0; } else if (Math.random()>0.9 && m_copo[y]<100) { if (reveal>Math.random() && (z+1)/columns>Math.random()) m_coch[y]=ma_cho.charAt(y); else m_coch[y]=ma_cho.charAt(Math.floor(Math.random()*ma_cho.length)); m_copo[y]++; } } if (x==columns) { if (repeat) { ma_cho=ma_txt; for (x=0; x<columns; x++) { m_copo[x]=0; ma_cho+=String.fromCharCode(32+Math.floor(Math.random()*94)); } } else clearInterval(timer); } } function zoomer(ycol) { var mtmp, mtem, ytmp; if (m_copo[ycol]==Math.floor(height/2)+1) { for (ytmp=0; ytmp<height; ytmp++) { mtmp=table.rows[ytmp].cells[ycol]; mtmp.firstChild.nodeValue=m_coch[ycol]; mtmp.style.color="#33ff66"; mtmp.style.fontWeight="bold"; if (alink) { mtmp.style.cursor="pointer"; mtmp.onclick=function() {window.location.href=alink}; } } mtmp=ma_cho.indexOf(ma_txt.charAt(ycol)); m_copo[ycol]+=199; setTimeout("zoomer("+ycol+")", speed); } else if (m_copo[ycol]>200) { mtmp=table.rows[m_copo[ycol]-201].cells[ycol]; mtem=table.rows[200+height-m_copo[ycol]].cells[ycol]; m_copo[ycol]-=1; mtmp.style.fontWeight="normal"; mtem.style.fontWeight="normal"; setTimeout("zoomer("+ycol+")", speed); } else if (m_copo[ycol]==200) m_copo[ycol]=100+Math.floor(height/2); if (m_copo[ycol]>100 && m_copo[ycol]<200) { mtmp=table.rows[m_copo[ycol]-101].cells[ycol]; mtmp.firstChild.nodeValue=String.fromCharCode(160); mtem=table.rows[100+height-m_copo[ycol]].cells[ycol]; mtem.firstChild.nodeValue=String.fromCharCode(160); m_copo[ycol]-=1; setTimeout("zoomer("+ycol+")", speed); } } // ]]> </script> Second script: a simple digital clock. Code: <script type="text/javascript"> function showClock() { // create a new Date() object var currentTime=new Date(); var hours=currentTime.getHours(); var minutes=currentTime.getMinutes(); var seconds=currentTime.getSeconds(); var area=currentTime.getTimezoneOffset(); area=area/60; var clock=hours; // add a zero in front of numbers<10 if (minutes<10){ minutes="0" + minutes; } if (seconds<10){ seconds="0" + seconds; } document.getElementById('clock').innerHTML="<table><tr><td width=80 align=center>"+clock+":"+minutes+":"+seconds+"</td>" +"" +""; t=setTimeout('showClock()',500); // setTimeout calls showClock() function every 500 miliseconds, that means 0.5 seconds } </script> <body onload="showclock()"> this is where the clock load. It works fine. how do i get the other script to load with this. I can get them both to run but not at same time. Any1 outthere who have a solution. I believe it has something to do with Function() part in the matrix code. can i change that do another command? I am trying to run this script when the page loads I have tried different methods but still no luck I would appreciate it if somebody help me out [CODE]<a href="http://s230999743.mysite.com/768K.WMA" onclick="var win=window.open('','mywindow','height=523, width=640');win.document.write('\x3Chtml\x3E\x3Chead\x3E\x3Ctitle\x3EVideo Window\x3C/title\x3E\x3Cstyle\x3Ehtml,body {margin:0;padding:0;}\x3C/style\x3E\x3C/head\x3E\x3Cbody\x3E\x3Cembed src=\'http://s230999743.mysite.com/768K.WMA\' width=\'640\' height=\'523\' autostart=\'1\' showcontrols=\'1\' type=\'application/x-mplayer2\' pluginspage=\'http://www.microsoft.com/windows/windowsmedia/download/\'\x3E \x3C/embed\x3E\x3C/body\x3E\x3C/html\x3E');return false;">Enter link text here.</a>[CODE] Hey guys. I host a private website that I use to broadcast my DJ mixes live to my friends. I'm currently using a PHP script on the home-page to say whether I'm broadcasting currently, or if I'm offline. The script works great, but it really slows down the page loading time. Is there a way to have the page load, and then just have the "Status:" say "Checking..." until the PHP script can determine if I'm streaming or offline? This is my PHP code: PHP Code: <?php if (url_validate($link)) { echo "LIVE"; } else { echo "OFFLINE"; } ?> Thank you! Hi I'm trying to load a part of a page (that has script in it) into another page using jquery. However, though the html loads in correctly, none of the script is working. I'm using code from http://css-tricks.com/video-screenca...namic-content/ ie. the pages all work without java (static pages) and when java is enabled, instead of going to bio.html you get taken to ..#bio.html. However if I've got any script I would like to be loaded .. ie. lightbox gallery or even a simple jav split and put back together email address hider. Any help greatly appreciated. I'm not very clued up about jquery at the moment unfortunately and though I've been trying to read and learn, alot is going over my head.. Not sure how best it is to show you the page as it's not live yet. Maybe if it helps I can upload a zip of the site. It's a simple 6 page musician site. Though my code is exactly like the css-tricks page, just that I have a lightbox on one page (which loads fine if there's no hash in the address - but when hash is there, it shows thumbnails, and when you click one, it just takes you to the larger .jpg destination page (no lightboxness etc).) Thanks I doubt this is possible, but I have no idea what actually happens when a page loads, so I thought I would give it a shot... if a js file that is loaded externally has parameters, is it possible to turn those parameters into variables, giving the user the option to select the variable's value after the page has loaded? maybe a concrete example would be better... in google maps, the api is loaded like this: Code: <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> but if you wanted to specify that you want the api to function in Spanish, you load it like this: Code: <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language=es"></script> and that language=es is the one that I want to change. But I can't seem to make it into a variable on page load, like this: Code: <script type="text/javascript"> var lang="es"; </script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language=lang"></script> much less make it changeable once the page has loaded. I have a feeling that this is a really dumb question, but can it be done without reloading the entire page? Hi all Is there a way to get the image(s) to load into the table after the page has loaded instead of the way I have it now? I have 4 tabs, but I would like the imgs in tabs 2,3,4 to load after page load. Example of how the tabs look. Code: <div class="tabbertab"> <h2>Australia_____</h2> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFCC"> <caption class="highlight_Red">澳洲 Australia </caption> <tr> <td><a href="pages/promotion.html#aus_ACE" rel="nofollow" target="_blank"><img src="pages/images/Pics/AUS/ace.jpg" alt="ACE / ATTC" width="110" height="69" border="0" align="left" class="ozimg_L"/> ...a few more images etc the other tabs look the same. LT This script displays a link to a registration/login form that loads in a light box for Joomla. I've been goin nuts trying to figure out how to get this to load on page load with a delay. Anyone know how to get this done? PHP Code: <?php JHTML::_('behavior.mootools'); $document = JFactory::getDocument(); $document->addStyleSheet(JURI::base() . 'media/system/css/modal.css'); $document->addScript(JURI::base() . 'media/system/js/modal.js'); $document->addScriptDeclaration("window.addEvent('domready', function() {SqueezeBox.initialize({});});"); $user = & JFactory::getUser(); $uri = JFactory::getURI(); $url = $uri->toString(); $return = base64_encode($url); ?> <div id="lbframeid" style="position:absolute;top:1px;left:1px;height:0px;width:0px;overflow:hidden"> <a href="http://www.wowjoomla.com/"><h1>Joomla Login LightBox powered by WowJoomla.com</h1> </a> </div> <?php if ($user->get('guest')) :?> <a href="<?php echo JRoute::_('index.php?option=com_loginbox')?>" onclick="SqueezeBox.fromElement(this); return false;" rel="{handler: 'iframe', size: {x: 660, y: 500}}"><?php echo JText::_('SIGNUP_LOGIN')?></a> <?php else: ?> <?php echo JText::sprintf( 'HINAME', $user->get('name') ); ?> <br> <a href="javascript:void(0);" onclick="LB_onLogout(); return false;"><?php echo JText::_('LOGOUT')?></a> <?php endif; ?> <script type="text/javascript"> function LB_onLogout() { var form = new Element('form'); form.setProperty('method', 'POST'); form.setProperty('target', '_self'); form.setProperty('action', 'index.php'); var input = new Element('input'); input.setProperty('type', 'hidden'); input.setProperty('name', 'option'); input.setProperty('value', 'com_user'); form.appendChild(input); var input = new Element('input'); input.setProperty('type', 'hidden'); input.setProperty('name', 'task'); input.setProperty('value', 'logout'); form.appendChild(input); var input = new Element('input'); input.setProperty('type', 'hidden'); input.setProperty('name', 'return'); input.setProperty('value', '<?php echo $return; ?>'); form.appendChild(input); $E('body').appendChild(form); form.submit(); } </script> Hello. My goal is to load the JS for a specific element before displaying that element. I integrated a third part script, and it works well. I set the timer he The JS is in my heading as <script type="text/javascript" src="countdownpro.js"></script> About mid-body I have: <span id="countdown1">2010-07-20 00:00:00 GMT+00:00</span> which allows for the setting of a target date to countdown to. When the page first loads it shows the above long format target time, until the js/meta tags kick in to modify it to just show the actual countdown as 00:00:00. I have attached countdownpro.js to this post. I tried shifting the function CD_Init() to the top of the script, and also appended it inline with the .html. I tried setting the big external script to "defer", but neither arrangement worked. I also tried placing the src file right at the top. I appreciate your help. Hi All, Im new to this forum...need some of your help and advice. I have a js code like this : <script type="text/javascript"> <!-- var sipPos = 0; $(document).ready(function() { $("#panel-tab").click(function(e) { //if(autoTimer) clearTimeout(autoTimer); //autoTimer = null; e.preventDefault(); $("#panel").animate({ left: sipPos }, 1764, 'linear', function() { if(sipPos == 0) { sipPos = -856; } else { sipPos = 0; } }); }); }); --> </script> what it does is that it hide and show a panel by slidint it to the left. But my client want that on page load the panel opens automatically for about 2-3 seconds just to let users know that its here. So ive written this : <script type="text/javascript"> <!-- var sipPos = 0; $(document).ready(function() { var autoTimer = null; autoTimer = setTimeout(function(){ $("#panel").animate({ left: sipPos }); autoTimer = setTimeout(function(){ $("#panel").animate({ left: sipPos = -856 }); }, 2000); },1000); $("#panel-tab").click(function(e) { //if(autoTimer) clearTimeout(autoTimer); //autoTimer = null; e.preventDefault(); $("#panel").animate({ left: sipPos }, 1764, 'linear', function() { if(sipPos == 0) { sipPos = -856; } else { sipPos = 0; } }); }); }); --> </script> But when the panel finished showing the button to open it again doesn't work...any help please..really urgent. thks //Sam I want this script to load after the page load the script is: Code: <script type="text/javascript" src="http://localtimes.info/clock.php?cp3_Hex=0F0200&cp2_Hex=FFFFFF&cp1_Hex=000080&fwdt=118&ham=0&hbg=0&hfg=0&sid=&mon=&wek=&wkf=&sep=&continent=Asia&country=Indonesia&city=Jakarta&widget_number=116"></script> the script in My page is like: 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>My test page</title> </head> <body> <h1>Tony</h1> <h2>Welcome Tony Website</h2> <script type="text/javascript" src="http://localtimes.info/clock.php?cp3_Hex=0F0200&cp2_Hex=FFFFFF&cp1_Hex=000080&fwdt=118&ham=0&hbg=0&hfg=0&sid=&mon=&wek=&wkf=&sep=&continent=Asia&country=Indonesia&city=Jakarta&widget_number=116"></script> <h3>Tony is ... and is....</h3> <h3>He will....</h3> </body> </html> So how can I make this script loads after all elements of My page are loaded and without changing it's position (the script position)? Hello, Well I have script that claims that it loads the flash content while it is showing seconds or advertisement. So as I don't know about scripts I have no Idea if it actually do that or not as What I visually see is that it let flash content load once the seconds of disappears. So that's why I want an expert advice on it. And how the seconds of this script works Only if this script actually do what It claims, then I would like to know when does it send alert to load the content (as I would like to put the alert from the start) and how to show it for more or less seconds. Relevant Markup: Live Demo http://files.cryoffalcon.com/MyFootP...%20Loader.html What is the live demo made up of: Code: <div class="colorchooser"> <!--more--> <div class="displaygame_part"> <center> <div id="ads" class="ads"> <h1> ADVERTISEMENT</h1> <center> <script type="text/javascript"><!-- google_ad_client = "ca-pub-0726197409084548"; /* bloghutsgame */ google_ad_slot = "5324930917"; google_ad_width = 336; google_ad_height = 280; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></center> To skip it click <a href="javascript:ShowHide();">here</a> <script type="text/javascript"> window.onload = function() { startCountDown(8, 1000); } function startCountDown(i, p, f) { // store parameters var pause = p; var fn = f; // make reference to div var countDownObj = document.getElementById("countDown"); if (countDownObj == null) { return; } countDownObj.count = function(i) { // write out count countDownObj.innerHTML = i; if (i == 0) { // execute function fn(); // stop return; } setTimeout(function() { // repeat countDownObj.count(i - 1); }, pause ); } // set it going countDownObj.count(i); } </script> <center> <img border="0" height="117" width="201" src="@---put the link of the image of fancy pants(its the loader)---@" /> </center> <div id="countDown" style="display: inline;"> </div> seconds for the game to load... </div> <div id="gamecontent" style="visibility:hidden; display:none"> <div class="gofulldear"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%"> <param name="movie" value="http://games.balloontowerdefense.net/b/balloon_tower_defense_4_expansion.swf"> <param name="quality" value="high"> <param name="allowNetworking" value="internal"> <embed src="http://games.balloontowerdefense.net/b/balloon_tower_defense_4_expansion.swf" width="100%" height="100%" align="center" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allownetworking="internal"></embed> </object> </div> </div> <script type="text/javascript"> function turn_vis_on(id) { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById(id).style.display = 'inline'; obj = document.getElementById(id); obj.style.visibility = "visible"; } } function turn_vis_off(id){ if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById(id).style.display = 'none'; obj = document.getElementById(id); obj.style.visibility = "hidden"; } } function ShowHide() { turn_vis_off("ads"); turn_vis_on("gamecontent"); // alert('4sec!'); } document.getElementById("ads").style.zIndex = 100; timeoutID = setTimeout(ShowHide, 15000); </script> </center></div> </div> Note: It is game so there can be sound or music in it./ For any more information requirement please let me know I will edit it, so to make it as relevant as possible^^. Hello Basically I have found and adapted the code: Code: alreadyloading = false; nextpage = 2; $(window).scroll(function() { if ($('body').height() <= ($(window).height() + $(window).scrollTop())) { if (alreadyloading == false) { var url = "page"+nextpage+".html"; alreadyloading = true; $.post(url, function(data) { $('#projectscontainer').children().last().after(data); alreadyloading = false; nextpage++; }); } } }); I want when the user scrolls to the bottom of the page for content in a new page to load under the div "#projectscontainer". So in the new page 'Page2.html" I have put 5 divs going down with content in... I want the new content to appear below "#projectscontainer'" Why won't this work? Anyone know? Thanks On this website... http://livedemo00.template-help.com/...21/index.html# When you click on the Navigation Bar the website pages load inside that page? How exactly would i go around doing this? Thankyou I am trying to make the following fill the value box when the page loads as opposed to pressing the button. I cant seem to do it. Any ideas?? PHP Code: <script> var keylist="abcdefghijklmnopqrstuvwxyz123456789" var temp='' function generatepass(plength){ temp='' for (i=0;i<plength;i++) temp+=keylist.charAt(Math.floor(Math.random()*keylist.length)) return temp } function populateform(enterlength){ document.pgenerate.output.value=generatepass(enterlength) } </script> <form name="pgenerate"> <input type="text" size=18 name="output"> <input type="button" value="Generate Password" onClick="populateform(this.form.thelength.value)"><br /> <b>Password Length:</b> <input type="text" name="thelength" size=3 value="7"> </form> Hi, Im trying to load a remote script but only if a statement is true.. Code: <script type="text/javascript"> var width=screen.width; if (width>1023); { // load remote script } </script> How would I go about this? And will it work if the script in php? Thank youu! EDIT: I realise its probably not the best practice but at the moment im having to use Code: <script language="javascript"> window.location.href = "index2.php?width=" + screen.width; </script> and on index2.php Code: <?php $res=$_GET['width']; if ($res > 1024) { include("header.php"); } ?> Any help would be greatly appreciated... I'm trying to get cross-browser column support working using the "css3-multi-column.js" script included in the following tutorial: http://www.cvwdesign.com/txp/article/360 The javascript works, making columns when the site is loaded in Firefox but I keep getting "access denied" errors for the ""css3-multi-column.js" script in Internet Explorer 8, resulting in no columns. I tested the tutorial's example in IE 8 (worked fine), then referred to the tutorial's example time and again checking for discrepancies but I can't seem to figure out where I'm going wrong. Here's an example on my site where columns are to appear: http://www.burnmyeye.org/site/about-us Thanks once again. How do I make my Script load faster? Is there Code that will make my Script load faster, (so that it won't take so long to view) If so, can someone show me how to incorporate it into my Example Script? With appreciation Hey guys, I've just started with javascript so please, be gentle I am making a wordpress plug-in which puts a banner-rotator on the front page which is able to load both images and flvs'. It has a carousel menuand the images/objects are loaded as you hover over the thumbnails. I have made an js array in a php loop so that every element of the menu list gets assigned a different onMouseOver function when it is generated. Because I was not able to change FlashVars with js I have put the whole object embed code in one variable and insert that in a div with innerHTML when mouseOver. This works fine in firefox but not at all in any other browsers!! What can I do? The website is located at: www.mediapod.org/jwp Here is the code: Code: function wp_main_player() { global $wpdb; $noChartsID = $wpdb->get_col($wpdb->prepare("SELECT * FROM wp_term_relationships WHERE term_taxonomy_id = 5")); $noCharts = count($noChartsID); ?> <div class="box" style="height:350px;"> <div id="maind" style="height:280px;"> <div id="icont"> <a id="link" href="#"><img name="main" height="280" width="560" src="" /></a> </div> <div id="fcont" style="display:none; width:100%; height:100%; background:#fff;"> </div> </div> <a class="pprev" style="float:left; width:10px; height:60px; margin-top:10px;" href="javascript:void(0)"></a> <div class="player" style="float:left; margin-top:11px; width:540px !important;"> <script> var myCode = []; </script> <ul style="float:left;"> <?php if ($noCharts > 0) { for ($i = 0; $i < $noCharts; $i += 1) { $posts = $wpdb->get_row("SELECT * FROM wp_posts WHERE id = $noChartsID[$i]", ARRAY_A); $link = $wpdb->get_row("SELECT * FROM wp_postmeta WHERE post_id = $noChartsID[$i] AND meta_key ='link'", ARRAY_A); $link = $link['meta_value']; $image = $posts['post_content']; $flv = strpos($image, 'flv:'); if ($flv==1){ $flv = str_replace("-flv:", "", $image); $flv = substr(rstrstr($flv, '-img:'),0 ,-6); $image = substr(strstr($image, '-img:'), 5); ?> <script> myCode[<?php echo $i; ?>]=<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="560" height="280" id="FlashXMLShoutcastRadioPlayerV4.0" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://www.mediapod.org/jwp/wp-content/plugins/JRockControll/FLVPlayer_Progressive.swf" /> <param name="menu" value="false" /> <param name="quality" value="high" /> <param name="wmode" value="opaque" ></param> <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=http://www.mediapod.org/jwp/wp-content/plugins/JRockControll/Corona_Skin_1&streamName=<?php echo $flv; ?>&autoPlay=true&autoRewind=false" /> <param name="bgcolor" value="#111111" /> <embed bgcolor="#111111" wmode="opaque" src="http://www.mediapod.org/jwp/wp-content/plugins/JRockControll/FLVPlayer_Progressive.swf" menu="false" FlashVars ="&MM_ComponentVersion=1&skinName=http://www.mediapod.org/jwp/wp-content/plugins/JRockControll/Corona_Skin_1&streamName=<?php echo $flv; ?>&autoPlay=true&autoRewind=false" quality="high" width="560" height="280" name="FlashXMLShoutcastRadioPlayerV4.0" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>; </script> <li class="p_img"><img onmouseover="document.getElementById('icont').style.display='none';document.getElementById('fcont').style.display=''; document.getElementById('fcont').innerHTML=myCode[<?php echo $i; ?>]; document.main.src='<?php echo $image;?>'; document.getElementById('link').href='<?php echo $link;?>';" src="<?php echo $image;?>" height="52" width="102" /></li> <?php } else { ?> <li class="p_img"><img onmouseover="document.getElementById('icont').style.display=''; document.getElementById('fcont').innerHTML=''; document.getElementById('fcont').style.display='none'; document.main.src='<?php echo $image;?>'; document.getElementById('link').href='<?php echo $link;?>';" src="<?php echo $image;?>" height="52" width="102" /></li> <?php } } } ?> </ul> </div> <a class="pnext" style="float:right; width:10px; height:60px; margin-top:10px;" href="javascript:void(0)"></a> <script type="text/javascript"> jQuery(function() { jQuery(".player").jCarouselLite({ btnNext: ".pnext", btnPrev: ".pprev", speed: 300, visible: 5 }); }); </script> </div> <?php } It is an absolute mess Thank you. I'd like to place an AJAX call to load another SELECT menu in my form, and I'm having trouble finding a tutorial. Can someone point me to a good tute, or provide some guidance/examples here? For your Copying/Pasting pleasure , here's an example button for which I'd include the onclick(): Code: <button type="button" >Add</button> And here's an example SELECT menu: Code: <select id="idNumber" name="weekday_1['workPeriod_new'][] > <option value="1" >one</option> <option value="2" >2</option> </select> Thanks-a-bunch, ~ Mo NOTE: Overall, I'm pretty green in JS. Hello, I don't know if this can be done in Javascript, or requires any other language but i was wondering if this would be possible. I would like to embed this Javascript code in to a PHP file and then for it to run automatically upon the PHP file loading: Code: <td class="smallDesc"> <a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script> </td> The Javascirpt is the Facebook Share button that basically allows users that have Facebook to share the page there currently on in their Facebook status by pressing the button, but if there not logged in it shows the login page, not a problem just continue the script. The current button i which is what i want to load automatically in the PHP file is located here, to test the functionalilty just click "Share" button in blue.. http://watch-movies-online.anyfilman...-Movie-17.html To summarise, i would like the above Javascript code to execute automatically upon pageload of this PHP file.. http://www.watch-movies-online.anyfi...p://google.com. If that could be done, and if this also is possible.. i would like for the "Share" button on the external page that is loaded from the Javascript code above to be clicked automatically so in effect when ever someone visits the PHP page after clicking "Click Here to Watch/Stream 2012 Online For Free" on this page it will automatically load the Facebook Share box, and automatically click the "Share" Button and then close the page if possible, but not required. Please feel free to ask any questions, i'll be happy to answer. Thanks in advance. Best Regards, Jonathan. |