Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
AJAX to display database results
Old 07-23-2009, 01:31 PM AJAX to display database results
Experienced Talker

Posts: 48
Name: Craig
Trades: 0
I am doing a project for work where I have set up a database of employees and their info in a MySQL database. I have a search form to search for names, and it outputs the results to a separate page. I would like to have the search results show up in a div below the form without a page refresh, eliminating the need to use the back button to get back to the form. I've looked everywhere, and the closest thing I've found is a script that loads a static page into a div when a link is clicked, but relies on the "href" tag.

So, does anyone have a tutorial or quick (but detailed) explanation on how to do this? I'm running up against my deadline! Thanks in advance!
werm82 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-23-2009, 02:12 PM Re: AJAX to display database results
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
why not just put the form on the same page as the results appear on, if the users need to search again?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-23-2009, 08:47 PM Re: AJAX to display database results
Experienced Talker

Posts: 48
Name: Craig
Trades: 0
Well, be prepared to call me an idiot (scripting in not my strong point). I tried to submit the for to itself, using
HTML Code:
<form method="post" action="index.php">
and
HTML Code:
<form method="get" action="index.php">
but obviously, didn't work.

I'd like to have the AJAX results div just to have it in my repertoire.
werm82 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to AJAX to display database results
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11389 seconds with 12 queries