Solved

passing data from PHP to jQuery function...

Posted on 2014-12-12
2
307 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

728 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