Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Best way into the world of Ajax?
blizeH
✭✭
A friend and I are considering learning Ajax, it's quite clearly going to become an invaluable tool in the future (and already is for some systems) so we may as well get into it asap and get a little bit of a headstart.
The problem is we're currently nearing the end of development for the site we're working on, all that's left is to create a news ticker and just refine some content, anyway here's my question...
I've been looking into doing a news system using a combination of ASP and Ajax but it doesn't seem to be that simple a process, would we be better off maybe just doing a news ticker (either with a scrolling or fading effect) that displays latest news from a database that has info entered into it via ASP?
Thanks
The problem is we're currently nearing the end of development for the site we're working on, all that's left is to create a news ticker and just refine some content, anyway here's my question...
I've been looking into doing a news system using a combination of ASP and Ajax but it doesn't seem to be that simple a process, would we be better off maybe just doing a news ticker (either with a scrolling or fading effect) that displays latest news from a database that has info entered into it via ASP?
Thanks
0
This discussion has been closed.
Comments
(myfile.html)
<html><head> <script type="text/javascript" src="prototype.js"></script> // don't forget this <script type="text/javascript"> var url = "myfile.php"; //the php file that will send stuff to ajax var pars = "x=1&y=2" // some parameters to pass to your php file function ReplaceMyDiv() { var MyAjaxObject = new Ajax.Updater('MyDiv', url, {method:'get', parameters: pars}); } </script> </head> <body> <div id="MyDiv">this text will be replaced.</div> <a href="javascript:void(0)" onclick="ReplaceMyDiv()">click this</a> </body></html>
(myfile.php)
<?php print "this text should appear in your div when you click the link. by the way, x was {$_GET['x']} and y was {$_GET['y']}."; exit; ?>
that's it. there's a pretty good guide to prototype at http://www.sergiopereira.com/articles/prototype.js.html. it's got other ajax stuff like auto-refreshing updaters, etc. it's fun to dig into it.