Topic: passing 2 variables to prototype call

I would like to pass 2 variables to a prototype call (actually 3 with my rails variable) but I think I have a javascript sytanx problem:

# with both   
     #blurStr = "new Ajax.Updater('dd_urltobuy','/tasks/manu_changed?id=" + @task.id.to_s + "&" + "mvalue='+$F('task_tmodel')" + "&" + "cvalue='+this.value" + ", {asynchronous:true, evalScripts:true});"
   
# just cvalue
      # blurStr = "new Ajax.Updater('dd_urltobuy','/tasks/manu_changed?id=" + @task.id.to_s + "&" + "cvalue='+this.value" + ", {asynchronous:true, evalScripts:true});"
   
# just mvalue
       blurStr = "new Ajax.Updater('dd_urltobuy','/tasks/manu_changed?id=" + @task.id.to_s + "&" + "mvalue='+$F('task_tmodel')" + ", {asynchronous:true, evalScripts:true});"

with these 3 examples, each work by themselves (cvalue & mvalue) but when I do both I get:
invalid assignment left-hand side   

Here is what the streamed js looks like for each:
#both (broken)
onblur=
\\\"new Ajax.Updater(\'dd_urltobuy\',\'/tasks/manu_changed?id=1&mvalue=\'+$F(\'task_tmodel\')&amp
;cvalue=\'+this.value, {asynchronous:true, evalScripts:true});

#cvalue only
onblur=
\\\"new Ajax.Updater(\'dd_urltobuy\',\'/tasks/manu_changed?id=1&cvalue=\'+this.value, {asynchronous:true, evalScripts:true});

#mvalue only
onblur=
\\\"new Ajax.Updater(\'dd_urltobuy\',\'/tasks/manu_changed?id=1&mvalue=\'+$F(\'task_tmodel\'), {asynchronous:true, evalScripts:true});


Any ideas, been struggling for 5 hours on this sad

also can someone explain to me what the extra single quote is needed for whe I do cvalue='+this.value  nothing works if I dont add this, but its probably also the cause of my problem.

thanks
Joel

Re: passing 2 variables to prototype call

"new Ajax.Updater('dd_urltobuy','/tasks/manu_changed?id=" + @task.id.to_s + "&" + "mvalue='+$F('task_tmodel')" + "&" + "cvalue='+this.value" + ", {asynchronous:true, evalScripts:true});"

should be:
"new Ajax.Updater('dd_urltobuy','/tasks/manu_changed?id=" + @task.id.to_s + "&" + "mvalue='+$F('task_tmodel') + "&" + "cvalue='+this.value" + ", {asynchronous:true, evalScripts:true});"

There was an extra double-quote after $F('task_tmodel')