JavaScript - Previously Functioning Script Not Responsive Anymore!
I have a CMS that was built for our company website that relies on some JS to upload media through a regular browser directly to be displayed on our site. There is a button one clicks to upload video. When clicked the file browser on your computer is supposed to pop-up so you can choose the media you would like to upload.
This button no longer is responsive on any of my 12 mac desktops in any common browser nor my mac laptop which is on a different OS X version. Any ideas? Here is the script from the page: [CODE] <script type="text/javascript"> var upload1; window.onload = function() { upload1 = new SWFUpload({ // Backend Settings upload_url: "/08/assets/includes/php/uploadGall.php?id=<?php echo $id; ?>", // Relative to the SWF file (or you can use absolute paths) post_params: { "PHPSESSID" : "<?php echo session_id(); ?>"}, // File Upload Settings file_size_limit : "3102400", // 100MB file_types : "*.*", file_types_description : "All Files", file_upload_limit : "1", file_queue_limit : "1", // Event Handler Settings (all my handlers are in the Handler.js file) file_dialog_start_handler : fileDialogStart, file_queued_handler : fileQueued, file_queue_error_handler : fileQueueError, file_dialog_complete_handler : fileDialogComplete, upload_start_handler : uploadStart, upload_progress_handler : uploadProgress, upload_error_handler : uploadError, upload_success_handler : uploadSuccess, upload_complete_handler : uploadComplete, // Flash Settings flash_url : "/08/assets/includes/js/swfupload/swfupload_f8.swf", // Relative to this file (or you can use absolute paths) swfupload_element_id : "flashUI1", // Setting from graceful degradation plugin degraded_element_id : "degradedUI1", // Setting from graceful degradation plugin custom_settings : { progressTarget : "fsUploadProgress1", cancelButtonId : "btnCancel1" }, // Debug Settings debug: false }); }; var n=new Date().getTime();var c=escape(n*1000+Math.round(Math.random()*1000)); $(document).ready(function() { $('#nav_entry div.sub').each(function(i) { $(this).hide(); }); $('#nav_entry div.title').each(function(i) { $(this).click(function() { $(this).siblings('.sub').slideDown('fast'); $(this).parent().siblings('.ne').children('.sub').slideUp(); }); }); $('img.mover').hide(); <?php if(!$errors) { ?> $("#addEntry").hide(); $("a#nevermind_post").hide(); <?php } else { ?> $("a#add_driver_btn").hide(); <?php } ?> $("a#add_driver_btn").click(function() { $(this).hide(); $("a#nevermind_post").show(); $("#addEntry").slideDown('slow'); }); $("a#nevermind_post").click(function() { $(this).hide(); $("a#add_driver_btn").show(); $("#addEntry").slideUp('slow'); }); }); </script>[CODE] And here is where the button lies in the page: [CODE] <input type="button" value="Upload file (Max 200 MB)" onclick="upload1.selectFiles()" style="font-size: 8pt;" />[CODE] THANKS! Similar TutorialsHow can i go about showing on screen a count from an initial value to an end value over a set time period. Initial value = 0 End value = 2000 Time = 25 seconds I cant find an example of this anywhere, so I'm trying here to see if somebody can help HI all, maybe someone can help me. I am using this script: http://www.javascriptkit.com/script/...selector.shtml on my site but as of Feb 1st 2012 the day of the week and the date do not match anymore. Feb 1st 2012 is not a thursday. Try example on site (link) to see what I mean. Can anyone help me debug this? Any help greatly appreciated Dennis Hi, I have created a site and on one page it uses 2 divs side by side to display text information. in the left hand div it contains 8 links. these links when clicked load up text stored in separate text files and display it in the right hand div. The code below was working when i ran it from my mac but when i try to load it off the webhost it fails to execute. Code: $(document).ready(function() { $("#mc").click(function() { $("#innertext").load('mc.txt'); }); $("#sd").click(function() { $("#innertext").load('sd.txt'); }); $("#ma").click(function() { $("#innertext").load('ma.txt'); }); $("#rtm").click(function() { $("#innertext").load('rtm.txt'); }); $("#cm").click(function() { $("#innertext").load('cm.txt'); }); $("#r").click(function() { $("#innertext").html('r.txt'); }); $("#bp").click(function() { $("#innertext").load('bp.txt'); }); $("#pc").click(function() { $("#innertext").load('pc.txt'); }); }); Code: <div class="wrapper p2"> <ul class="list1 col-1"> <li>> <a href="javascript:void(0);" onclick="function("mc");" id="mc">Consultancy</a></li> <li>> <a href="javascript:void(0);" onclick="function("sd"); id="sd">Strategy</a></li> <li>> <a href="javascript:void(0);" onclick="function("ma"); id="ma">Market Assessment</a></li> <li>> <a href="javascript:void(0);" onclick="function("rtm"); id="rtm">Routes to Market</a></li> </ul> <ul class="list1 col-2"> <li>> <a href="javascript:void(0);" onclick="function("cm"); id="cm">Change management</a></li> <li>> <a href="javascript:void(0);" onclick="function("r"); id="r">Restructuring</a></li> <li>> <a href="javascript:void(0);" onclick="function("bp"); id="bp">Planning</a></li> <li>> <a href="javascript:void(0);" onclick="function("pc"); id="pc">Project management</a></li> </ul> </div> here is a link to the page on the webhost-- http://herkes.host56.com/index-2.html Any ideas to why this does not work? any help is appreciated JavaScript code responsive quiz I live in turkey. Can you write me such a code for my site? I have a nice little script that changes a company's logo (displayed in a side bar) when the user mouses over a part of an image map. Here is the basic code: Code: <head> <?php $s1 = "$otmm_image_string"; // this is a string of all the images// $qs1 = "\"".implode("\",\"",explode(",",$s1))."\""; <script type="text/javascript"> function doChanges(y){ var z= y; var imagevar = myimages[z]; var imagethis = this.href; changeimage(imagevar,imagethis); } </script> <script type="text/javascript"> function changeimage(towhat,url){ if (document.images){ document.images.targetimage.src=towhat.src gotolink=url } } function warp(){ window.location=gotolink } </script> <script type="text/javascript"> 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(<?echo("$qs1");?>); </script> </head> <body> <a href="javascript:warp()"><img src="/images/OnTheMiningMap/rilogo.png" name="targetimage" border="2"></a> <img src="http://www.the-rational-investor.com/images/OnTheMiningMap/<?echo("$map_version");?>" BORDER="2" usemap="#mymap"> <MAP NAME="mymap"> <area shape="rect" coords="<?echo("$rilogo_x_start");?>,<?echo("$rilogo_y_start");?>,<?echo("$rilogo_x_end");?>,<?echo("$rilogo_y_end");?>" onMouseover="doChanges(0)" href="http://www.therationalinvestor.ca/" rel="nofollow" target="_blank" Title="The Rational Investor" alt="The Rational Investor"> </body> My question is, how can I get three different images (company logo, weekly price chart and monthly price chart - all of which are in an image folder on my server) to change on this one mouseover event. They are all displayed on a side bar individually. I tried replicating the function three times and altering each function's name but that ended up screwing the whole thing up. Any thoughts/suggestions would be greatly appreciated, Brian I'm attempting to have the example code section which is currently commented out to keep from code spamming this forum to react with the IF statement created within the FUNCTION that I called "calc". The code in the example section does work, however the FUNCTION or IF statement is not working. Could anyone help me visualize the problem. Thank you Code: <select name="ship_country" id="ship_country" style="min-width:200px;" onclick="calc;"> <option value="" selected="selected"></option> <option value="United States">United States</option> <option value="Canada">Canada</option> </select> <script type="text/javascript"> function calc() { if (document.getElementById("ship_country").value = ("United States");) { // Example comment representing a lot nonsequential code pertaining to this topic. } } </script> I have a form and javascript that doesn't work correctly. I think there's a problem with the javascript, but it's possible the form is the culprit. I'm new at this. Here is the form code for a search boxx: Code: <form id="search" method="get" name="search" action="promotions.html"> <input type="text" size="15" name="ws" maxlength="500" value="pen, keychain, etc." onfocus="this.value='';return false;" /> <button type="submit" value="Search">Go</button> <input type="hidden" name="ID" value="64857723-2161-4778-BDEB-3EE622F6CFF3" /> </form> Here is the javascript that's in the head of /promotions.html: Code: <script type="text/javascript"> function FrameRedirect() { var q = window.location.search; q = (q.length > 1) ? q.substring(1, q.length) : 0; var s = q.substring(0, 2); switch (s) { case 'ws': q = 'http://www.asiconnection.com/ProductSearch/LinkInQS.aspx?'+q; document.getElementById('Content').className = 'active'; break; case 'bn': q = q.substring(3,q.length); document.getElementById('RD2').className = 'active'; break; default: document.getElementById('RD1').className = 'active'; break; } iframe = '<iframe id="frame" src="'+q+'" width="780" scrolling="yes" frameborder="0" height="500"></iframe>'; document.getElementById('Content').innerHTML = iframe; } </script> The search box code is suppose to send the inputted search word to the javascript on /promotions.html page and then load the search results http://www.asiconnection.com/Product.../LinkInQS.aspx into the iframe on that page. The only thing that appears in that iframe is "Oops. Firefox cannot find productsearch" Can someone help me figure this out? Thanks in advance. This <div> layer positioned always at bottom left of the screen on scrolling (and calling some code from labpixies) works well in non-ie browsers, but in ie it requires the omission of the doctype declaration. Why? Is it possible to fix it so that it works with the doctype in ie? Code: <!doctype html> <html lang="en"> <head> <title></title> </head> <body> <div id="master" style="position: absolute; left: -120px; top: 11px; width: 350px; height: 0px"> <div id="menu" style="position: absolute; left: 117px; top: 12px"> <table border="0" width="18" cellspacing="0" cellpadding="0"> <tr> <td width="100%"> <a href="javascript:expand();" onfocus="this.blur()"> <img name="menutop" border="0" src="images/translate.gif" width="23" height="152"></a></td> </tr> </table> </div> <div id="screen" style="position: absolute; left: -138px; top: 12px; "> <table border="0" align="center" cellpadding="0" cellspacing="0" style="margin:0px; padding:0px; border:1px solid #000000;"> <tr> <td style="padding-left:0px; height:0px; line-height:15px; background-color:#000000;"> <a href="http://www.labpixies.com" style="font-family: Arial,Verdana; font-size:12px; font-weight:bold; text-align:left; text-decoration:none; color:#ffffff;"> Gadget by LabPixies.com</a></td> </tr> <tr> <td> <iframe allowtransparency="true" align="top" scrolling="no" width="256" height="135" frameborder="0" src="http://cdn.labpixies.com/campaigns/babylon/babylon.html" target="_self"> </iframe></td> </tr> </table> </div> </div> <script type="text/javascript"> var sidemenu = document.getElementById('master'); function FixY() { screenWidth = screen.width; if (screenWidth == 1024) { var yside = 390; } else if (screenWidth == 1152) { var yside = 400; } else if (screenWidth == 1280) { var yside = 400; } else { var yside = 450; } if(document.body.scrollTop != "undefined") sidemenu.style.top = document.body.scrollTop+yside+'px'; else sidemenu.style.top = window.pageYOffset+yside+'px'; } setInterval("FixY()",100); </script> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </body> </html> I am trying to install a simple slider/carousel in the middle of a web page. I opted for the JCarouselLite plug-in but can't seem to get it working. When the page loads, the images tile vertically(as opposed to line up horizontally) and the nav buttons sit below them. I have included necessary links to jQuery,the Carousel plug-in and also a custom.js file that includes a call to the plug-in to activate it(i think). I also have linked to a custom.css file to style the bar. I am wondering if my call to the plug-in is coded correctly. Beyond that, I can't understand why it isen't working. It is probably obvious but I'm a bit stuck! Could anyone help? I have attached the code showing the html, the custom.js function and the css. Thanks, nevblanc79 HTML: Code: <div id="carousel"> <h3>Our Titles</h3> <div class="carousel"> <ul> <li><a href="portfolio_item.html"><img width="198" height="130" src="img/pictures/1.jpg" alt></a></li> <li><a href="portfolio_item.html"><img src="img/pictures/2.jpg" alt="" width="198" height="130" ></a></li> <li><a href="portfolio_item.html"><img src="img/pictures/3.jpg" alt="" width="198" height="130" ></a></li> <li><a href="portfolio_item.html"><img src="img/pictures/4.jpg" alt="" width="198" height="130" ></a></li> <li><a href="portfolio_item.html"><img src="img/pictures/5.jpg" alt="" width="198" height="130" ></a></li> <li><a href="portfolio_item.html"><img src="img/pictures/6.jpg" alt="" width="198" height="130" ></a></li> </ul> </div> <button class="prev"><</button> <button class="next">></button> </div> Javascript: Code: $(function() { $(".carousel").jCarouselLite({ btnNext: ".next", btnPrev: ".prev" }); }); CSS: Code: #carousel { width:900px; overflow:hidden; margin-bottom:30px; } .carousel ul li { width:198px; margin-right:36px; } #carousel .next, #carousel .prev { margin:0px; font-size:15px; padding:4px 10px; } #carousel .next { float:right; } #carousel .prev { float:left; } The issue I'm having is that the sound for the animation will not go off after the initial operation, every subsequent animation will be silent. Here is the pastebin: Pastebin.com Keep in mind this is not my code and I privately contracted someone out to do this. They are not responding and will not help at this point. I will try to answer any question you may have to the best of my ability. on this site. There are no validation errors. firebug says my linkOut function is not defined... but I have this: Code: function linkOut(link) { var image = link.getElementsByTagName("IMG")[0]; image.src = image.src.replace("H2.png","H.png"); } not sure where to go from here. I have a script that works until I add the clearInterval command, and I am not sure what I have done wrong. The code is: Code: <script type="text/javascript"> function loadChatTalkRefresh(File,ID,Msg){ var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { try{ xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } } xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200){ document.getElementById(ID).innerHTML=xmlhttp.responseText; empress = setInterval(function(){loadChatTalkRefresh(File,ID,Msg)},3000); willow = clearInterval(empress,210000); } } var params=Msg; xmlhttp.open("POST",File,true); xmlhttp.setRequestHeader("Pragma", "Cache-Control:no-cache"); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", params.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(params); } </script> Hi All, I have two scripts which I want to try and integrate. I am using a nice gallery script to show thumbnails which are appended to a an image wrapper which on click of the thumbnail shows the larger image in the image wrapper, I am trying to implement cloud zoom which is a plugin which uses image srcs to then point to an anchor href to show another larger zoom image either in the same place.. which is what I am trying to do or in another div beside. I have had to set me img srcs up in a certain way to easily enter some product details. and I need to try an manipulate the code to make it work to suit my file layout. I am using a var= images [ with a series of file locations and info such as below { src: 'romanticabride/thumbs/tn_Shauna.jpg', srcBig: 'romanticabride/images/Shauna.jpg', title: 'Shauna', longDescription: '<b><H1>Shauna</H1></b><br><b>Romantica Of Devon <br><br><h2>Sizes Available:</h2><br> 6 - 32.<b><br><b><br><b><b><b><H2>Colours Available:</h2><b><br>Various<br>Please Enquire Below<br><br><br><br><a href="mailto:tracy@cherishbridal.co.uk?subject=Web Enquiry Regarding Romantica Shauna Bridal Gown"class="enquiry rose glow" >Click To Enquire About This Item </a>' }, what I need is for cloud zoom to work when the main image wrapper is hovered over which means it will need to add a class or when the whichever srcBig: is hovered over it gets wrapped by href to make the script work . one of my pages is http://www.cherishbridal.co.uk/romaticabride.html the cloud zoom script is at http://www.professorcloud.com/mainsite/cloud-zoom.htm.. I am happy to share a jsfiddle with someone or explain further or post some code. Thank you in advance does any expert know how to pass parameters in the <script ..> tag? for instance; Code: <script type="text/javascript" src="script.js ?param1=val1¶m2=val2&etc "> in the javascript script.js, how would we read the params after the question mark? for example, google this; google shopping cart /v2_2/cart.js I have a script that works in seamonkey(my html editor) but when I use it in IE8 it says errors happen. Here's the code (the first line is on line 7 of the html file): Code: <script type="text/javascript"> function enlarge(imageNum) { var numToString = ""; if(parseInt(imageNum) < 10){ numToString = "0" + imageNum; } else { numToString = imageNum + ""; } window.open("images/LgScreenshot"+numToString+".jpg","Screenshot "+imageNum,"status=0,height=675,width=900,resizable=0"); } </script> And the errors: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB0.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; InfoPath.3; .NET CLR 3.0.30729) Timestamp: Wed, 10 Feb 2010 14:58:16 UTC Message: Object expected Line: 150 Char: 1 Code: 0 URI: http://samssc2site.co.cc/Features.html Message: Invalid argument. Line: 18 Char: 1 Code: 0 URI: http://samssc2site.co.cc/Features.html I need to assign a key in the javascript to actually make the javascript work,. I have a bookmark in chrome , a javascript , which actually works when clicked on it .,. but how can i edit it so that i can actually make it work on click a key or combination of keys. i want to declare the key or keycombo in the script itself .,. the script is for catching the selected text on the webpage and opening a new tab(or window) and doing an exact search search of the selected text using google.com .,., So I want it to work it this way ., select the text press a key and it opens a new tab (or window) with an xact search .,. i want to declare the key or keycombo in the script itself .,. the script is for catching the selected text on the webpage and opening a new tab(or window) and doing an exact search search of the selected text using google.com .,., So I want it to work it this way ., select the text press a key and it opens a new tab (or window) with an xact search .,. Thanks in advance ., Nani On this website: http://evancoleman.net/index.php I really like on the top how the menu has like 5 or 6 icons, and when you hover over them it shows a bubble with the name in them. Does anybody know where I can find this script? Thanks. Hello again . If these questions concerning Regular Expressions are inappropriate in this forum please let me know . Thank You. This expression <script[^>]*>.*?</script> matches ... Code: <script type="text/javascript">var cnnIsHomePage = true;</script> but not ... Code: <script type="text/javascript"> var cnnIsHomePage = true; </script> Please , how can i match the latter ? Hi everyone: I need help taking this pop under script: <script language="JavaScript"> var popunder="URL GOES HERE" function loadpopunder(){ win2=window.open(popunder) win2.blur() window.focus() } loadpopunder() </script> and making it so that I can set it so it only pops up one time and then will not pop up again until after a certain time period. Also, is there a way to make it so it can avoid pop up blockers? Thank you! hi, can any tell me that which script they are using?? and plz if u have share it Thanx http://www.nation4all.org/mf/ regards Fawad |