You are right.
To clear any ambiguity, I did this -->
return "$('#i2').val('Vineet');"
But still, no success.
Any other hint?
---Vineet
On Nov 2, 8:15 pm, Anthony <[email protected]> wrote:
> On Wednesday, November 2, 2011 10:49:04 AM UTC-4, Vineet wrote:
>
> > thanks for replying.
> > I tried this-->
> > [Controller]
> > def lod():
> > x = 'This is a val'
> > return "$('#i2').val(x);"
>
> Note, the returned value is simply a string from the perspective of the
> lod() function, so 'x' in that string is literally just the letter 'x' --
> it is not replaced with the value of your x variable. Also, you need to put
> the value in .val() in quotes. You want:
>
> return "$('#i2').val('%s');" % x
>
> That will put the actual value of x inside quotes inside .val().
>
> Anthony