javascript

Take user input and write to file from javascript inside a pdf?

Is it possible to have a pdf file that asks a user a set of questions and then writes their answers to a file, then next time it is viewed loads those answers as default values? I know pdfs can include javascript and have figured out how to add javascript to a pdf with iText (http://itextpdf.com/) but don't know how to prompt for user i...

Best practice for writing ARRAYS

I've got an array with about 250 entries in it, each their own array of values. Each entry is a point on a map, and each array holds info for: name, another array for points this point can connect to, latitude, longitude, short for of name, a boolean, and another boolean The array has been written by another developer in my tea...

jQuery: Fade not working

For some reason, jQuery's fade effect isn't working. Could it be because of my code, or could it possibly be a browser incompatibility issue? This function does everything it is supposed to, aside from the fading. It gets called at the correct time. function move_to_term(original_course, helper, term) { var cloned_course = origina...

jQuery Auto Add Text Field on Click

Does anybody know of a good solid plugin that allows a user to have an infinatly expanding list of text boxes. So here is an example: Col 1 - Col 2 Cheese - 150mg Cake - 20mg Cheese - 100mg New - New So when a user clicks on any of those (They will be in a table), they can edit it. And when New is clicked, New...

jQuery selector to check if an element is animating to hidden

Is there a way to tell if an element is either hidden or is currently in the process of hiding (via an animation)? The only way I can think to do it is to store a flag in the element's data when you call show or hide, but I was wondering if there was another way? ...

How can I alter anythingSlider so that it disables the next / previous buttons when only 1 <li> in the <ul>?

I have a page with multiple instances of anythingSlider on it and I'm using PHP to dynamically load pages that swap out the content in them. Reference: http://ceedcreative.com/CEED_2.0/ I would like to edit the anythingSlider to disable the previous / next buttons if the UL it's displaying only has one LI within it. In other words, n...

Javascript iFrame Limitations

I know that, for security reasons, javascript can't read the contents of an iframe if it belongs to a different domain. This makes sense, given that the entire page could be an iframe with snooping scripts outside of the frame. The question is - are there equal limitations in the other direction? Can javascript within an iframe (from a ...

ShareThis causing "Transfering Data From" in Firefox status bar

There is a conflict with the ShareThis script and another script I have on my site. I've set up a test example here: http://jbrlsr.com/help.html to reproduce the issue, use FireFox and mouseover a few of the links, you'll notice "Transferring Data From" in the status bar area. To clear that message click on the ShareThis icon. There i...

Format an input with Jquery?

I'm building a calculator that has a slider. Everytime I slide the bar an input box is updated with the number, the calculator passes the value and updates the calculation. So my input boxes have dollar values that can range anywhere from $0 to $10,000. Right now my boxes display 0 to 10000 and I want them to be displayed as $0 to $10...

How to write a Google Doc type rich text editor

I need to write a rich text editor similar to Google Doc. Does anyone know any samples of similar projects? What technologies will I need? and what process is involved? ...

Is there a way in javascript to create a date object using year & ISO week number?

I am trying to create a google annotated timeline viz. For that I need to input the date of the event. The only information I have is the year & the ISO week number for the event. Is there a way in Javascript to create a Date object using just the year & week number? I googled it but did not come across any feasible solution. Thanks fo...

Ad Server does not serve ads in Firefox, but works fine in Chrome, IE, & Safari!?

I'm having a strange (likely JavaScript) related issue. I'm running Open X Ad Server ( http://www.openx.org ). The ads load fine every time when visiting the site via Chrome, IE, or Safari, but sometimes don't load at all in FireFox - Hence, it is a client side issue, which leads me to believe its something up with the javascript. The ...

Post Loading ads - using appendChild to move an IFRAME with text link ads

I have changed code around to basically load an add the bottom of the page in a hidden div and attached an onload event handler that called document.getElementById(xxx).appendChild() to take the hidden ad and move it into the right spot in my page. This works GREAT.. however when the ad is a text ad it AFTER i move the ad there is nothi...

when text changed inputbox automatically updates next 6 text boxes

I have 7 textboxes. If Top 1 textbox(Volume All Years) text changed, text need to be updated in next 6 inputboxes(Latest 2009 Volume to Latest 2014 Volume). I need javascript or Jquery for this. I will write Js textchanged() or focuschange() for top 1 textbox. So what should I write in focuschage() or textchanged methods() <tr id="row12...

What percent of web sites use JavaScript?

I'm wondering just how pervasive JavaScript is. This article states that 73% of websites they tested rely on JavaScript for important functionality, but it seems to me that the number must be larger. Have any surveys been done on this topic? Maybe a better way to phrase this question is - are there any sites that don't use JavaScript? ...

jQuery/javascript replace tag type

Is there an easy way to loop through all td tags and change them to th? (etc). My current approach would be to wrap them with the th and then remove the td, but then I lose other properties etc. ...

Calling javascript method from from inside object

I am struggling with methods in JavaScript. obj = function(){ this.getMail = function getMail (){ } //Here I would like to run the get mail once but this.getMail() or getMail() wont work } var mail = new obj(); mail.getMail(); How do I make the method in a way that I can run it both inside the object and from the outs...

Display/Hide part of a list

Hi I have an (unordered)list (generated by a repeater) of items. However, I'd like to show the first three items, and have the rest hidden by the main content div. When a button is pressed, I would like the list's div to expand, pushing the main content div down and showing the rest of the list. I was thinking of using slideDown(), bu...

How to use Javascript to create a checked radioButton in IE?

I was trying to create a checked radiobutton by using following code in IE7. But it doesn't work. var x = document.createElement("input"); x.type="radio"; x.checked=true; //I also tried setAttribute here which doesn't work either. var spn=document.createElement("span"); spn.appendChild(x); document.body.appendChild(spn); I found tha...

firebug search variable by value

Is there any way in Firebug to search an active variable in Javascript by it's value? I've looked everywhere and can't find an answer! Thank you so much in advance!!!!!! ...