javascript

update to prototype 1.6.1 causing Error code 12 with select() function

Ever since we upgraded to prototype 1.6.1, I have been getting errors when using the select function. the error is... An invalid or illegal string was specified" code: "12 It stops at line 3299 in prototype.js, which is: results = $A(root.querySelectorAll(e)).map(Element.extend); Example of my code where I call the function... variable...

Application/Script for checking "unseriousness" possible?

I have a classifieds website where users may sell/buy just about anything... My issue which costs the company alot of money, time etc is that ALL classifieds must be reviewed by a physical person (employee) before beeing posted on the website. So when you create a new classified enty, you get the message like "Your ad will be reviewed ...

How can I use a value of JSP in Javascript code?

Hello, I have a list of elements, each of them appeared in my page through jsp. So I have this: <div id="title"><%= list.get(ind).getTitle() %></div> When I display the elements, as this tag is in for loop, I get everything right. Now I what to place a button for deleting each of this elements. What I have done is: <input type="submi...

IE8 ActiveXObject problem

I want to use javascript to create a textfile, so I used : This Line of code : var fso = new ActiveXObject("Scripting.FileSystemObject"); Its working properly in IE6 but not in IE8. Any suggested solution? ...

How to retrieve the image in javascript.

I have one url , which returns an image tag.Now i need to call this url using javascript , and embed this return under a div tag. I was trying $.get(), but "data" is returning some text.How to retrieve the image in javascript. note: pls provide sln with javascript/jquery. Edit: data returns GIF40 or soem this kind of arbitary value.. ...

Upgrading dojo 1.3.2 to 1.4.x

Hello, Up till now my system used dojo 1.3.2 successfully. I have many javascript files with our own declared classes which are combined together using shrinksafe to a single javascript file. I tried to upgrade to dojo 1.4.x (I tried several minor versions). I used the build system with a layer file with all the dojo.require()'s I use ...

jQuery Youtube URL Validation with regex

I know there is plenty of question answered over here http://stackoverflow.com/questions/tagged/youtube+regex, but not able find a question similar to me. Any body has the JavaScript Regular expression for validating the YouTube VIDEO URL's line below listed. Just want to know where such a URL can be possible http://www.youtube.com/wat...

CKEditor - overriding a core plugin

How do I override a core CKEditor (v3) plugin with my own implementation? ...

finding total no of rows in the textbox

how can i get the no. of rows in the multilines textbox through javascript function if some body inserted many no of text in that textbox ...

how to control radiobutton from textfield

i want after i type "0203-ED" in textfield ...two character behind that text can control the radio button.. "ED" character from that text can make one radiobutton which has value="ED" are checked... what script that can make it work?? <script type="text/javascript"> var model=$("#tags1").val(); var version[0,0]="JD"; var version[...

jQuery/Flot: How do you get the coordinates of a datapoint?

I'm currently looking at the example at http://people.iola.dk/olau/flot/examples/interacting.html but I can't figure out, how to get the coordinates of a datapoint. I won't be clicking on the Plot so I can't make use of the event plotclick. Now my question: is there another way to get the x and y coordinates of a datapoint, without click...

jQuery filter selector, is this right?

It seems to work ok but I don't know if this can be impoved on or not. I want to select any HTML tag that has a class of edit-text-NUM or edit-html-NUM and change the color of it. Here is what I am using... jQuery(document).ready(function(){ jQuery('*') .filter(function() { return this.className.match(/edit-(text|html)-...

How to send message through net to mobile ?

currently we are developing website which send sms alert to user for perticular service but i am not able to set script which will do the same Please somebody tell me what will be solution.... Please tell any script or site for this problem thanks... ...

How do you reference a custom object outside of the function it was created in with JavaScript?

Hi, I'm currently using JavaScript and jQuery. I have an function which executes once the document is ready, and inside that I am creating objects which contain various attributes. Within the same function, I can access these new object's attributes no problem, however once I'm inside a different function I can't seem to reference the...

CSS style info library

Is anyone aware of a good javascript library to obtain original (i.e. not computed) style for a given element in the DOM? In other words, something one could use to produce the results in Firebug's style tab. Like Firebug, it should take into account inheritance, shortcut properties, and all the other nuances of CSS. ...

multiple contenteditable elements, using arrow keys to navigate

I got multiple <p contenteditable="true"></p> elements on a page. I'm looking for a solution to use arrow keys for navigating across those disjoint elements just as if they were one single editable element. So for instance, if the caret is at the 10th character on the last line of the 1st paragraph and the user hits the down arrow key, ...

Do any JS implementations currently support (or have support on the roadmap for) fast, vectorized operations on Arrays or similar?

I'd like to do a bit of matrix/vector arithmetic in JavaScript, and was wondering if any browsers or other JS implementations actually have support for vectorized operations, for instance for quickly summing the entries of two Arrays (or summing, or whatever). Even if that currently doesn't mean it compiles down to vectorized operations...

Adding Browser Bookmarks using JavaScript

I have an ASP.NET web page having a button in it. Clicking the button, a bookmark should be saved in the browser and when the user clicks the bookmark, it should surf to http://google.com. How do I make sure that it works with almost all the standard browsers or at least with IE, Mozilla Firefox, Opera and Google Chrome. Another case,...

What is the easiest way to let user to update the web page contents based on a file on his computer ?

I'm writing an application that runs on Firefox 3.6.3 for internal use only. I would like to be able to update the contents on the page based on a file on my computer. What is the easiest way to achieve this ? I understood from other posts here that I must upload the file to the web server and then return the contents back to the brow...

Javascript parse error on '\u2028' unicode character

Whenever I use the \u2028 character literal in my javascript source with the content type set to "text/html; charset=utf-8" I get a javascript parse errors. Example: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; <html lang="en"> <head> <meta http-equiv="Content-Type" content="text...