Main Topics
Browse All TopicsIn my site, people conduct a home search. Within the search results, I'm working on a way for them to have a "save this listing" button. All I want to do, is to send the MLS number into a database, but let them continue their searching without interruption. I don't really care how it gets done. I just need to use PHP/mysql/Ajax whatever.
I've tried a couple of things but have had no luck. ANY HELP is greatly appreciated! Even a link to somewhere that gives me an idea on how to do it would be great!
Thanks!!!!!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
well, here's the issue...and I don't know how well it can work. What I want to post, is not in a form. The variable is MLS_ACCT. The way I would like it to run is this:
--------------------------
25 Results for Athens City Search
--------
Listing info......blah.....blah...
--------
Listing info......blah.....blah...
--------
Listing info......blah.....blah...
----------
Of course, this is no problem at all if I want to process on a different page, but the key is I don't want the user to have to go to another page, then come back and find where they left off. Can this be done with a URL?
i'm sorry. I know next to nothing about AJAX and javascript. The insertdb function(income) - Is income supposed to be the database name or the variable...or??????? I think once I get all of the variables switched an changed to the right names, I'll be ok...I'm just not 100% sure which ones need to be changed in the javascript. - Here's my code:
you can use the exec function simple as
<script type='text/javascript/'>
function addfav(idx){
rval=exec("addfavorite.php
// and if you want to return the rval to somewhere example return all favorites to some div
document.getElementById('r
}
</script>
<div id='rdata'>
</div>
<a hef="javascript:addfav('25
I've decided to add one more field to pass through to addfavorites.php - CURRENT_PRICE. This is what I'm using now:
<a href="addfavorite.php?MLS_
The problem is having to go back to the last page. I tried exec function....but it didn't work??
I have used it in very very very many cases.
<script type="text/javascript">
function exec(xurl){
if (window.XMLHttpRequest)
{
var oXML=new XMLHttpRequest();
oXML.open("GET",xurl,false
oXML.send(null);
}
else if (window.ActiveXObject)
{
var oXML=new ActiveXObject("Microsoft.X
oXML.open("GET",xurl,false
oXML.send();
}
return oXML.responseText;
}
function addfav(idx,pricex){
rval=exec("addfavorite.php
document.getElementById('r
}
</script>
<div id='rdata'>
</div>
<a hef="javascript:addfav('25
masa77,
Your solution works very well for me. I'm having trouble with the div though. If it's placed within my while loop, it only shows on the first result, and not the rest, but I would like to show it in each result, or popup in the middle of the page that disappears within 2 seconds or so. Can you help with that?
well if i get right, you will need to give an index to the rdata
in your while loop put example to the div following
where 1 example in rdata is the index
<div id='rdata1'>
</div>
then modify addfav function
function addfav(idx,pricex,idb){
rval=exec("addfavorite.php
document.getElementById('r
}
<div id='rdata1'>
</div>
<a hef="javascript:addfav('25
Business Accounts
Answer for Membership
by: masa77Posted on 2008-04-20 at 23:46:49ID: 21399189
I have used this script to send data to server
); MLHTTP"); );
<script type="text/javascript">
function exec(xurl){
if (window.XMLHttpRequest)
{
var oXML=new XMLHttpRequest();
oXML.open("GET",xurl,false
oXML.send(null);
}
else if (window.ActiveXObject)
{
var oXML=new ActiveXObject("Microsoft.X
oXML.open("GET",xurl,false
oXML.send();
}
return oXML.responseText;
}
</script>