Jump to content

Javascript + AJAX + MySQL


Guest Popa Wheelz

Recommended Posts

Guest Popa Wheelz

I'm trying to setup a page the pulls 1 row of data out of a database at a time.I want it to have a 'back' and 'next' links as TEXT. When these links are selected I want it to utilize the XMLHTTPRequest function so the page doesn't need to reload.The example of all the code I'm using is on this page: http://www.w3schools.com/PHP/php_ajax_database.aspThe example uses a pull down to change the value to the corresponding rows 'id'.Instead of a pull down menu I want it to be a link in a <a> tag which does NOT support the "value" syntax as that is only for forms.So how do I take this line: onchange="showUser(this.value)"and make it: onClick=showUser(ADD 1 TO THE CURRENT ROW BEING SHOWED)How this is enough info.Thanks!

Link to comment
Share on other sites

An <a> element does support a .name property. It is designed for another purpose (and purists would be unhappy that I am even suggesting this) but you might try using that as an exact replacement for the .value property. (Be sure to test it in all browsers. It should work, but you'll want to be sure.)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...