#1 (permalink)  
Old 05-07-2008, 10:26 AM
Active Member
 
Join Date: Nov 2004
Posts: 1,828
inspireme is on a distinguished road
Default Free Mod

Hi, this is a rough guide to adding AJAX field validation.

firstly, a new file, uploaded to the main indexU folder, copy this, and save it as "post_url.php"
Code:
Content visible to License Owner only.
Load up add form.

at the top add this :
Code:
Content visible to License Owner only.
almost done, just change this on the add_form.html :

Code:
Content visible to License Owner only.
Try it out!! to make it really cool, instead of the message load a little green tick or red cross image, use this template to validate phone numbers, usernames - allsorts of thigns on the form before its even submitted

Im using it ont he admin panel when i add sites - i can see straight away if its a duplicate.
__________________
Some interesting INDEXU bits :http://www.indexu.co.uk
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

Last edited by inspireme; 05-08-2008 at 06:11 AM.
Reply With Quote
  #2 (permalink)  
Old 05-07-2008, 01:34 PM
echo@'s Avatar
Active Member
 
Join Date: Oct 2007
Location: UK Essex
Posts: 473
echo@ is on a distinguished road
Default

could you post a print screen? plese
Reply With Quote
  #3 (permalink)  
Old 05-07-2008, 05:21 PM
Active Member
 
Join Date: Nov 2004
Posts: 1,828
inspireme is on a distinguished road
Default

Code:
Content visible to License Owner only.
why? really isn't anything to see... ? its jsut a usability improvement - warns people if the site wont be accepted before they fill in the rest. Im using it to check sites im adding myself arent already listed...
__________________
Some interesting INDEXU bits :http://www.indexu.co.uk
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
Reply With Quote
  #4 (permalink)  
Old 05-08-2008, 06:15 AM
Active Member
 
Join Date: Nov 2004
Posts: 1,828
inspireme is on a distinguished road
Default

Hmm, well it seems im very bad at explaining myself, people are confused. SO...

try this :

http://www.theleisureguide.co.uk/add.php

go to the "url" bit

type in a url and defocus theurl box (click somewhere else) it should say its okay to add the site.

Now type in :
http://www.activityuk.com/

It should say its a duplicate....

Hope it makes more sense now.
__________________
Some interesting INDEXU bits :http://www.indexu.co.uk
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
Reply With Quote
  #5 (permalink)  
Old 05-08-2008, 06:34 AM
Active Member
 
Join Date: Nov 2004
Posts: 1,828
inspireme is on a distinguished road
Default

you can also try the postcode, type anything random in and it will say "thats fine" and then type this : BN9 9DS

And it will tell you its already added.
__________________
Some interesting INDEXU bits :http://www.indexu.co.uk
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
Reply With Quote
  #6 (permalink)  
Old 05-08-2008, 12:48 PM
Registered User
 
Join Date: Feb 2008
Posts: 22
secero is on a distinguished road
Default

But if you sail in without "/" , then he does not see as twice.

Thus, with a sign less or more, then have no impact.

I have added exactly these, therefore without "/" on end.
He accepts directly http://www.activityuk.com
Reply With Quote
  #7 (permalink)  
Old 05-08-2008, 01:34 PM
Registered User
 
Join Date: Feb 2008
Posts: 22
secero is on a distinguished road
Default

I have activated these on my site.

He gives report: Your site is already in our database.

But to add continues simply. It is therefore nothing else then a report or this way?
Reply With Quote
  #8 (permalink)  
Old 05-09-2008, 02:56 PM
Active Member
 
Join Date: Nov 2004
Posts: 1,828
inspireme is on a distinguished road
Default

Yes... its to tell people not to add sites again... but as i said int he first post this is a method to do things, you can write whatever php code you want to validate the field. In the example i gave before you could change the sql query to say LIKE $url% and then it would warn about any page within the domain... Im nto saying this is a workign example. just useful code to help peopel with feedback and messages as they fill in the form.
__________________
Some interesting INDEXU bits :http://www.indexu.co.uk
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
free templates stephborel Templates 3 11-30-2007 01:21 PM
Free Version banless Indexu Lite 2 05-19-2007 08:20 PM
Free homepages Hart_House v5.x 2 04-04-2002 08:28 PM

HACKER SAFE certified sites prevent over 99.9% of hacker crime.

All times are GMT -5. The time now is 05:49 PM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
SSL Certificate