As you suggested I tried this:

$output .= "<div style='width:150px;'  ><a href=\"javascript:choix1
($id,'$nom')\">";
...
echo $('my_grid').html($output);

I have now this:

XML tag name mismatch (expected a)
<a href="javascript:choice1(99,'aaa')">aa...snormTR' ><td
class='dgRownorm' align='l

On 9 nov, 16:07, "[email protected]" <[email protected]>
wrote:
> You don't need qoutes around $OUTPUT if you are parsing a string. Just
> $('MY_GRID').HTML($OUTPUT) would be enough.
>
> On Nov 9, 3:19 pm,phicarre<[email protected]> wrote:
>
> > I must precise:
> > - I test with firefox
> > - I send to the client by the echo function
> > - I FORGOT THE MOST IMPORTANT: THE FULL STRING RETURNED IS
> > $('MY_GRID').HTML("$OUTPUT");
>
> > On 9 nov, 13:49,phicarre<[email protected]> wrote:
>
> > > Same error with your proposition.
>
> > > On 8 nov, 20:23, "[email protected]" <[email protected]>
> > > wrote:
>
> > > > Hiphicarre,
>
> > > > At first sight, there seems nothing wrong with the script in your
> > > > first example. I ran it at my pc and get no error. Your second example
> > > > will not work, since you open the href-string with double-qoutes, and
> > > > use them again around $name. You can only use single-qoute within the
> > > > string (or double-quotes if you use single-quotes around the string).
>
> > > > Try writing your $output script on one line:
> > > > $output .= "<div style='width:150px;'><a href=\"javascript:choice1
> > > > ($id,'$name')\">";
>
> > > > and see what happens.
>
> > > > Is there a place where we can see your script?
>
> > > > Edwin
>
> > > > On Nov 8, 7:05 pm,phicarre<[email protected]> wrote:
>
> > > > > From client side (javascript + jquery) the calling function is:
>
> > > > > function displayMember(code,idr)
> > > > >     {
> > > > >         var getVars = "code=" + code + "&id=" + idr;
> > > > >         $.ajax(
> > > > >         {
> > > > >             type: "POST",
> > > > >             url:'displayMember.php',
> > > > >             dataType: 'script',
> > > > >             data: getVars,
> > > > >             success: function(resultat) {},
> > > > >             error: function(requete,iderror) {alert(iderror);}
> > > > >         })
> > > > >     }
>
> > > > > Server side, php language, the displayMember.php builds a string
> > > > > ($output) with data from a database.
> > > > > $output is HTML code. Its a set of data inserted in a grid.
> > > > > When a user clicks on a field, the javascript function choice1 is
> > > > > executed.
>
> > > > > On 8 nov, 02:54, intrader <[email protected]> wrote:
>
> > > > > > Sorry, premature send.
> > > > > > 1. It is not clear to me what choice1 is
> > > > > > 2. It is not clear to me what $output is and where it is being 
> > > > > > issued
> > > > > > (server or client)
> > > > > > 3. Please provide your script for your choice1 function
> > > > > > 4. Please provide yourAJAXcode including the callback funtion.
> > > > > > 5. Please provide the server code and what language it is in.
> > > > > > Thanks
>
> > > > > > On Nov 7, 8:56 am, intrader <[email protected]> wrote:
>
> > > > > > > It is not clear how you are calling the server, or whatajax
> > > > > > > formulation you are using. Perhaps lack of encoding is theproblem.
>
> > > > > > > On Nov 7, 3:19 am,phicarre<[email protected]> wrote:
>
> > > > > > > > Hi all,
>
> > > > > > > >Problemwith .ajaxwith 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 ?

--

You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=.


Reply via email to