Archive for the ‘AJAX’ Category.
September 12, 2007, 5:20 pm
I was just having a ton of issues getting JQuery and TinyMCE to work. Sometimes loading of TinyMCE would hang and never complete and other times I would lose my tinyMCE or jQuery objects for some reason. Well, I’m not sure what the error was, but I finally got it working. It seems that you first need to completely load and initialize TinyMCE before loading JQuery. Here’s my code:
<head>
<!-- Tiny MCE -->
<script type="text/javascript" src="/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({ mode : "none"});
</script>
<!-- JQuery -->
<script type="text/javascript" src="/js/jquery/jquery-1.2.js"></script>
</head>
This seems to work and allow me to do everything AJAX style and use TinyMCE editors in my AJAX forms (i.e. forms that I download the HTML for and that I submit via AJAX). Here’s a simple form snippet that is downloaded via AJAX and placed into a div:
<form action="submit-ajax">
<textarea id="editor" ...>
...
</form>
<script type="text/javascript">
tinyMCE.addMCEControl(document.getElementById("editor"), "editor");
</script>
November 29, 2006, 12:03 pm
I’ve finished this a while ago, but just now am finally posting it to my blog. This article will eventually find a nice home at JavaLobby or some similar online publication, but I want to get the information out there until that publication comes out.
Here is the perm-link to the article:
http://brian.pontarelli.com/ajax-acegi/index.html
November 15, 2006, 11:31 am
Ben Alex and I have been working recently to finalize the inclusion of patch I made for getting AJAX login to work with ACEGI. After a number of very constructive conversations and looking at some of the new features in 1.0.3, Ben and I decided to remove the patch and instead leverage a pure configuration driven approach, which does leverage mostly redirects to handle AJAX authentication.
I’ll be putting together an article for how to accomplish the AJAX login today and initially posting it here as well as possibly over at JavaLobby. It will cover the steps required to get AJAX login working with ACEGI 1.x and will also cover a feature in 1.0.3 that allows a forward instead of a redirect in one instance.
August 30, 2006, 1:54 pm
I’ve been having a good discussion with some ACEGI users about my patch for AJAX and ACEGI. There are a number of other solutions out there and some contention about redirects and AJAX. The W3C specification for the XMLHttpRequest states that all browsers must support redirects transparently. Here’s the link:
http://www.w3.org/TR/XMLHttpRequest/
The specific section is:
“If the response is an HTTP redirect (status code 301, 302, 303 or 307), then it MUST be transparently followed (unless it violates security, infinite loop precautions or the scheme isn’t supported). Note that HTTP [RFC2616] places requirements on UAs regarding the preservation of the request method during redirects, and also requires users to be notified of certain kinds of automatic redirections.”
So, I was asked by someone to mock up an example that illustrates redirects working with AJAX and here it is:
http://brian.pontarelli.com/files/ajax-redirect.war