Some small improvements with AJAX - Posted (1592 Views)
Retired Support Moderator
MarcelG
Posts: 2625
2625
Guys, I've got some ideas to improve the basic functionality, which, as far as I've understood from various articles on the net, should be very much doable by means of AJAX. However, my own coding skills are not sufficient to craft these mods. Therefore, I'd like to share the ideas I have, and perhaps someone takes up the challenge to create the nifty mods to improve Snitz. They all are db-change-less, so no intensive modification of the basecode.
Idea 1: Username-check on registration page When a user tries to register, a username has to be chosen. When the user selects a username that's already in use, the user gets the error upon submitting the page. Instead of that, using AJAX, it should be doable to check the username that was filled in on the fly, and provide the user with a visible indication that the chosen username was already used.
Idea 2: Password-check on registration page Same as above, but now for the duplicate version of the password. If the two fields are not the same, show a visible indication that they do not match (for example by making the background color of the input field red or something like that.)

Idea 3: Subject check on post.asp
If a user posts a new message and forgets to enter the subject, he's prompted with a page telling him that. When he then clicks 'back' the message is gone. To prevent this from happening, we could disable the 'post' button as long as the subject isn't filled in. We could also change the backgroundcolor of the subject-input field to red.
Idea 4: Auto-update active topics count without refresh In the header, we can see the number of active topics. This number can be updated on the fly using AJAX, on a predefinable interval. For example 1 minute.<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Development Team Member
Davio
Posts: 12217
12217
Good ideas there marcel. Has anyone used AJAX in their snitz forum yet?<
Posted
Forum Admin
HuwR
Posts: 20611
20611
item 2 and 3 just needs javascript not AJAX<
Posted
Support Moderator
Podge
Posts: 3776
3776
Item 1 - You wouldn't need to submit the page.
For the search page (and elsewhere) you could have something like this when choosing members
http://www.google.com/webhp?complete=1&hl=en

Idea 5: AJAX login/logout. Idea 6: Double click a forum description on the main page to edit it.<
Posted
Retired Support Moderator
MarcelG
Posts: 2625
2625
Davio, I think sr_erick has done some AJAX things on Snowmobilefanatics ; one thing I remember was a spellcheck function that used AJAX.
Huw, you're probably right on that one ; there's no need for a server-client communication there. I guess one of the biggest gaps in my knowledge about AJAX is the J smile
Podge ; good ideas!!!! Didn't know that your number 6 was even possible!<
Posted
Support Moderator
Podge
Posts: 3776
3776
Not my idea, vBulletin and CommunityServer 2.0 (released an hour ago) both have it. CS2 has a lot of AJAX.<
Posted
Development Team Member
Davio
Posts: 12217
12217
Yes, you can also double click inside a cell table of a topic, and be able to edit the title. Maybe on forum.asp or active.asp.
Also using it when searching for post by member name. Enter the first few letters of a members name into the text box on the search page, and the form will show you a list of possible matches. Much easier than scrolling through 1,000's of names in a drop down box.
Editing a post without going to a new page is one of the most useful features I have encountered. Click the edit button on a post, and instantly, the post turns into a text box with the message ready to be edited. No page loading, no reloading. Submit it, and the post gets updated on the spot.
AJAX has started to spoil me. lol<
Posted
Support Moderator
Podge
Posts: 3776
3776
Apart from the "coolness" factor are there any other benefits? Convenience, bandwidth savings maybe ?<
Posted
Retired Support Moderator
MarcelG
Posts: 2625
2625
Davio ; that's also an EXCELLENT idea!!! no more clicking to post.asp, just on the fly topic and subject editing!!! Marvelous!!!!
@ Sir Podge (which as I read is your appropriate title nowadays wink), I guess that coolness + convenience + intuitive interface + less pageloads is enough to embrace this nifty functionality.
As I've understood, since it is not a new technology, but a combination of already existing technologies, it's supported by all the browsers that are able to run javascript.<
Posted
Senior Member
Jezmeister
Posts: 1141
1141
I've been doing a little work with AJAX lately, item 1 and 2 shouldnt be very hard to sort out so if noones had a crack at it by wednesday (I'm out all tomorrow) I'll see if I can get something working... although if you've got the time its something worth knowing, so just get a google search open and sift through a tutorial until you understand it a little bit I reccomend trying it for yourself (this is intended for everyone) even if there is a finished version done, its not gonna be too long until AJAX is completely standard and you've got 9 year old school kids doing it day in day out so learning it now might turn out to be handy.<
Posted
Forum Admin
HuwR
Posts: 20611
20611
If you are going to use or try AJAX, just remember a few simple things. 1) if your server or network is slow then don't bother, AJAX will not work very well
2) Using AJAX will almost certainly make your website not adhere to accessibility guidelines (may be an offense in some countries)
3) unusual behaviour when using the back button.<
You Must enter a message