javascript

jQuery RTE Recommendations

There are some decent JavaScript-based RTEs out there, but when it comes to jQuery plugins, the selection seems to be quite sparse. What are the most recommended/promising projects (either finished, or in progress) that provide a simple-to-implement RTE using jQuery? Here's what I've found from my research so far: jQuery UI Rich Text ...

How do I resize an iframe based on its content?

I would like iframe to be big enough to not have scrollbars, and if needed, require the browser render the scrollbars. There have been posts before, i know... but .. many weren't quite my problem. The main page and the iframe are on the same domain. ...

Sqlite: Need to retrieve the automatic primary keys generated for each entry I insert

What's the best way to do this? Note that this is the sqlite version packaged with Google Gears, also. ...

jQuery get array values from url

I've got an url like this: http://www.somewhere.com/index.html?field[]=history&field[]=science&field[]=math Using jQuery, how can I grab the GET array? Thanks. ...

JavaScript RegEx to change a string

I need to take strings in the following format: http:\/\/img.mypath.net\/time\/daily\/2010\/1006\/my_image_name.jpg And convert them to this, using JavaScript: http://www.mynewpath.com/i/daily/2010/1006/77_my_image_name.jpeg I'm sure that someone more fluent in RegEx than I can give a terse solution. ...

replace items which appear in both arrays in javascript

hi, well, i have two arrays and want to remove in one of them, all elements which exist in the other as well. is there a native JS possibility? is there a jQuery functino? what is best practice to do so (the faster the better) thanks p.s.: just post code in other languages too, maybe i can port it to javascript Update, after accep...

Using Env.js with Python

I am having a bit of difficulty getting Env.js working with my Python application. The documentation on the website states: develop bridges for running Envjs in Ruby, Python, and other host languages with the SpiderMonkey and V8 javascript engines However, I have been unable to find any bridges to Python in either the main branch ...

How do i check if a substring matches with regex?

I want to find out if my string contains a certain substring and return true if it does and false if it doesnt. regex = /^[a-z0-9]*(TEST)+'[a-z0-9]*$/; if(myString.contains(regex)) { // do something } ...

Creating multi-field in-place editor with JavaScript/JQuery

I am looking for a way to create an in-place editor in JavaScript like JEditable or similar plugins. However, the difference is that my editor would be a multi-field form rather than single field. Since the same form will be used in different parts, i.e. editing existing items and creating new items, I would like to be able to specify t...

What is considered redistribution?

Hi I have lots of plugins and each has it's own license at the top and they can be a bit on the long side. I am trying to minifiy and compress everything to get the smallest sizes possible but these licenses can add quite a bit of KB. So I am wondering if I can just remove them or maybe just link to the file instead since I understand ...

Universal add to bookmarks script?

Does anyone know of a script that I can use to automatically add a site to favourites upon clicking of a link for multiple browsers? Atleast Firefox, IE, Chrome would be good. If not, is there a way I can simulate ctrl+D through Javascript as I know that keystroke adds a site to bookmark in most browsers? ...

Duplicate Google Spreadsheet on Demand

Hi, I've created a pretty complex Google spreadsheet. I would like a user to be able to click a button or follow a link, and get a copy of this spreadsheet where they can fill in data. I would later check process this data manually. Is there anyway I can do this via a complicated link, or some Javascript, or possibly even using a ser...

Using Javascript (DOM) with ASP.NET

I have an asp.net page with several list boxes. I would like to include some javascript on the page that allows a user to drag individual list elements from one box to another. On a normal web page, the script to do this is reasonably simple, however, with the element IDs generated by ASP.NET, I don't know what identifiers to have my s...

Can interpret this piece of javascript. Someone sent it to me through facebook and asked that I copy it into my address box -- I haven't.

DO NOT USE THIS! javascript:(function(){a='app107489592636080_KxqAxK';b='app107489592636080_bGBstB';gASjYp='app107489592636080_gASjYp';kyFYLC='app107489592636080_kyFYLC';NGqzYj='app107489592636080_NGqzYj';eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''...

ASP.NET List Item IDs

The <li> tags generated by ASP.NET when I programatically add ListItems to my ListBox control do not have ID attributes. Is there any way that I can get them to have IDs so that I can get references to the elements from Javascript? ...

Can Onmouseover be used outside a Hyperlink?

I'd like to build onmouseover directly into a javascript block. I can do it within a hyperlink but I need to do it in the actual script section for the code im writing. Can I do object.onMouseOver()? Or is there another way to do it? So for example I'd like <script> something i can put in here that will make on mouseover work on a speci...

Upgrade jQuery plugins to latest version

Hello everybody. I have quick question about jQuery plugins, hope somebody out there has some advice. I'm working with a jQuery plugin that has been working as expected, but in the last couple of days we upgraded from jQuery 1.1.4 to 1.4.2. After a lot of debugging, I was able to realize that in the old plugin, selectors are written as ...

Possible to disable jQuery for IE6?

I've tried to be sneaky and set a var in an IE6 conditional comment; then use an if (is IE6) { do nothing } else { do these effects }; to no avail. It was ignoring my calls to show/hide. I saw a few things where IE6 sucks with show/hide, so I tried adding hide/show classes to no avail as well. Any help would be greatly appreciated and ...

Excel spreadsheet formula to javascript question

Hey all i am trying to figure out how to go about calculating this formula from an Excel 2007 fx to javascript: =(B12*'ROI endo only'!B5)/(1-(1+Data!B12)^(-Data!B13)) WHERE B12 = 0.49% B5 = 99,500 B13 = 48 So far i have this as my javascript code: var theCalc = (0.49 * 99500) / (1 - (1 + 0.49)^(-48)); alert(theCalc); ...

how to escape JavaScript code in HTML

I have some addHtml JavaScript function in my JS code. I wonder how to escape HTML/JS code properly. Basically, what I am trying right now is: addHtml("<a onclick=\"alert(\\\"Hello from JS\\\")\">click me</a>") However, that doesn't work. It adds the a element but it doesn't do anything when I click it. I don't want to replace all " ...