Home User CP Browse Members Calendar Register Today!  
Get New posts Faq / Help?
   

Not A Member Yet? Register today and become part of the community.

Go Back   Profuse Host Forum > World Wide Web > Programming / Scripting / Coding Forum > Javascript

Javascript Need help with the (primarily) client-side programming language? This is the place. Includes discussion on AJAX (Asynchronous JavaScript and XML).

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-23-2007, 10:22 AM
RobbDogg
Status: Offline
Junior Member
 
Join Date: May 2007
Posts: 1
RobbDogg is on a distinguished road
Default Help with JavaScript?

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?
Reply With Quote

  #2 (permalink)  
Old 05-23-2007, 11:36 AM
Rex M
Status: Offline
Junior Member
 
Join Date: May 2007
Posts: 1
Rex M is on a distinguished road
Default

Escape the quotes.... Use \' instead of ' inside of a string.
Reply With Quote

Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -7. The time now is 07:39 PM.

Skin Design By vBSkinworks



Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Sponsored by Web Hosting


Profuse Solutions LLC

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80