Solved

passing data from PHP to jQuery function...

Posted on 2014-12-12
2
303 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

726 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