jQuery in Action, 2nd edition*
The moose likes HTML, CSS and JavaScript and the fly likes Using a Variable with AJAX Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Using a Variable with AJAX" Watch "Using a Variable with AJAX" New topic
Author

Using a Variable with AJAX

Jc Williams
Greenhorn

Joined: May 12, 2009
Posts: 1
Hello,

Below I have posted code that I have on two different PHP files, tsearch12.php and votes12.php. The code works great. The file "tsearch12.php" uses AJAX to go to votes12.php to perform some functions. However, the first page has a variable called "find." These two pages only work together when the variable "find" equals "santafe." I would like them to work together regardless of what "find" equals. In other words, I would like to replace the table name "santafe" in votes12.php with the variable "find," but I want the variable "find" to equal the same value in both tsearch12.php and votes12.php. The variable "find" is going to tsearch12.php from another file, which has a simple HTML form with "<form action="tsearch12.php" method="post">" and "<input type="text" name="find" size="55"/>". Anyway, how do I use the variable "find" in votes12.php?

Thanks in advance,

John

On tsearsh12.php, I have:




On votes12.php, I have:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using a Variable with AJAX