Calling javascript method from Zen method, with parameters
I'm running into difficulty calling a javascript method from a Zenmethod. I pass in a parameter, but in the javascript method the parameter is undefined. Here is the code:
...
...
{
//do save code here
&js<zenPage.doAddNew();> //this works just fine, but there's no parameter
}Else{
//do update code here
//call javascript method from ZenMethod
-----> &js<zenPage.doReturn('1');> //this calls doReturn, but the parameter '1' is undefined when it gets there
//do %page.doReturn("1") //NO
}
{
alert('silent = ' + silent) //shows as undefined
}
I did not choose to set the methods up like this; they exist already. I just need to call the doReturn method, which already exists as a javascript method, in order to return to another page.
If the ZenMethod doSave were a javascript method, would it work better?
Thanks,
Laura