JavaScript - Javascript In Web Page Refuses To Work In Ie8
Good evening.
I'm trying to code a website that will read data from an Excel file (stored either locally or elsewhere) and input a row of data (searched based on a Drop-Down List) into a table on the web page itself. Every time I open the page (it's currently stored on my local drive, on a laptop running Windows 7) in IE8, though, I get the error "Automation Server Can't Create Object" and nothing happens. The Excel file doesn't get opened and the table is blank. Thing is, though, I tried opening the same web page on another computer with IE6 and Windows 2000, and the Script works perfectly there. I've been searching for a solution to this for a week, and some people suggested elsewhere that it's a problem with IE8's security settings. I lowered them as far as they'll go and enabled Running the Script Not Marked As Safe for all possible zones, same result, the Script refuses to run with the "Automation Server Can't Create Object" error. Here's the applicable lines of code: function loadData() { // try { var Excel, Book; var a = document.getElementById("projectDrop"); Excel2 = new ActiveXObject("Excel.Application"); <--- This is where the error seems to register Book2 = Excel2.Workbooks.Open("TestSheet.xls"); idTmr = window.setInterval("Cleanup();",1000); var sheet2 = Book2.Worksheets("Sheet1"); var b = document.getElementById('tableDisplay').getElementsByTagName('tr'); Excel2.Visible = false; var i=1; while(sheet2.Cells(i,1).Value != null) { if (sheet2.Cells(i,1).Value == a.options[a.selectedIndex].text) { b[0].cells[0].innerHTML = sheet2.Cells(i,1).Value; b[0].cells[1].innerHTML = sheet2.Cells(i,2).Value; b[0].cells[2].innerHTML = sheet2.Cells(i,3).Value; b[0].cells[3].innerHTML = sheet2.Cells(i,4).Value; } i++; } Excel2.Quit(); // } // catch(e) { // } } I'm completely stumped, everyone. Is it some obscure setting I'm forgetting to check in IE8, is my Java not fully updated, or what is it? Again, it works perfectly on my old Windows 2000 w/ IE6 computer, but not on a recent Windows 7 laptop with IE8. I'd appreciate any help. Thank you. Similar TutorialsHi, I have a jsp which has a function gets called during the page unload. This jsp has a form with an action attribute to one servlet. Please find below the code snippet. ---- Java script code --- function logoff() { document.forms["FormName"].rel="nofollow" target="_self"; alert('Submitting the form'); document.forms["FormName"].submit(); } --- HTML form code ----- <body onUnload='logOff()'> <form name ="FormName" method="POST" action='<%=sLogoutResponseURL %>'> Whenever the page gets unloaded always logoff function is getting called. I also get the alert message "Submitting the form". But my servrlet does not get invoked. My application supports logging in with the same user id more than once. Scenario it works: User logs in. Close the application. logoff function is called and servlet gets invoked. Scenario it does not work: User logs in one window. Open one more IE window and and open the application with same user id. this can be repeated. Now when i close the application logoff function is called for all of the window close. But servlet does not gets invoked all the time. Sometimes it stops calling servlet. I have searched over the net and found one solution. Below piece of code will make sure form gets always submitted. -------------------------Start ----------------- function fakeSubmit(event) { var target = event ? event.target : this; /* Fire a submit event */ var fakeEvent = $(target).fire("form:submit"); if (fakeEvent.stopped == false) { /* Call the real submit function */ this._submit(); } } if(window.HTMLElement){ /* DOM-compliant Browsers */ HTMLFormElement.prototype._submit = HTMLFormElement.prototype.submit; HTMLFormElement.prototype.submit = fakeSubmit; } else { /* IE does not expose it's HTMLElement object or its children Let the document load so all forms are accounted for */ document.observe("dom:loaded", function(){ for(var i = 0; i < document.forms.length; i ){ document.forms[i]._submit = document.forms[i].submit; document.forms[i].submit = fakeSubmit; } }); } -----------End ------------------ But this resulted in script error while loading the page "object does not support this method or property" at line where document.observe is there. Kindly help at the earliest. Thanks in advance Santosh I am sorry if this is a stupid question. I have never really used javascript before. I found some code online that I tried to piece together so I might not even be going about this the right way. I want the background to take up 100% and resize with the browser. That works fine. I also want the text "welcome to the ahi life" stick to the bottom left hand corner and the enter button to stick to the bottom right. I would like these to resize with the browser as well. It all kind of works, except the first time you load the page the text and the button are much smaller than I would like them to be. If you refresh the page everything is correct. The url is http://www.ahiapparel.com/landing.html Code: <style> * { margin: 0; padding: 0; } #bg { position: fixed; top: 0; left: 0; } .bgwidth { width: 100%; } .bgheight { height: 100%; } #page-wrap { position:absolute; bottom:0; left:20px; width: 700px; margin: 50px auto;} #welcometext { position: fixed; bottom: 20px; left: 25px; } .welcometextwidth { width: 7%; } .welcometextheight { height: 7%; } #entertext { position: fixed; bottom: 20px; right: 25px; } .entertextwidth { width: 7%; } .entertextheight { height: 7%; } </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script> $(function funct1() { var theWindow = $(window), $bg = $("#bg"), aspectRatio = $bg.width() / $bg.height(); function resizeBg() { if ( (theWindow.width() / theWindow.height()) < aspectRatio ) { $bg .removeClass() .addClass('bgheight'); } else { $bg .removeClass() .addClass('bgwidth'); } } theWindow.resize(function() { resizeBg(); }).trigger("resize"); }); $(function funct2() { var theWindow = $(window), $welcometext = $("#welcometext"), aspectRatio = $welcometext.width() / $welcometext.height(); function resizewelcometext() { if ( (theWindow.width() / theWindow.height()) < aspectRatio ) { $welcometext .removeClass() .addClass('welcometextheight'); } else { $welcometext .removeClass() .addClass('welcometextwidth'); } } theWindow.resize(function() { resizewelcometext(); }).trigger("resize"); }); $(function funct3() { var theWindow = $(window), $entertext = $("#entertext"), aspectRatio = $entertext.width() / $entertext.height(); function resizeentertext() { if ( (theWindow.width() / theWindow.height()) < aspectRatio ) { $entertext .removeClass() .addClass('entertextheight'); } else { $entertext .removeClass() .addClass('entertextwidth'); } } theWindow.resize(function() { resizeentertext(); }).trigger("resize"); }); </script> My best guess is that either the functions or some of the variables are conflicting somehow, but I have tried just about everything to fix it. Any help would be much appreciated. Thanks! Voting button on the poll in the left column works fine if you take the sharethis javascripts out. Why won't they work together though? <script type="text/javascript" src="http://www.claimsheaven.co.uk/polls/admin/script.js"></script> <script type="text/javascript">var switchTo5x=true;</script> <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> <script type="text/javascript" src="http://s.sharethis.com/loader.js"></script> e.g. on this page: http://www.claimsheaven.co.uk/news/20120305.php Script runs fine in latest stable release of Firefox 3 but breaks in chrome Code: function fixCSS(){ var styles={ 'Yotsuba':'http://static.4chan.org/css/yotsuba.9.css', 'Yotsuba B':'http://static.4chan.org/css/yotsublue.9.css', 'Futaba':'http://static.4chan.org/css/futaba.9.css', 'Burichan':'http://static.4chan.org/css/burichan.9.css' } for(i in document.getElementsByTagName('link')){ for(j in styles){ if(document.getElementsByTagName('link')[i].title==j)document.getElementsByTagName('link')[i].href=styles[j]; } } // if all else fails just delete every link tag and replace with the default linkset // this may be commented out later on if(document.defaultView.getComputedStyle(document.body,'').getPropertyValue('background-color')!='rgb(255, 255, 238)'){ for(i=0;i<document.getElementsByTagName('link').length;i++){ document.getElementsByTagName('link')[0].parentNode.removeChild(document.getElementsByTagName('link')[0]); } var linkHTML='<link rel="shortcut icon" href="http://static.4chan.org/image/favicon.ico"/><link rel="shortcut icon" href="http://static.4chan.org/image/favicon.ico" /><link rel="stylesheet" type="text/css" href="http://static.4chan.org/css/yotsuba.9.css" title="Yotsuba"><link rel="alternate stylesheet" type="text/css" href="http://static.4chan.org/css/yotsublue.9.css" title="Yotsuba B"><link rel="alternate stylesheet" type="text/css" href="http://static.4chan.org/css/futaba.9.css" title="Futaba"><link rel="alternate stylesheet" type="text/css" href="http://static.4chan.org/css/burichan.9.css" title="Burichan">'; document.getElementsByTagName('head').innerHTML=document.getElementsByTagName('head').innerHTML+linkHTML; } var changer='<tr><td>Style [<a href="#" onclick="setActiveStyleSheet(\'Yotsuba\'); return false;">Yotsuba</a> | <a href="#" onclick="setActiveStyleSheet(\'Yotsuba B\'); return false;">Yotsuba B</a> | <a href="#" onclick="setActiveStyleSheet(\'Futaba\'); return false;">Futaba</a> | <a href="#" onclick="setActiveStyleSheet(\'Burichan\'); return false;">Burichan</a>]</td></tr>'; if(document.getElementsByClassName('deletebuttons')[0].parentNode.parentNode.innerHTML.indexOf('setActiveStyleSheet')==-1)document.getElementsByClassName('deletebuttons')[0].parentNode.parentNode.innerHTML+=changer; } function killCotten(){ for(i in document.getElementsByTagName('embed')){ document.getElementsByTagName('embed')[i].parentNode.removeChild(document.getElementsByTagName('embed')[i]); } } killCotten(); fixCSS(); Error message reported by Chrome's "JavaScript Console": Uncaught TypeError: Cannot call method 'removeChild' of undefined killCotten Screenshot of debugger: Does anyone know how to make URL links that use Javascript still work when users have Javascript disabled on their browser? The only reason I'm using JS on a URL is because my link opens a PDF file, and I'm forcing it not to cache so users have the latest version. I tried the <script><noscript> tags, but I'm not sure if I'm using it correctly, as my URL completely disappears. Below is my HTML/Javascript code: <p class="download"> <script type="text/javascript">document.write("<span style=\"text-decoration: underline;\"><a href=\"javascript:void(0);\" onclick=\"window.open( 'http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf?nocache='+ Math.floor( Math.random()*11 ) );\" >The Child Magazines Media Kit</a></span> (PDF 1 MB) ");</script> <noscript><span style="text-decoration: underline;"><a href="http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf" >The Child Magazines Media Kit</a></span> (PDF 1 MB)</noscript> </p> Thanks for any help, Michael Hi Im alot stuck at the moment so if anyone can help resolve the issues i'm having I would be very grateful! if you go to http://love2-create.com and click on the orange "view profile" link about halfway down the left hand column, a tab opens showing a profile with a small picture gallery at the bottom, this gallery works fine in firefox and google chrome, however in safari it works sometimes but not always and in IE it usually works on the first time the page is loaded but then when the page is refreshed and the profile link is clicked I get an Error: 'document.getElementById(...)' is null or not an object on line 60, the lines in question look like this: Code: buildcontentdivs:function(setting){ var alldivs=document.getElementById(setting.id).getElementsByTagName("div") for (var i=0; i<alldivs.length; i++){ if (this.css(alldivs[i], "contentdiv", "check")){ //check for DIVs with class "contentdiv" setting.contentdivs.push(alldivs[i]) alldivs[i].style.display="none" //collapse all content DIVs to begin with } } }, Does anyone know why this may be, and how it can possibly work sometimes but not always?? its totally got me baffled so if anyone can help I would very very much appreciate it, please let me know if you need any other details about the site etc from me. Regards, Keir ok this is all hyperthetical and ground work (phishing) for me so any and advice will be warmly welcomed. I would like to start and e-commerce site BUT: I'm sure i should use javascript on client side to validate an order form BUT 1) server side, how is the order revalidated --- ie is javascript used again on server or use of another language? 2) could someone explain how information from order form is connected to an (SQL) database ---- and how is that database then updated? What language is used? (I am talking about the general process here) At the momment i'm researching SQL http://dev.mysql.com/doc/refman/5.5/...ving-data.html and e-commerce database design http://www.princeton.edu/~rcurtis/ul...mdatabase.html but I have no idea how all this is connected and where Javascript finishes and where I need to research further in oreder to put things together. Any help would be fantastic sorry for the novice questions. low tech Hi, I have a javascript I created to compare the textbox value to the array and write something on the textbox but somehow it is giving me a syntax error. I am not good in javascript so I am really not sure which one is giving me problem. Can someone please help? Thanks. My logic is to check if my 18 textbox is not empty and if not then get the label of each textbox and compare to my array listed below. If the value of each label in the textbox exist, then write and equal word in the hidden textbox and if it doesn't exist, increment to the value of 1 to the textbox. Here is my javascript code: Code: function CalculateTotal(){ var homelessness = new Array (); homelessness[0] = "70250", homelessness[1] = "70260", homelessness[2] = "70750", ); var financial = new Array (); financial[0] = "96580", financial[1] = "96500", financial[2] = "96580", ); var emergency = new Array (); emergency[0] = "79660", emergency[1] = "80105", emergency[2] = "96020", ); for (i=3; i<18; i++) for (var k=3; k<18; k++) { if((amounts[i] != "") && (amounts[i] == desig[k])) { var issueId = impact.charAt(k); var impact_txt = document.getElementById(issueId).value; for ( var x = 0; x < homelessness.length; x++ ) { var myArray[ homelessness[ x ] ] = homelessness[ x ]; if ( myArray[impact_txt] == homelessness[] ) && (document.getElementById('impact1').value == "")) { document.getElementById('impact1').value = "Homelessness"; } } for ( var x = 0; x < financial.length; x++ ) { var myArray[ financial[ x ] ] = financial[ x ]; if ( myArray[impact_txt] == financial[] ) && (document.getElementById('impact2').value == "")) { document.getElementById('impact2').value = "Financial Stability and Independence"; } } for ( var x = 0; x < emergency.length; x++ ) { var myArray[ emergency[ x ] ] = emergency[ x ]; if ( myArray[impact_txt] == emergency[] ) && (document.getElementById('impact2').value == "")) { document.getElementById('impact3').value = "Emergency Crisis and Services"; } } } } } } //body code <table> <tr> <td style="width:380px;text-align:left"><label for="d" id="D" name="D" title="80104">Crime and Drug Use <a href="javascript:alert('');">what is this?</a></label></td> <td style="float:right"> $<input id="d" name="d" class="text" type="text" value="<?php safeEcho($form['d'])?>" style="width:90px;" onChange="CalculateTotal();" /> <?php helper_error('d');?> </td><td> <input name="impact1" id="impact1" type="text" value="" onclick="CalculateTotal();" /> </td> </tr> <tr> <td style="width:380px;text-align:left"><label for="e" id="E" name="E" title="80101">Early Childhood Development <a href="javascript:alert('');">what is this?</a></label></td> <td style="float:right"> $<input id="e" name="e" class="text" type="text" value="<?php safeEcho($form['e'])?>" style="width:90px;" onChange="CalculateTotal()" /> <?php helper_error('e');?> </td><td> <input name="impact2" id="impact2" type="text" value="" onclick="CalculateTotal();" /> </td> </tr> <tr> <td style="width:380px;text-align:left"><label for="f" id="F" name="F" title="80105">Emergency and Crisis Services <a href="javascript:alert('');">what is this?</a></label></td> <td style="float:right"> $<input id="f" name="f" class="text" type="text" value="<?php safeEcho($form['f'])?>" style="width:90px;" onChange="CalculateTotal()" /> <?php helper_error('f');?> </td><td> <input name="impact3" id="impact3" type="text" value="" onclick="CalculateTotal();" /> </td> </tr> Hope you can help me to make my javascript work. Thanks. Hello, I made a little code for my website but it doesn't work and I can't find out what the problem is. The problem is that the line return 2; does return undefined and not 2 as expected. I also tried to replace var xmlhttp2 = ''; for var xmlhttp2 = null; but it still not work. Does anyone know what is incorrect? Thanks in advance, PHP Code: function get_image(url) { var xmlhttp2 = ''; xmlhttp2=GetXmlHttpObject() xmlhttp2.onreadystatechange=function() { if (xmlhttp2.readyState == 4) { return 2; } }; xmlhttp2.open("GET", 'image_print.php?url=' + url, true); xmlhttp2.send(null); //return output; } Hi Everyone, I have a strange problem that I can't resolve. Have a look at www.snaptease.co.uk/random.html and you will see a random image every time you refresh. Now look at www.snaptease.co.uk/random1.html and you won't see the image. The only difference is in the js/random.js and js/random1.js each file references. js/random.js uses the same html link to index.html js/random1.js links to individual html files that exist and valid. The working code looks like this: [CODE] images[0] = "<a href = 'index.html'><img src='images/games/aa01q.jpg' alt='album art' title='Do you recognise this album?'></a>";[CODE] The non working code looks like this: [CODE] images[0] = "<a href = 'answers/aa01.html'><img src='images/games/aa01q.jpg' alt='album art' title='Do you recognise this Album?'></a>";[CODE] Even if I enter the full url it makes no difference. Please tell me what I am doing wrong and how to fix it. I've been banging my head over this for a while now so I would appreciate any help. Thanks in advance Martin I write for ezinearticles, hubpages, bukisa etc. and obtained author widgets for my site. When placed in Sidebar, the w3c validator throws hundreds of errors, whereas if I place the same code in pages, it works flawlessly. Do I need some special code to put it in the sidebar? The code goes on something like this: Code: <script type="text/javascript" src="http://ezinearticles.com/widget/inc/eawidget.js"></script><script type="text/javascript" src="http://ezinearticles.com/widget/widgetfetch.php?theme=100&cheader=bb2020&cborder=d0d0d0&cbackground=f1f1f1&ctopic=f1f1f1&ctopictext=000000&ch3=bb2020&cfooter=f1f1f1&cfootertext=000000&height=400&width=315&articles=3&authorid=My Name&bio=1"></script> Can someone help me out on this? Thanks Hi! I'm new to JavaScript and I've done some small adjustments to my clients site, but it won't show properly in IE (the shadowbox js at least.). I thought js was accepted in all newer browsers. Do you have a quick fix or idea on why it doesn't work? You can view source on my site, I use mootools, and shadowbox/corners and rightclick blocker. Is it generally a 'bad thing' to use js in webpages I want everyone to view in the same way? I tried the same effects with CSS but it's not supported in the same way corss-browser, unfortunately. The 'no selection' CSS class I have on the site is also not accepted in IE. It's very annoying! http://santinacrolla.ihaarr.com/p thank you in advance! Hey, everyone. I wrote a JavaScript for a forum based RPG. This is the first JavaScript that I ever wrote and I was surprised that it actually worked the way it was supposed to. The problem is that when I post it in a thread on the phpBB forum, the link that says "Jump!" doesn't do anything. When I save the code to Notepad and open on my browser, the link works fine. <html> <body> <script type="text/javascript"> function calculate() { var RACE, RAND=Math.floor(Math.random()*3); RACE = document.calcform.RACE.value; if (RACE == 1 && RAND != 0) {document.write("<a href=http://desertcolossus.com/adventures/viewforum.php?f=2>Land</a>"); } if (RACE == 1 && RAND == 0) {document.write("<a href=http://desertcolossus.com/adventures/viewforum.php?f=2>Secret Area 1</a>"); } if ((RACE == 2 || RACE == 3 || RACE == 4) && RAND != 0) {document.write("<a href=http://desertcolossus.com/adventures/viewforum.php?f=3>Land</a>"); } if ((RACE == 2 || RACE == 3|| RACE == 4) && RAND == 0) {document.write("<a href=http://desertcolossus.com/adventures/viewforum.php?f=3>Secret Area 2</a>"); } if ((RACE == 5 || RACE == 6) && RAND != 0) {document.write("<a href=http://desertcolossus.com/adventures/viewforum.php?f=4>Land</a>"); }; if ((RACE == 5 || RACE == 6) && RAND == 0) {document.write("<a href=http://desertcolossus.com/adventures/viewforum.php?f=4>Secret Area 3</a>"); }; if (RACE == 7 && RAND != 0) {document.write("<a href=http://desertcolossus.com/adventures/viewforum.php?f=5>Land</a>"); }; if (RACE == 7 && RAND == 0) {document.write("<a href=http://desertcolossus.com/adventures/viewforum.php?f=5>Secret Area 4</a>"); }; if (RACE == 8 && RAND != 0) {document.write("<a href=http://desertcolossus.com/adventures/viewforum.php?f=6>Land</a>"); }; if (RACE == 8 && RAND == 0) {document.write("<a href=http://desertcolossus.com/adventures/viewforum.php?f=6>Secret Area 5</a>"); }; } </script> <form id="calcform" name="calcform"> <label for="RACE">RACE</label> <input type="text" size="3" id="RACE" name="RACE" /> <a href="javascript:calculate()">Jump!</a> </form> Enter the number associated with your character's race. 1 - Goron 2 - Sheikah 3 - Hylian 4 - Human 5 - Gerudo 6 - Zora 7 - Deku 8 - Fairy </body> </html> Hello here is my code that im dealing with and only second sliceshow works for me i need them both that would be working together please help me! thanks for any help here is my script <head> <title>Easy Slider jQuery Plugin Demo</title> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/easySlider1.7.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#slider").easySlider({ auto: true, continuous: true, nextId: "slider1next", prevId: "slider1prev" }); }); </script> <link href="css/screen.css" rel="stylesheet" type="text/css" media="screen" /> <link rel="stylesheet" type="text/css" href="leidyba/css/demo.css" /> <link rel="stylesheet" type="text/css" href="leidyba/css/styleleidyba.css" /> <link rel="stylesheet" type="text/css" href="leidyba/css/jquery.jscrollpane.css" media="all" /> <link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow&v1' rel='stylesheet' type='text/css' /> <link href='http://fonts.googleapis.com/css?family=Coustard:900' rel='stylesheet' type='text/css' /> <link href='http://fonts.googleapis.com/css?family=Rochester' rel='stylesheet' type='text/css' /> <div id="container"> <div id="header"> <h1>Easy Slider jQuery Plugin - Multiple sliders</h1> </div> <div id="content"> <div id="slider"> <ul> <li><a href="http://templatica.com/preview/30"><img src="slide/images/01.jpg" alt="Css Template Preview" /></a></li> <li><a href="http://templatica.com/preview/7"><img src="slide/images/02.jpg" alt="Css Template Preview" /></a></li> <li><a href="http://templatica.com/preview/25"><img src="slide/images/03.jpg" alt="Css Template Preview" /></a></li> </ul> </div> <div class="container"> <div id="ca-container" class="ca-container"> <div class="ca-wrapper"> <div class="ca-item ca-item-1"> <div class="ca-item-main"> <div class="ca-icon"></div> <h3>Knygų leidyba</h3> <h4> <span class="ca-quote">“</span> <span>The greatness of a nation and its moral progress can be judged by the way in which its animals are treated.</span> </h4> <a href="#" class="ca-more">plačiau...</a> </div> <div class="ca-content-wrapper"> <div class="ca-content"> <h6>Knygų leidyba</h6> <a href="#" class="ca-close">close</a> <div class="ca-content-text"> <p>I am so happy, my </p> <p>When, while the </p> <p>She packed her .</p> </div> <ul> <li><a href="#">Read more</a></li> <li><a href="#">Share this</a></li> <li><a href="#">Become a member</a></li> <li><a href="#">Donate</a></li> </ul> </div> </div> </div> <div class="ca-item ca-item-2"> <div class="ca-item-main"> <div class="ca-icon"></div> <h3>Reklaminiai bukletai</h3> <h4> <span class="ca-quote">“</span> <span>I hold that the more </span> </h4> <a href="#" class="ca-more">plačiau...</a> </div> <div class="ca-content-wrapper"> <div class="ca-content"> <h6>Would you eat your dog?</h6> <a href="#" class="ca-close">close</a> <div class="ca-content-text"> <p>I am so happy, my .</p> <p>When, while the </p> <p>She packed her </p> </div> <ul> <li><a href="#">Read more</a></li> <li><a href="#">Share this</a></li> <li><a href="#">Become a member</a></li> <li><a href="#">Donate</a></li> </ul> </div> </div> </div> </div> </div> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script type="text/javascript" src="leidyba/js/jquery.easing.1.3.js"></script> <!-- the jScrollPane script --> <script type="text/javascript" src="leidyba/js/jquery.mousewheel.js"></script> <script type="text/javascript" src="leidyba/js/jquery.contentcarousel.js"></script> <script type="text/javascript"> $('#ca-container').contentcarousel({ }); </script> </div> </body> </html> I have two rotating banners on the same page. Both work independently on other pages but won't work together. Is there a reason in JS for this and is there a common solution? Hi I have 2 external javascript files added in the head section of a html file but neither will work. However, if i place the javascript code in the html file it work. I'm lost and need help. Could it be the onload function
Code: <body onload="showCookies(); startBanner();"> Alright, so I'm trying to get Javascript to work for me on my own website, and I can't even seem to get it to work when I test the files offline. I can take an example script from the internet, copy it, and put it on my computer. From then on, the script no longer works. I try uploading the file to my webhost, and it still won't work. It's not Browser Support because I'm using the same browser I used to view the example, which worked on the website it came from. There's no differences in the code I used, as opposed to the code they used. Javascript still won't work. Can anyone explain any reason why this is? Is there some kind of extra Java Support one would need on their webhost to make JS work? One of the websites I'm trying to get my script from is this: http://sixrevisions.com/tutorials/ja...cript_tooltip/ It can be found right he http://arkdesigns.ca/AttilaKomaromiJavaCalculator.htm I have javascript enabled on my browsers but it still doesn't work. I see the calculator but pushing the buttons does nothing Any help is appreciated My code is: 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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Javascript Calculator</title> <style> <!-- CSS STYLES GO HERE --> .container { width:500px; height:500px; } .equ { width:99%; height:20px; font-size:20px; text-align:right; margin-bottom:15px; } table { border:1px solid black; padding:5px; width:100%; } table td { margin:3px; text-align:center; width:20%; } .buttons { width:100%; height:50px; font-size:15px; } </style> <script type="text/javascript" src="javascript.js"> </script> </head> <body> <div class="container"> <table cellspacing="0"> <tr> <td colspan="5"><input class="equ" type="input" disabled="disabled" id="equation" value="0"/><input type="hidden" id="previousType" value="-1"/></td> </tr> <tr> <td><input class="buttons" type="button" name="sin" value="sin" onclick="solve ('sin')" /></td> <td><input class="buttons" type="button" name="cos" value="cos" onclick="solve ('cos')" /></td> <td><input class="buttons" type="button" name="tan" value="tan" onclick="solve('tan')" /></td> <td><input class="buttons" type="button" name="sqrt" value="√" onclick="solve('sqrt')" /></td> </tr> <tr> <td><input class="buttons" type="button" name="back" value="←" onclick="remove ();"/></td> <td colspan="2"><input class="buttons" type="button" name="erase" value="C" onclick="clear_equation ();" /></td> <td><input class="buttons" type="button" name="divide" value="/" onclick="equation (this.value, 1)"/></td> </tr> <tr> <td><input class="buttons" type="button" name="seven" value="7" onclick="equation (this.value, 2)"/></td> <td><input class="buttons" type="button" name="eight" value="8" onclick="equation (this.value, 2)"/></td> <td><input class="buttons" type="button" name="nine" value="9" onclick="equation (this.value, 2)"/></td> <td><input class="buttons" type="button" name="multiple" value="*" onclick="equation (this.value, 1)"/></td> </tr> <tr> <td><input class="buttons" type="button" name="four" value="4" onclick="equation (this.value, 2)"/></td> <td><input class="buttons" type="button" name="five" value="5" onclick="equation (this.value, 2)"/></td> <td><input class="buttons" type="button" name="six" value="6" onclick="equation (this.value, 2)"/></td> <td><input class="buttons" type="button" name="subtract" value="-" onclick="equation (this.value, 1)"/></td> </tr> <tr> <td><input class="buttons" type="button" name="one" value="1" onclick="equation (this.value, 2)"/></td> <td><input class="buttons" type="button" name="two" value="2" onclick="equation (this.value, 2)"/></td> <td><input class="buttons" type="button" name="three" value="3" onclick="equation (this.value, 2)"/></td> <td><input class="buttons" type="button" name="plus" value="+" onclick="equation (this.value, 1)"/></td> </tr> <tr> <td colspan="2"><input class="buttons" type="button" name="zero" value="0" onclick="equation (this.value, 2)"/></td> <td><input class="buttons" type="button" name="decimal" value="." onclick="equation (this.value, 3)"/></td> <td><input class="buttons" type="button" name="equal" value="=" onclick="solve ('');"/></td> </tr> </table> </div> </body> </html> HTML: Code: <!-- video player begin --> <div id="playerHolder"> <div class="player" id="playerDiv"> <div id="playerwidget"></div> <div id="adCompanionBanner" style="visibility:hidden;"></div> </div> </div> In firefox, I type Code: javascript:document.getElementById("player").sendEvent(''SEEK", 0); into the Address bar and hit enter. Why doesn't it work? How do I correctly "seek" a video. can anybody help with these programs, the javascript must be a simple as possible 5 Functions A year six class require a basic calculator for maths class. Create an application that: 1 Allows the user to enter two numbers. 2 Allows user to choose from performing an addition, subtraction, multiplication or division on the numbers. 3 Displays the results on screen. F1VW 34: Client Side Scripting for Web Applications 6 Objects A new web company requires a user input form so clients can sign up for their monthly e-letter. The details required a ♦ name ♦ e-mail address ♦ gender ♦ date of birth ♦ a checkbox to confirm if they wish to be contacted for other marketing purposes The web company also want to save the name of the customer so they have their details in a file. Create an application that: 1 Has a form to take in the required input. 2 Saves the name to a cookie which expires in six months. 3 Validates the input appropriately. 7 DHTML You need to produce a web document about yourself to place in the online year book, adding a picture, and a paragraph about yourself. Create an application that: 1 Allows the user to change the size of text on screen to small, medium or large. 2 Allows the user to change the colour of the screen background. 3 Animates your picture from the top left to the bottom right hand side of screen. |