How can I check existence of a file with JavaScript?
Hi, How can I check an existence of a file (It is an xml file that I would like to check in this case) with JavaScript? Thanks, Burak Ozdogan ...
Hi, How can I check an existence of a file (It is an xml file that I would like to check in this case) with JavaScript? Thanks, Burak Ozdogan ...
if (typeof Object.create !== 'function') { Object.create = function (o) { function F() {} F.prototype = o; return new F(); }; } var o1 = {}; o1.init = function(){ alert('o1'); }; var o2 = Object.create(o1); o2.init = function(){ // how would I call my ancessors init()? alert('o2'); }; o2.init(); ...
I would like to be able to edit the column headers in the same manner that I can alter row-values. Anyone come up with a way to do this? I don't see any mention of it in the docs. ...
I have a php Web Application Multilingual, I have a php variable which can tell the current language of the Web Application, I need to validate user inputs in client side, and error messages are shown with JavaScript alerts for example if the php language variable is "french", I need the alert as "bonjour" if the php lang...
I am looking at the code in the tumblr bookmarklet and was curious what the code below did. try{ if(!/^(.*\.)?tumblr[^.]*$/.test(l.host)) throw(0); tstbklt(); } Can anyone tell me what the if line is testing? I have tried to decode the regex but have been unable to do so. ...
I am using a bit of JavaScript like this: echo '<a href="javascript:playSong'."('$row[artist]','$row[title]','$row[sourcefile]')".'">'; My problem is that sometimes my $row[artist] and $row[title] variables contain double qoutes. When this happens it breaks the javascript:playSong(); function call. For example if the line was output...
I have a menu bar with hover effects, and now I want to place a transparent image with a circle and a "handdrawn" text over one of the menu items. If I use absolute positioning to place the overlay image above the menu item, the user will not be able to click the button and the hover effect will not work. Is there any way to somehow di...
I want the submit button to disappear after it's clicked and a new layer to show in its place. Here is what I have so far: <div id=uploadform> <form enctype="multipart/form-data" action='' method='POST'> <input type="file" name="imagefile" class=browse> <p><input type='submit' value='Upload' class=uploadsubmit onClick="if($(this).('#l...
Hi, I'm making a website that tend to handle all the request in one page (Ajax). so i thought that I could trap every user's click on a link and check IF it's on my website i do something on JavaScript like an ajax request for example, ELSE it would open the link like usual! doing a watch on window.location did not work! and moreover I ...
I'd like to take my form below, and somehow adjust it to submit the form when the user selects a file. How can I do that? <div id=uploadform style="width:500px;margin-left:auto;margin-right:auto;"> <form enctype="multipart/form-data" action='' method='POST'> <input type="file" name="imagefile" class=browse> <input t...
How can i check if a variable has something in it? I tried checking if a .match() returned null but that wasn't useful for checking with an OR? All ideas would be gratefully appreciated! ...
I am trying to compare two dates , I have this code which I thought would work a treat but it didn't . For now I just want to alert an error if the enddate is less than the start date . The date style yyyy-mm-dd needs to be kept in this format for other events prior to this. can anyone give me a clue ? thanks startdate = "2009-11-01...
I have tabled data in which most of the cells are text inputs or text areas. Each cell is named with the row, then the column such as <input type=text name=4_16> where 4 is the row, underscore the divider, and 16 the column number I have this javascript (using jquery)... $(document).ready(function() { $('#parent').chang...
Hi, Below I have included the jquery code I am using to try to add a css class to the link in the side column that equals the active url, but it's not working, and at some point it did. Thanks in advance for any help you can provide. Link: http://www.liquidcomma.com/portfolio/project/TSF%5FRobot%5FAd/1/ <script type="text/javascript">...
This question may have been asked before, but I had trouble finding an answer, since I didn't quite know what search terms to use. In HTML, how do you make a link go a place, but execute JavaScript instead when it is clicked? Right now, I have a link that's somewhat like this: <a href="#" onclick="javascript:dostuff()">Stuff</a> But,...
Hello, I am using sifr3 and I know it is supposed to let you use multiple fonts in one line. I have tried a number of changes with my sifr.css and sifr_config.js files to no avail. I tried using spans, sub class of h1, etc. Sample Link: http://www.liquidcomma.com/about%5Fus/pages/overview/ Thanks for any help you can provide. ...
I am trying to find some child a elements within a ul parent. But, I need to only find the first a. Here is what I am using $('div.item a').click(function() { $(this).parent().next('ul.subItems').find('a:first').addClass('selected'); }); HTML: <div class="item"><a id="main5830" href="http://www.mysite.com">Test</a></...
Hello, I have the following strange looking code in a js file and i need some help in understanding whats going on. What im confused about is why is the whole thing put in paranthesis ?. What does that mean ? (function() { var someobj = window.someobj = []; var parentId = '#wrapper'; $(document).ready(function() { //some code...
How can I easily customize OpenLayers map controls? Or at least, how can I minimize the controls' height? Thank you. PS. Is there any CSS override? ...
I'm creating a HTML Canvas object using this javascript code: var Canvas = document.createElement("canvas"); Canvas.style.width = "500px"; and then i'm drawing text upon it. When the canvas is displayed, the whole canvas has been scaled up (including content) to to match the 500px width, which results in ugly resampling. What i real...