jQuery: The Write Less, Do More JavaScript Library

problem with .ajax POST and quotes

View: New views
1 Messages — Rating Filter:   Alert me  

problem with .ajax POST and quotes

by phicarre :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

Problem with .ajax with type = POST

error: missing ) after argument list

$output .= "<div style='width:150px;'  ><a href=\"javascript:choice1
($id,";
$output .= "'" . $name . "'";
$output .= ")\">";

same error with

$output .= "<div style='width:150px;'  ><a href=\"javascript:choice1
($id,";
$output .= "\"" . $name . "\"";
$output .= ")\">";

no error but display choice1(99, instead of choice1(99,"10")

$output .= "<div style='width:150px;'  ><a href='javascript:choice1
($id,";
$output .= "'" . $name . "'";
$output .= ")'>";

The calling function declares dataType as script

What is the correct formulation ?