Oh, that would be great. I just sent you the access data via email. It is a multidomain installation and we are talking about the last site in the list (teddy-karhu.ru). There is no much on it as it is still a draft, the contact form (actually a booking form) is on the left sidebar under the map.
P.S. By the way I probably can also submit an extra with that map I did. That might be very usefull for the Russian speaking users.
Got the creds, I'll take a look at it when I get home (approx. 10 hours).
Problem solved. Three issues: The first form did not have [ [~9] ]. I think you changed it back after testing.
The second Link did not have [ [~8] ] for the URL. It also tried to place its contents in #AjaxLogin. You forgot to change the ID. Finally, you have to have return false; at the end if you do not want to have it submit '/#' to the current page.
Here's the thing with this plugin. It makes AJAX super easy. You don't have to do the complicated tricks you have had to do in the past to make AJAX work. Simply point to the correct page... have the correct ID. and boom!
The AJAX Framework is now a Transport Package: Get it from
AJAX Revolution on
Github
Do not install the package if you are using this technique until the Cross Context Resources is available as a Package. The second component (Cross Context Resources) is being converted into a Package and will be complete today. Do not delete any Settings, Template or Plugins associated with this Tutorial until the Package is complete.
[ed. note: fuzzicallogic last edited this post 14 years ago.]
Thank you very much. It works like a maginc! With those examples of using your pluging I feel I can do a lot now.
Awesome. I'm glad it works for you! If you feel like the examples or tutorials are missing anything, let me know. I also want to add a couple more convenience Chunks for easier AJAX handling. If you can think of anything you do all the time, let me know and I'll add it.
Be careful, if you installed the Addon, your login may no longer be Cross-Context until the next Addon comes out tonight. (Unless you adjusted the OnSiteAlias Plugin code)
Great, thank you. I didn't install the full package yet and decided to wait for the Cross-Context to do everything at once.
I'm making my form futher now and just realized - I put FormIt snippet which I guess "listens" for form submitions. But if we put "return: false" in our ajax block the form does not submit so FormIt does not get anything.
Right! You got it.
FormIt processes the results in a non-AJAX way... so you have to submit.
But... You CAN place the FormIt in an AJAX Page, and submit it fully (with results) to only it. Then it will get the correct page.
In other words: Use "return false;" if the target is an AJAX Page. Use the Form Action's submit if the target is not an AJAX Page.
[ed. note: fuzzicallogic last edited this post 14 years ago.]
You mean to put the FormIt snippet call to the ajax chunk which gets called after the submit button is clicked?
-
☆ A M B ☆
- 24,524 Posts
FormIt is on is own resource, and works normally when requested. The trick is here that it's an AJAX request (the web server, MODx and Formit all have no idea where the request came from nor do they care), so instead of the user getting the whole page back to replace the one he's looking at, the AJAX gets it and loads it into the proper place in the user's existing page.