I am using IsDirty to check for changes in my FCKeditor. Unfortunately, it seems that its functions are asynchronous.
Here is the failing code:
var txtObj = $('activities').EstActText1.id;
var oEditor = FCKeditorAPI.GetInstance(txtObj);
oEditor.SetHTML(jsonObj.DATA.ESTACTTEXT1.toString());
oEditor.ResetIsDirty();
The problem is, Set...
hello Friends,
Can any one provide me a good tutorial about to implement spell checker?
that is I have a textarea and one button.. what ever I enterd in to the textarea i need to do the spellchecking on that..
thanks
Thanks
...
How to replace "i" in <li>anything</li> using regex
Code :
var code = "<li>anything</li>"; // i don't know what is in <li>......</li>
result should be :
var code = "<li>anyth1ng</li>"; // i don't know what is in <li>......</li>
...
I'm developing a chromium extension so I have cross-host permissions for XMLHttpRequests for the domains I'm asking permissions for.
I have used XMLHttpRequest and got an HTML webpage (txt/html). I want to use XPath (document.evaluate) to extract relevant bits from it. Unfortunatly I'm failing to construct a DOM object from the returned...
Code:
$('#Inputfield').keyup(function(e)
{
if(e.which == 13)
{
functionXyz();
}
else
{
functionZyx();
}
});
$(document).keyup(function(exit) {
if (exit.keyCode == 27) { functionZzy(); }
});
Question:...
Hi all,
I'm creating a custom file browser for CKEditor. In the popup window that CKEditor launches, the user can select a file... at which time the following code is run:
window.opener.CKEDITOR.tools.callFunction( funcNum, url );
This works great when the user stays on the same page that was originally launched by the CKEditor. The ...
I created a form that randomly selects 12 T/F questions from an array of 16, displays them in a random order and will score it all at the end. The problem is that I cannot get the form to clear on refresh. When I try with nearly any method, the form, questions and all disappears.
The reset button, however, does work.
Here's the form:
...
Hi,
I hava set up AJAX script that when you click the button it calls a PHP document.
The problem I have is now some of the variables of the PHP file are set to constant, and now I want them to be conditional to what gets sent when the button is clicked.
I want there to be a check box, that if clicked, will set a PHP variable to be TR...
<script type="text/javascript">
// check the spelling on a textarea
$("#check-textarea").click(function (e) {
e.preventDefault();
$(".loading").show();
$("#text-content")
.spellChecker({
lang: "en",
engine: "google",
suggestBox...
I'm using C# / .NET 4. I have a form with a WebBrowser component on it. I have loaded an external web page to the WebBrowser component.
I have an event handler attached to the Navigating event. This works for most things. however, one part of the web site I'm loading executes a window.open(url) javascript command. This has the effect o...
I'm looking for a way to conditionally load and keep the execution order of some javascript files (external and internal) without any library dependency. Basically, what I want to do is load them up only if the browser supports localStorage.
Here's basically my shell:
if (window.localStorage) {
//load up JS only if it's needed
var...
Is there any way/reason to keep your js/jQuery ouside public_html? Are there security benefits?
...
Hi,
I am using this one to prevent user to type special chars.
String.prototype.isText = function () {return /^[\w\s]*$/.test(this)}
How can i change it to prevent users to type non-english words ? (only apostrophe and & will be accepted as special char)
thanks so much
...
Hi,
I can't figure this one out:
I have a function, e.g.
function test () {
this.rating = 0;
$j('#star_rating a').click(function() {
alert(this.rating);
});
}
var foo = new test();
On click it alerts "undefined". What is wrong? Please help.
...
If a variable could be defined in a function, even if no value is assigned, it becomes a local variable
so, is testB() better programming?
var test = 'SNAP!'
function testA(boolean) {
if (boolean) var test = 'OK';
else var test = null;
alert(test);
}
function testB(boolean) {
if (boolean) var test = 'OK';
alert(test...
I need to load the Recaptcha library on demand, with javascript (using Prototype):
var captcha = new Element('script', { type: 'text/javascript', src: 'http://api.recaptcha.net/js/recaptcha_ajax.js' });
$$('head')[0].appendChild(captcha);
captcha.onload = function()
{
Recaptcha.create("dsfahsldkjfhlasdjfc","recaptcha_image", {theme: "...
Hi-- I'm updating some v2 API code to work with the v3 API. For the most part it's way better. But I'm running into some issues with the panorama object.
Though the panorama object appears in the correct div, and all the copyright/controls appear, the window is blank (solid grey). Oddly the pano window shows the proper address for the g...
How might one handle making a progressbar update to 100% based on having one or more items from all 3 groups?
For instance if I have 20 fruits, 0 grains, and 2 vegetables, it should show 66/67%. If I have 1 or more items from each group, show 100%; and having only 1 or more of 1 group should show 33/34% complete. I'm not sure if I sho...
Hi,
I'm writing an app currently that uses the ExtJS framework. I'm pulling an XML feed from an external site using cURL, loading as simplexml, json_encode-ing it, and writing it to a file a .JSON file which I will later access with ExtJS data store.
However, the formatting is becoming funky because the XML generated from the PHP fi...
I'm profiling JavaScript using dynaTrace AJAX edition.
According to the tool's "Hot Spots", the following jQuery method is using the majority of execution time:
CLASS(*, *, undefined, *, undefined, false): false
...it has over 700 invocations on my page.
What is this call and how can I optimize it?
I'm using jQuery version 1.4.2. T...