Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

passing data from PHP to jQuery function...

Posted on 2014-12-12
2
Medium Priority
?
333 Views
Last Modified: 2014-12-12
Hello, I have a PHP application that I pass data to a jQuery function. My query runs correctly when I pass a single string, example "completed", but if I pass a value like "Not Done", my script does not run. The snippet of my scripts are as follows:

Jquery:

$("#dialog").load("index.php?action=" + $(this).data("id"), function() {

PHP:
<td><input  name="radio" type="radio" data-id="<?=$st;?>"</td>

What change do I make  so my script processes a value like "Not Done"? Thank you.

A
0
Comment
Question by:aej1973
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 40496717
Since you haven't said what is what I'm guessing here

$("#dialog").load("index.php?action=" + encodeURIComponent($(this).data("id")), function() { 

Open in new window

0
 

Author Comment

by:aej1973
ID: 40496727
Perfect! Thank you.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question