JavaScript - Confused About Excel Embedding/integration...
For a project in my high school web design class, I need to integrate an Excel spreadsheet as data so to speak for a web page. I want to pull the prices from the sheet, and make them appear on the page. I'd like to pull it from the sheet so that the client can still adjust and edit the prices without having to reach the actual webpage. Conceptually, I thought this would be fairly straight forward, but in researching how to do this, I got very confused. I'm not even positive that I'm putting this in the right section.
So my main question is this: Is there a way to integrate an Excel spreadsheet in such a way that it can provide data for certain fields of a webpage? If so, can someone please explain how? Thanks, A Confused High School Girl Similar TutorialsSo, I've designed a basic site and everything is fine except for the posts. You can see the site here. What I'm talking about is this: Code: <div id="posts"> <h1>Bonjour</h1> <p>Welcome to my website! Please note that it's fairly new, and so it might still go under some construction, so don't expect what you see now to be stay the same forever. Furthermore, if you have any suggestions, please run them by me and I'll take them into consideration.</p> <p>As of 9/23: Working on Adding Games.</p> <br> </div> The CSS code for it is: Code: #posts{text-indent:15px;background-color:#424242;border:3px solid #e0e0e0;position:absolute;left:212px;top:180px;width:565px;} Now, the post is only one post, and I can't add any more as it is only one div. I was wondering if there was an easy way to make a master, parent div and all the div's inside it would be transformed into div's that are respectively positioned under it, automatically. ^^ Now, I liked that idea at first but then I thought of the technicalities such as having to use HTML to write blog posts which would be kind of ridiculous and I was wondering if anyone knows how of a simple-free easy to integrate blog system which could be embedded into my site without having to re-design everything. Hi, I have this code that can be used to simulate the F11 function in the Internet Explorer. Code: <script type="text/javascript"> function F11() { window.open("page.html", "", "channelmode"); } </script> and you call it by adding this to a html link : Code: <a href="javascript:F11()">click here to open in channelmode</a> or Code: <body onload="javascript:F11()"> the problem is that when the function was written, , it said to open "page.html" in channel mode. I want to open the page itself in channelmode onload... not "page.html" how can I modify the function? something like...window self open! thanks I plan to set up a photo gallery using ShadowBox, but I also want to add a zoom feature within the gallery for individual elements. Preferably using the CloudZoom plugin. How it should (hopefully) work: Click on any thumbnail --> A resized large image opens up inside ShadowBox --> CloudZoom is activated on this image on mouseover. What I've obviously got so far is this: Code: Shadowbox.init({ skipSetup: true }); window.onload = function() { Shadowbox.setup("a.mygallery-elements", { gallery: "mygallery" }); }; Is there a way to call CloudZoom after the gallery is invoked. Have already scoured this forum. No luck. Can anyone out there advise me on this? Hi, I have a form which goes to my insert page which inserts the data into the table. Except I didn't want to do a redirect to another page so I thought I would do an Ajax call. Both pages work until I change it to an ajax call. I am pretty certain that it is because I took out the <form action="insert.php"> because otherwise the page would redirect but if that is the case I don't know my way around it and if it isn't the problem I'm not sure what is. But here is my code: Form: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html><head> <script type="text/javascript"> function loadXMLDoc(File,ID){ if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("POST",File,true); xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200){ document.getElementById(ID).innerHTML=xmlhttp.responseText; } } xmlhttp.send(); } </script> </head> <body> <div id="txtHint"> <form action="" method="post"/> <div class="scroll"> <textarea rows="6" cols="60" class="input" name="para1" required="required" onclick="clearMe(this)"> Insert Paragraph 1 </textarea> </div> <br /> <br /> <div class="scroll"> <textarea rows="6" cols="60" class="input" name="para2" onclick="clearMe(this)"> Insert Paragraph 2 </textarea> </div> <br /> <br /> <input type="submit" value="Submit" onclick="loadXMLDOC('insert.php','txtHint')" /> </form> </div> </body> And my insert.php is: Code: <?php $con = mysql_connect("localhost","user","password"); if (!$con){ die('Could not connect: ' . mysql_error()); } mysql_select_db("mydb", $con); $sql="INSERT INTO abc (para1, para2, date, time) VALUES ('{$_SESSION['para1]}', '{$_POST['para2']}',CURDATE(), CURTIME())"; mysql_query($sql) or die('Error: ' . mysql_error()); mysql_close($con) ?> Hi there, does anoyne know how to embed a RSS feed into a webpage? The code I was using before is now no longer supported Thanks Joe Hi - I am using the tinyslideshow and need to be able to embed a wmv file into it. It needs to open within the slideshow as the thumbnail loads and when clicked just as the image does. I have not been able to figure this out or know if it is possible and any help would be greatly appreciated! Thanks so much.
I'm getting Error: Object doesn't support property or method 'addEvent' in my webpage. I'm trying to embed a flash carousel in an asp.net page and I have this, but nothing is showing on my page. Using IE9 and FF4 Code: <script type="text/javascript"> window.addEvent('load', function() { var flashvars = { xmlLocation: "<%=ResolveUrl("upload/data.xml")%>", imageLocation: "<%=ResolveUrl("~/upload/")%>" }; swfobject.embedSWF("<%=ResolveUrl("~/upload/Carousel-Test.swf")%>", "FlashContainer", "576", "242", "10.0.32", "", flashvars, null, null); }); </script> The xml has some settings for the images and all my images are in the upload folder in my project. I have reference to the swfobject js in the masterpage (head) and the homepage inherits from it: Code: <script src="javascript/swfobject.js" type="text/javascript"></script>. Anyone give some suggestions? I'm trying to embed flash onto a web page using the flash player that comes with Dreamweaver CS4. I've used other players in the past, such as the Longtail FLV player, but need to use one that's free for commercial use in this case. I've set up the file with a script to load the video dynamically using the swfobject (the CS4 flash player uses a modified version, not sure what's different about it). Everything works as expect on PC, but on Mac for some reason instead of playing the video it just displays the components of the flash player's skin (i.e. play button, etc.). Here's the script: Code: <script src="scripts/swfobject_modified.js" type="text/javascript"></script> <script type="text/javascript"> var flashvars = {}; flashvars.MM_ComponentVersion = '1'; flashvars.skinName = "skins/Halo_Skin_3"; flashvars.streamName = "videos/base"; flashvars.autoPlay = "false"; var params = {}; var attributes = {}; swfobject.embedSWF("FLVPlayer_Progressive.swf", "myContent", "768", "432", "9.0.0","expressInstall.swf", flashvars, params, attributes); </script> And the HTML: Code: <div id="myContent"> <p>Some content requires Adobe Flash Player. You can download it <a href="http://get.adobe.com/flashplayer/" rel="nofollow" target="_blank">here</a></p> </div> Any thoughts on what might be causing the problem? Thanks. i'm newb to java, but need to get my quicktime movie embeds working on windows/explorer. apparently i need to call external java script to make it work: http://developer.apple.com/internet/ieembedprep.html here is my HEAD code: <script src="kitchslideembed.js" language="JavaScript" type="text/javascript"></script> and BODY code: <script language="JavaScript"type="text/javascript">InsertKitchSlideMovie();</script> and my "kitchslideembed.js" file... function InsertKitchSlideMovie() { document.write('<object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width="768" height="591" codebase='http://www.apple.com/qtactivex/qtplugin.cab'>\n'); document.write('<param name='src' value="http://jamesgivensdesign.com/public_html/notes/kitchenslide1.mov">\n'); document.write('<param name='autoplay' value="false">\n'); document.write('<param name='controller' value="true">\n'); document.write('<param name='loop' value="false">\n'); document.write('<embed src="kitchenslide1.mov" width="768" height="591" autoplay="false" controller="true" loop="false" pluginspage='http://www.apple.com/quicktime/download/'>\n'); document.write('</embed>\n'); document.write('</object>\n'); } any help out there? Hello, This question is not really about js per se, but more having to do with w3c specifications. I did not see a more appropriate place to post it. I wish there were such a thing as a w3c forum. I have a large number of QT movies in an archive that I have been displaying using the ol' object/embed tag method. In an attempt to bring the pages up to w3 standards, which does not allow embed tags, I have considered this recommendation from Apple for embedding QT videos: http://developer.apple.com/internet/ieembedprep.html Great, now the pages validate. However, when viewing the generated source written by the js, what do I find? Exactly the same code I used that would not validate - object tags with an embed tag in the container. My question may be somewhat philosophical : Is this just merely a way of "tricking" the w3 validator? I mean, if the effective code that the browser sees is the same, why not just put it in there with HTML in the first place, other than to be able to put the w3 'validates!' icon at the bottom of the page? You see what I am getting at? see below
var n = 123456.789; n.toFixed(0); just starting out JavaScript. So i type the above code in firebug. it returns this result:- "123457" As for as i know, toFixed() converts a number to a string with a specified number of digits after the decimal point. If i have specified 0, which i'm assuming it means 0 digits after the decimal point, why does the 7 appear and the 6 is taken out. really fustrating and can't seem to get my head over it. Hey i got this code and i looked at it and im so lost i cant describe it can someone hep me in understanding the ins and outs of this. Code: var YOOaccordion=new Class({initialize:function(togglers,elements,options){this.setOptions({open:'first',allowMultipleOpen:false,fade:false,fadeDuration:600,transition:Fx.Transitions.linear,duration:400},options);this.togglers=togglers;this.elements=elements;this.elementFx=[];this.elementVisible=[];this.togglers.each(function(tog,i){tog.addEvent('click',function(){this.toggleSection(i)}.bind(this))},this);this.elements.each(function(el,i){this.elementFx[i]=new Fx.Slide(el,this.options);if(!(this.options.allowMultipleOpen&&this.options.open=='all'))this.hide(i)},this);if(this.options.open=='first')(function(){this.slideIn(0)}).delay(1,this)},toggleSection:function(iToToggle){if(!this.options.allowMultipleOpen){this.elements.each(function(el,i){if(this.elementVisible[i]&&i!=iToToggle)this.slideOut(i)},this)}this.toggle(iToToggle)},toggle:function(i){this.elementFx[i].toggle().chain(function(){this.elementVisible[i]=(this.elementVisible[i]+1)%2}.bind(this));if(this.options.fade)this.fade(i)},slideIn:function(i){this.elementFx[i].slideIn().chain(function(){this.elementVisible[i]=1}.bind(this));if(this.options.fade)this.fade(i)},slideOut:function(i){this.elementFx[i].slideOut().chain(function(){this.elementVisible[i]=0}.bind(this));if(this.options.fade)this.fade(i)},show:function(i){this.elementVisible[i]=1;this.elementFx[i].show()},hide:function(i){this.elementVisible[i]=0;this.elementFx[i].hide()},fade:function(i){var fx=new Fx.Styles(this.elements[i],{'duration':this.options.fadeDuration,'wait':false});fx.start({'opacity':[this.elementVisible[i],(this.elementVisible[i]+1)%2]})}});YOOaccordion.implement(new Options); First let me say, I do know how to code I just haven't for a VERY long time and things are slow to come back. That being said, I'm working on a self induced project to bring back my coding abilities and I'm stuck. What I'm wanting to happen is when a certain link is clicked it goes to a certain photo album and pulls random pics just from that album and displays them in a certain place on that page. What would be the best way to approach this to make it happen? I'm not wanting someone to do this for me, just get me going in the right direction. Thanks.... I trying to display a random number using innerHTML Here's my code: Code: <html> <head> <script language="JavaScript"> var myArray = new Array("String1", "String2", "String3", "String4", "String5", "String6", "String7", "String8", "String9", "String10"); var num = Math.floor(myArray.length * Math.random()); document.writeln(myArray[num]); //document.getElementById("myString").innerHTML = myArray[num]; </script> </head> <body> <div id="myString"></div> </body> </html> it works when I use document.writeln(myArray[num]); but does NOT work for document.getElementById("myString").innerHTML = myArray[num]; any ideas?? tks Hi - In am learning Javascript and trying to understand why, the following line : Code: arguments.callee.superclass cannot be replaced by : Code: this.constructor.superclass In the following code sample : ( the explanation given is that if someone creates a subclass of PositionedRectangle, then this.constructor will refer to the new subclass constructor, not to PositionedRectangle - but why? 'this' here to my knowledge represents the object 'PositionRectangle' and if not I can't understand why not. ) Code: // Here is a simple Rectangle class. // It has a width and height and can compute its own area function Rectangle(w, h) { this.width = w; this.height = h; } Rectangle.prototype.area = function( ) { return this.width * this.height; } // Here is how we might subclass it function PositionedRectangle(x, y, w, h) { // First, invoke the superclass constructor on the new object // so that it can initialize the width and height. // We use the call method so that we invoke the constructor as a // method of the object to be initialized. // This is called constructor chaining. PositionRectangle.superclass = Rectangle; arguments.callee.superclass .call(this, w, h); // Now store the position of the upper-left corner of the rectangle this.x = x; this.y = y; } // Create a prototype for the subclass that inherits from the prototype // of the superclass. function heir(p) { function f(){} f.prototype = p; return new f(); } PositionRectangle.prototype = heir(Rectangle.prototype); PositionRectangle.prototype.constructor = PositionRectangle; The situation: I have a javascript scroller that loads it's data via JQuery .load function (code not listed as it is not relevant to the problem.) The amount of data loaded is greater than what is shown (each piece of data in it's own div with id's from #scroller1 to #scroller20). So you can see the first 13 div's right away and the other 7 are scrolled in 1 by one as the first 7 are scrolled out 1 by 1 in an endless and consecutive loop. The problem: For some reason, after div20 (#scroller20) is scrolled in to view, my scroller removes div8 but does not add div1 creating a blank space below div9 (if this confuses you, take a look at the link at the bottom of this post.) After div20 is removed, then div13 is added but div1 is NOT removed, now filling this blank space. Now normally this is not visible to be a problem, except that each of these div's will end up being much higher, perhaps only 4 showing at a time, so when one of these 4 disappears, then reappears, it will become unacceptable. Why is this happening? I am sure it has to the code/math inside of function divage... but I can't figure it out for some reason... please help. Here is my javascript code (which uses JQuery) Code: var slide = 1; var auto_scroll = setInterval("scrollme(slide++)", 4000); function scrollme(i){ divage(i); } function divage(i){ removeIt(i%21); addIt((i+13)%21); var j=((i-1)%21); $('#scroller-main-text').prepend($("#scroller"+j)); } function addIt(i){ $("#scroller"+i).fadeIn(1000); } function removeIt(i){ $("#scroller"+i).fadeOut(500); } URL where the problem can be witnessed: http://www.inspiritandintruth.com I'm picking up some work on a site that has been built already in joomla! On some of the pages IE is breaking it and pushing it down to the bottom. example:LINK TO BREAKAGE That Volleyball tag should be up next to the picture. And there is an entire paragraph underneath that that is not getting seen. Someone told me at first that it was the javascript, and I thought it was the Rokbox plugin, but that's not even activated. I am so confused. And it's not the css, because I tried that. Has anyone else experienced this problem? And how is it fixed? I have been working on it all weekend! Thank you for all comments! |