[1.2] ajaxEngine

a place to post your own scripts

Moderator: 1.2 Moderators

Forum rules
  • Each Script may have only one thread per mayor release.
  • The owner of the thread should keep the first post up to date (newest version, demo...)
  • The title should include the version -> "[v0.1] Nice mooPlugin"
  • see also the detailed Rules

[1.2] ajaxEngine

Postby raziell17 on Thu Jul 02, 2009 1:19 pm

This is my first mootools widget so bear with me.

ajaxEngine is used to add ajax functionality to simple html pages.
I tried to make it as user friendly as possible, and to mod normal html sites into ajax pages with the user using as little code as possible.
it works best on sites that follow templates and have common content areas.

More Info / Demo:
http://www.richmeierconsulting.com/inde ... &Itemid=54

tell me what you think.

Change Log - 8/16/09
added new options: customEvents and evalScripts
built in IE history tracking
added new property orginalState

bug fixes:
fixed a bug that didnt allow an element to return to its orginal state through the use of the back button

Change Log - 4/3/09
Changed option variable name from extractionId to loadFrom for clarification reasons
added new Property loadingHTML

future features:
1. IE forward and back support.
2. content refreshing in intervals
3. hide Linksrc
Last edited by raziell17 on Thu Sep 24, 2009 5:22 pm, edited 6 times in total.
User avatar
raziell17
mootools connoisseurs
 
Posts: 24
Joined: Wed Jan 14, 2009 8:45 pm
Location: United States, Colorado

Re: [1.0] ajaxEngine

Postby mootastic on Fri Jul 03, 2009 9:06 am

Looks wonderful! Didn't look at the code yet but implementing the back button functionality is really a plus.

May just be using this for a couple of my sites :D
mootastic
mootools connoisseurs
 
Posts: 44
Joined: Thu Aug 14, 2008 6:01 am

Re: [1.0] ajaxEngine

Postby raziell17 on Fri Jul 03, 2009 9:53 pm

I'm still looking into a way to get the back and forward buttons working in IE7 and earlier browsers. i think there's a way to access and inject history items directly but from what i've heard its tricky and dangerous.
User avatar
raziell17
mootools connoisseurs
 
Posts: 24
Joined: Wed Jan 14, 2009 8:45 pm
Location: United States, Colorado

Re: [1.0] ajaxEngine

Postby horseweapon on Fri Jul 03, 2009 11:01 pm

Looks great and very compact. The trick for IE7 and earlier is to use a hidden iframe. I forget how it works exactly but by setting the src of the iframe with the new hash, and quickly opening and closing the iframe, it adds the new url to history without actually loading the page. There are some examples in the many ajax history scripts available. Same with older versions of safari, you need to use a special trick, but I forgot how it worked
User avatar
horseweapon
mootools enthusiast
 
Posts: 393
Joined: Mon Aug 04, 2008 6:52 pm
Location: France

Re: [1.0] ajaxEngine

Postby raziell17 on Sat Jul 04, 2009 2:50 am

heres the problem i run into when using iframes.
an iframe will not display the page if its the same url as the one its on. so if one of the links is directed towards the page your already on its impossible to get an iframe to record that history.
i'm thinking though there maybe a way to only use the iframe as a method to stop IE from actually going back a page and through using store / retrieve i may be able to keep a page history in the storage of the iframe.
though its a pretty messy work around it might work.


-edit-

i found a method that dosnt involve an iframe. it creates page history through the use of anchor tags. the problem i'm running into now is that when the back button is hit in IE the address bar properly updates but the location object isnt updated with the new hash code. is there anyway of accessing the browsers address bar with out using the location object?
User avatar
raziell17
mootools connoisseurs
 
Posts: 24
Joined: Wed Jan 14, 2009 8:45 pm
Location: United States, Colorado

Re: [1.1] ajaxEngine

Postby phal0r on Sat Jul 18, 2009 9:58 pm

ah now i know what you mean ^^

i have the same problem with older IEs. Do you have already a solution?
phal0r
mootools connoisseurs
 
Posts: 33
Joined: Thu Nov 20, 2008 5:10 pm

Re: [1.1] ajaxEngine

Postby raziell17 on Sun Aug 16, 2009 10:26 am

phal0r wrote:ah now i know what you mean ^^

i have the same problem with older IEs. Do you have already a solution?



well i finally got some free time to work on some of the problems this widget has.
i added history tracking in IE6 and 7. IE8 kind of works the back and forward buttons feel clunky and unresponsive at times, i'm still working on that. if anyones curious about how i solved the history problem in IE i'd be glad to give you a run down on how its done.
i did end up using an iframe with some round about messy hacks. there is a better way of doing it with an iframe by integrating form posting i'll be looking into but for now it works.

check out the original post for a change log.
User avatar
raziell17
mootools connoisseurs
 
Posts: 24
Joined: Wed Jan 14, 2009 8:45 pm
Location: United States, Colorado


Return to Your Scripts

Who is online

Users browsing this forum: No registered users and 3 guests