javascript

javascript framework for relationship visualization

I need to create a dynamic visualization for nodes and their relationships in Javascript. What's the best framework to use? This is what I've briefly reviewed so far: Flare - it's Flash and hasn't been updated in almost 2 years. JavaScript InfoVis Toolkit - interaction seems a little slow, maybe that's on purpose in the demos Protovi...

css/javascript visibility visable/hidden is very slow on Blackberry

document.getElementById("spinner2").style.visibility="visible" Visibility visable/hidden is very slow on Blackberry (OS4.6). screen seems to be redrawing which makes it unusable in Ajax application. The goal is to put visible feeback to user while ajax request completes. Anyone suggest alternative? ...

How to target a div<> with a link, using php?

What's the best way to target a particular <div> with a selection from a menu using php? Specifically, I want to have a link selected from a menu contained in div id=menu loaded in div id=content. I can see this has been discussed in here, but I can't seem to find a clear answer. So, my apologies if this is rehashing an old topic, but ...

Regex query with Google spreadsheet scripts

Hi, I'm trying to finish off a Google script to reformat a field that I would ideally like to turn into a hyperlink. This is the common format of the text in the spreadsheet: tistaff: other sections: person: randomname This is how I would like it to appear: <li><a href="http://www.thisisstaffordshire.co.uk/topics/person/randomname"&...

A Google Docs document picker?

Working on a method to allow users to "attach" a doc from their Google account to an object in my application. Really, all I need to do is create a link in my app to their asset in Google Docs. Some sort of document chooser that allows users to browse their docs would be very helpful. Is there a standard method/interface to accomplish t...

JQuery Visual Diff Plugin

Hello, is there a JQuery visual diff plugin that anybody knows about. Something like you would see on GitHub, BitBucket, or any standard source control site? I have found this http://snowtide.com/jsdifflib and it looks pretty good, but wonder if there are more out there like it. Thank You. ...

How can i extract src attribut of embed tag

How can i extract src attribut of embed tag with regeex? in this exemple(youtube video): <object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/Ora35AzLxt0?fs=1&amp;amp;hl=fr_FR"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><e...

It's possible to clear browsing history using javascript?

It's possible to clear browsing history using javascript? If yes, how can I do this? Note: A lot of forums said no, but some said yes, so I'm lost. EDIT Note: I want to clear only the last pages in mydomain (random pages in mydomain). ...

Changing an ID using JQuery

I'm trying to change the ID of an element here: http://moemonty.com/chirp/CHIRP-JSON-test.html By using this line: $('.databaseID').attr('id', 'test'); I would like to change the id of this line to test, so I can proceed to put in a pre-fix via a string and a variable from JSON data. But for now, I just wanted to see if I could repl...

JS tween how to improve?

Im trying to make a simple expo tween, it works, but its a bit jittery and FF seems to hang a bit. What can I do to improve it? var distance = (target - x) * dir; x += (distance / 5) * dir; if (dir == 1 && x >= target-1) { return; } if (dir == -1 && x <= target+1) { return; } ...

Adding days to a date - date getting converted to string

So I'm trying to add a certain number of days to a date, and I'm getting a strange issue: var date = new Date(); var newdate = date.getDate() + $('#ddlDays option:selected').val(); date.setDate(newdate); So if today is 09/29/2010, the Date is 29. But if a user selects "5" from ddlDays, it will assume I am adding strings together, ad...

Why aren't $.put() and $.delete() native in jQuery?

We were having a discussion internally here at work about jQuery having built-in support for $.get() and $.post(), but not for $.put() and $.delete(). Some think that its to keep the js library size smaller. Others think that its not a feature that is often asked for, so is left to plugin developers to make. What are some thoughts fro...

JavaScript target question

Here is some code I don't understand, but I know it opens the link in THE SAME WINDOW. I like it to open in BLANK NEW WINOWS... what to add/modify? [some code before] _.addEvent(b, 'click', function (e, i) { document.location.href = (('undefined' !== typeof i) ? i: e.target).getAttribute('flickrshow-u')});_.addEvent(b, 'load', function ...

Could browser javascript harm my backend server?

Hi, I'm coding an application where I want to let the user learn javascript in this way: The user write javascript code on the browser like in an IDE. The user saves it and the code will be saved as a string in my backend No-SQL database (MongoDB/CouchDB). The user opens the application some days later and I pass that string to the we...

when i click on anchor i need to enable text field

I have a anchor tag, with id="click_me". When i click on this i should enable input text (<input type="text" id="summary" class="summary">), which is disabled first. even i can do it using javascript function, by calling these javascript function() using onclick in the tag; but in my application i shld not use these. I am newbie to p...

How can I dynamically add a select element to a form using Prototype & Rails?

I have generated the code for a select & its objects using Rails: var insert_tag = '<select class="select medium" id="category_id" name="search[category_id]"><option value="-1">Select Category</option> <option value="1">Boats and Cruisers</option> <option value="2">Car Parts and Spares</option> <option value="3">Caravans</option> <optio...

Encrypt javascript code to prevent javascript injection in MongoDB?

I'm going to store javascript code in the MongoDB (No-SQL) database. But to prevent javascript injection I want to encrypt the javascript code which is in a string. Is there a way to encrypt it and then decrypt it without having a defect javascript code? ...

Searching XML from Objective-C

My ipad app draws large amounts of text from an xml file and displays them on individual pages in a UIWebView, with the page determined by the XML element containing the text. What is the best way to enable the user to search the entire text for an input string? Should I have Objective-C search the XML and get back the page data, etc? ...

Exponential Formula for negative direction?

Ive got a bit stuck figuring it out for the negative direction? it must be really simple, but just cant seem to get it! x = current x position dir = direction of motion on x axis if (tween == 'linear'){ if (dir == 1) { x += (x / 5); } else if (dir == -1){ //what here?? } } ...

General reasons not to deal with Document's and Element's prototype

Are there general reasons not to deal with Document's and Element's prototype? I like to create my own little framework, because my current project doesn't need the mass of features of the existing frameworks. I don't need to support browsers which don't support Element/Document-constructor and also will not execute scripts that are no...