| |||||||||
| |||||||||
| Not A Member Yet? Register today and become part of the community. |
| |||||||
| Javascript Need help with the (primarily) client-side programming language? This is the place. Includes discussion on AJAX (Asynchronous JavaScript and XML). |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| I'm trying to pass a php variable to a javascript function like this:<a href="ajaxtestbackend.php?id='.$id.'" onclick="qna('.$id.'); return false">My JavaScript function is set up like thisfunction qna(id) { if (Element.empty('qna-content')) { new Ajax.Updater('qna-content', 'ajaxtestbackend.php?id='How do you print the id variable so that new Ajax.Updater('qna-content', 'ajaxtestbackend.php?id=' looks like this:new Ajax.Updater('qna-content', 'ajaxtestbackend.php?id=1'or what ever the current id is. I guess I'm asking is how do you place a variable inside a string of text that is already inclosed by quotes? |
![]() |
| Thread Tools | |
| Display Modes | |
| | |||||
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I need a javascript or asp script that gets all | jose1008 | Javascript | 3 | 09-11-2007 06:38 AM |
| How to use javascript in asp.net 2.0 | priya | Javascript | 0 | 05-24-2007 05:06 PM |
| do i need to download javascript? | batista c c | Javascript | 0 | 05-24-2007 05:06 PM |
| What is javascript? | Lovely Coconuts ♥ | Javascript | 2 | 05-23-2007 02:49 AM |
| Problem Using JavaScript | bslfanclub | Free Web Hosting Support | 2 | 08-27-2006 01:47 AM |