Ajax Talk - Asynchronous javascript and xml discussion board
 FAQ   Search    Usergroups      Register   Profile   Check your messages   Log in 
Signup now to enjoy a range of free membership advantages !!
Ajax Talk - Moderators Wanted
mootools autocomplete with asp

Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Help
View previous topic :: View next topic  
Author Message
New one
New one

Joined: 12 Jun 2008
Posts: 1

PostPosted: Thu Jun 12, 2008 11:15 am    Post subject: mootools autocomplete with asp Reply with quote

hi there, i'm trying to incorporate the Mootools Autocomplete with an asp driven script which will get records from my DB

i already have the .asp script written - i'm just struggling on incorporating the two!!! please help...

heres the mootools basic script :

<html><head><base href="http://www.ajaxdaddy.com/ajax/mootools/autocomplete/">      <style type="text/css">        body {color: white;background: #52616F;}         a {  color: white; }      </style>   <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>digitarald.de » Playground - Widget Birthplace</title>     <link rel="stylesheet" href="css/Autocompleter.css" type="text/css" media="screen">   <script type="text/javascript" src="javascript/mootools.v1.11.js"></script>   <script type="text/javascript" src="javascript/Observer.js"></script>   <script type="text/javascript" src="javascript/Autocompleter.js"></script></head>  <body>   <div id="container">      <h1>moo.Playground</h1>      <p>Json and Xhtml Version - Backend is a flatfile database with 6Mb spanish dictonary. So its maybe too slow sometimes ;)</p>      <form action="#" method="post">      <fieldset>            <legend>Local - enter a country name</legend>            <input autocomplete="off" name="search" type="text"><br>      </fieldset>         <fieldset>            <legend>Ajax.Json - enter any string - random result returned from server</legend>            <input autocomplete="off" name="search" type="text">            <div style="display: none;" class="autocompleter-loading"></div><br>            <select name="select-1">               <option>Spanish Dictionary</option>               <option disabled="disabled">Debugging SelectBox</option>               <option disabled="disabled">To Check IE bug.</option>            </select>         </fieldset>               </form>   </div>     <script type="text/javascript">      window.addEvent('domready', function(){         var el = $ES('input');         var tokens = [['Afghanistan', 'Af'], ['Åland Islands', 'Ax'], ['Albania', 'Al'], ['Algeria', 'Dz'], ['American Samoa', 'As'], ['Andorra', 'Ad'], ['Angola', 'Ao'], ['Anguilla', 'Ai'], ['Antarctica', 'Aq'], ['Antigua And Barbuda', 'Ag'], ['Argentina', 'Ar'], ['Armenia', 'Am'], ['Aruba', 'Aw'], ['Australia', 'Au'], ['Austria', 'At'], ['Azerbaijan', 'Az']]         var completer1 = new Autocompleter.Local(el[0], tokens, {            'delay': 100,            'filterTokens': function() {               var regex = new RegExp('^' + this.queryValue.escapeRegExp(), 'i');               return this.tokens.filter(function(token){                  return (regex.test(token[0]) || regex.test(token[1]));               });            },            'injectChoice': function(choice) {               var el = new Element('li')                  .setHTML(this.markQueryValue(choice[0]))                  .adopt(new Element('span', {'class': 'example-info'}).setHTML(this.markQueryValue(choice[1])));               el.inputValue = choice[0];               this.addChoiceEvents(el).injectInside(this.choices);            }         });         var indicator2 = new Element('div', {'class': 'autocompleter-loading', 'styles': {'display': 'none'}}).setHTML('').injectAfter(el[1]);         var completer2 = new Autocompleter.Ajax.Json(el[1], 'server/auto.php', {            'onRequest': function(el) {               indicator2.setStyle('display', '');            },            'onComplete': function(el) {               indicator2.setStyle('display', 'none');            }         });      });   </script></body></html>
Back to top
View user's profile Send private message
Light Frequent Poster
Light Frequent Poster

Joined: 02 Jul 2008
Posts: 7

PostPosted: Wed Jul 02, 2008 5:19 pm    Post subject: Reply with quote

I don't know if it's usefull or not, but I found recently a video tutorial about mootools at http://codervods.com/Default.aspx?mode=default&category=AJAX&days=All&currentIndex=0
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Help All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 XML & Copyright Notice 

Powered by phpBB © 2001, 2005 phpBB Group

What is according to Wikipedia: Ajax Web2.0 XML E4X

Link to our site:


del.icio.us digg spurl wists simpy newsvine blinklist furl blogmarks yahoo! myweb smarking ma.gnolia segnalo reddit fark technorati cosmos

Normal Bookmark

Partner Button Links:
Codecrunch.com: Webmaster Tutorials    One Ajax

Partner Text Links:
quomon | web20log | ajaxmatters | tableless | 456bereastreet | music charts | gift ideas | competitions | free xbox 360 | link trade ?

it consultancy & project management lead generation zoekmachine optimalisatie steal these buttons seo expert