javascript

Alternative for SIFR

I wish to know if there is an efficient alternative for SIFR. We are facing performance challenges with SIFR and we wish to replace it. One option is that we just use system fonts. Can someone please provide any direction in which we can research and solve the performance issue that we are having with SIFR. Even a replacement suggestion ...

Javascript function returns before its subroutine finishes

I'm trying to test if urls dynamically passed to image tags would resolve or not. I'm using the following javascript function: testImageUri = function(src) { var img = new Image(); var imgStatus = false; var goodUri = function() { imgStatus = true; }; var badUri = function() { ...

Regular Expression with quotes in javascript

i like to check this email address with javascript and regex. Beacuse of quotes and other signs.. there will be syntax error. i checked with firebug. now, can anyone send me a possible solution to check this with javascript. (?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*| "(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5...

is it possible to build a debugger around the java scripting engine?

hi, we are using the java 6 scripting engine in our product, and now we are thinking on adding some debugging abilities. my question is: is it possible? does the java 6 scripting engine has the same capabilities like rhino as far as debugging. some documentation about how to start doing it, some code samples any information would be...

tinyMCE : dynamic variables in the source view

Is it possible to use dynamic variables in tinyMCE? Here's the use case I have in mind: User adds an image in source view like this <img src="{imagepath}/logo.gif" /> or one is added programmatically using setContent(). User switches to design view - {imagepath} is expanded to http://someserver.com/ and the image is correctly shown wi...

how to check with javascript if all 'SELECT' values == 1 inside a form ?

Hi. Is it possible to check if all select values inside a div, inside a form equals 1? I dont want to write hundreds of if statements. Reason for this is that I am trying to validate the form, and want to check so that the user has selected something. Standard value in EVERY select list is 1 (not selected anything). <form name="m...

Javascript regex

Hi all, Currently I have a basic regex in javascript for replacing all whitespace in a string with a semi colon. Some of the characters within the string contain quotes. Ideally I would like to replace white space with a semi colon with the exception of whitespace within quotes. var stringin = "\"james johnson\" joe \"wendy john...

Where can I find a simple JavaScript based HTML syntax highlighter?

Where can I find a simple JavaScript based HTML syntax highlighter? Simpler is better, and I don't need any line numbers or tricks, just added colors. If it is the same colors as dreamweaver, even better! ...

Is UIWebView's JavaScript evaluator able to use the JS's RegExp object?

There is no default RegEx library on the iPhone. Is it ok if I use UIWebView's stringByEvaluatingJavaScriptFromString to evaluate a JavaScript string that actually uses the RegExp object to evaluate an expression? Is this supported on the iPhone? ...

Some more help to get this loop to work please?

This works but only if ALL SELECTS == 1, as soon as I change one SELECT to something else, this returns true... why? BACKGROUND: To validate a form. I am getting all SELECT values inside a div (which contains more divs) and compare them to the number '1', and if they == 1, then an error div shows up for the user. some code for getting ...

Jquery .next IE6/7 issue

I've been having nothing but problems with this script for a simple hide/show gallery of testimonials. I think the java is somewhat self explanatory... When the page loads, I tell it to show the first testimonial in the line up (as the css is display:none) and gives it a selected class name. Works fine in across the board. On click I ...

Ajax - getting separate lines of data

hi. i would like to ask if it is possible in ajax technology (working with servlets) to get not the whole data from responseText but line by line. i mean when putting in servlet lines of text using println method (response object) i would like to get every seperate line on the client side (for displaying achieving data like in console) ...

Problem with jquery ajax in Opera and Google Chrome

I have a page where I need to add a drag and drop functionality to certain elements. When the drop event occurs, it makes an ajax call to a php function and then refreshes the contents of a div. I'm using jQuery with jQueryUI for the drag and drop, and CakePHP as a PHP framework (not sure if this is relevant). Everything is working just...

jquery: auto-size absolute-positioned child div

hi, i'm having the following markup using 2 divs. the #child div has set position:absolute; +------------------------------+ | +----------+ | | | #child | | | +----------+ | | | | | | | +--------------...

Showing a div while page is loading, hiding when its done

I want to show a div with a loading animation over my page while the page loads some XML content. Once its loaded, I want to hide this div. How can I go about doing this? ...

textarea has no value?

I am sure my javascript works, because it works with other form elements. But I cant get it to work with the textarea... Textarea.value doesnt seem to work... I read someplace textareas dont have values, so how would you solve this. Im trying to validate a form and checking if value is empty doesnt work. Thanks UPDATE: some code: ...

Google Maps, array + GLatLng + GPolyline

Hi! I am using the following code to group and show a list of ship positions on a map: function configure_ship_polylines() { var shipPoints = new Array(); // Group positions by ship for (var ScenarioPositionID in __data['scenarioPositions']) { var scenarioPosition = __data['scenarioPositions'][ScenarioPositionID]...

string termination problem

When I try to run this script i get error in IE: Unterminated string constant <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head runat="server"> <script language="javascript" type="text/javascript"> ...

How to write FireFox extension with Visual Studio using C# programming language?

I was wondering if it's possible to write Firefox extension using .Net Framework? Had anybody such experience in writing Firefox extensions using C# programming language? Any good sites or guidelines would be very helpful. Here is an example of what I need. Extension to enter phone number and to send SMS Message. I draw it in Paint, s...

jQuery form validation problem.

I'm using the following code (via 'Dark Side of the Carton') to validate a reCAPTCHA field, before submitting the rest of a form that includes the captcha field. The validation works fine, the 'recaptchavalidate' page is called, returns True or False correctly and the JavaScript picks this all up (I test this via alert(html);). However...