ITCOOKBOOK.com

 Options

Current Time:
Thu Sep 09, 2010 10:23 am
View unanswered posts

Log in

Username:
Password:
Log me on automatically each visit

Topic Information

Including variables in ‘sendRequest’(act)

 
Post new topic   Reply to topic    ITCOOKBOOK.com Forum Index -> AJAX Programming
View previous topic :: View next topic  
Author Message
ted
Fresher


Joined: 30 Nov 2006
Posts: 14

PostPosted: Thu Nov 30, 2006 11:51 pm    Post subject: Including variables in ‘sendRequest’(act) Reply with quote

I am trying to make one JavaScript function load one php file with a variable attached (show or hide).

In my JavaScript I have the following code:

CODE

function grilles(act) {

// Open PHP script for requests
http.open('get', 'grilles.php?act='+act);
http.onreadystatechange = handleResponse;
http.send(null);

}


The links I have to load the php file looks like this:

CODE

echo '<a>+ Grilles (' . $numRows . ')</a>';
echo '<a>- Grilles (' . $numRows . ')</a>';

I was thinking that the "show" and "hide" in the links would work as the "act" variable, but it didn't.

How can I do that?

Thanks!!
_________________
Ted Schmidt
"Carpe Diem!"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ITCOOKBOOK.com Forum Index -> AJAX Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Help US Help YOU

 

 

Please complete our short survey and save $17.50 on ITCOOKBOOK.COM.

 

 

Take a look at SAPTrends.com, a new blog dedicated to discussion of SAP Training trends in SAP ERP.

 

 

C# Interview Questions

 

.NET Interview Questions

 

Java Interview Questions

 

Python Interview Questions

 

ColdFusion Interview Questions

 

Linux Interview Questions

 

Linux LPIC 1 Certification Questions

 

Perl Programming Interview Questions