FCKEditor – how to access the HTML content from JavaScript?
Imagine you have a form in which you use FCKEditor as an inline HTML editor. So, inside script
tag you have this:
var oFCKeditor = new FCKeditor('body_html'); oFCKeditor.BasePath = "A_PATH_TO_FCKEDITOR"; oFCKeditor.ToolbarSet = "Basic"; oFCKeditor.Create();
As you know, this creates a textarea with id set to ‘body_html’ and make it look like an inline HTML editor.
Going forward, you would like …
AddThis on IE – Object doesn't support this property or method
AddThis is a great service – it allows robust integration with online services, e.g. Facebook, Twitter, LinkedIn, del.icio.us. What you need to do is to get your button’s code on AddThis homepage and use it in your project. Additionally you can configure the widget; you can refer to AddThis API, where you can find needed information and examples.
I created …
JavaScript: what if nested ‘this’ doesn’t work?
Note: Examples used in that post require usage of prototype.js.
Imagine you have a JavaScript class with some features related to the current view. One of the method in that class is supposed to add an observer on all anchors marked with class “delete”. That observer is also defined in this class. In other words, you have a number of …
AJAX activity indicator
Users are familiar with indications of work performed in background since first versions of MS Windows. Besides being fancy, they are also informative.
AJAX, a Web 2.0 technique, aim at exchanging only small amounts of data with a server; this should be performed behind the scenes. If so, why not expose the moments when user interaction brings about reqest and …
IE7 – problems with onchange event for text field when auto complete used
Imagine you have a text field in the form which is defined as below
Apparently doSth()
will not be called at all if you are running IE7 and use its auto completion mechanism. If you bind doSth()
with onblur
that won’t solve the case either.
Solution
The best solution is to call doSth()
only when the form is submitted. That …
Using PUT and DELETE methods in AJAX requests with prototype.js
Whenerver I write JavaScript I use prototype.js. I find it brilliant, especially when you deal with AJAX. With this library it’s easy to create an AJAX request and process its response from the server.
To send an AJAX request you create a following HTML code:
a link ... $('ahref').onclick = function() { new Ajax.Request('/some_url', { method:'get', parameters:'param1=value', onSuccess: function(transport){ var…
Microsoft JScript runtime error: Object doesn't support this property or method.
Yesterday I spent two hours analyzing this issue, which of course I had only with Internet Explorer…
As the background: I wrote a library that would make a table sortable and paginable. I decided to use prototype.js and script.aculo.us. I tried to test the result not only in Firefox which I use by default, but then I simply forgot… Then, …