Thanks juandurke.
One last point is remaining in this regard.
Now I can render the edit form in jquery-ui modal dialog.
#Note: In the same View file, the <DIV id=deptEdt> is there, which is
rendered in dialog form.
I am passing department['deptid'] & department['deptnm'] to the
javascript function "editURL".
"editURL passes these variables to a serverside function 'frmDeptEdt'.
In controller "mast.py"
def frmDeptEdt():
deptid = request.args[0]
deptnm = request.args[1]
return dict(deptid=deptid, deptnm=deptnm)
+++++++++++++++++
But I can't use deptid and deptnm in form at design-time.
These variables are declared after the frmDeptEdt() function is
called.
I also can't use request.args[n] at design time.
Only after clicking the url, these are available.
It raises error "name 'deptnm' not defined"
++++++++++++++++
<div id="deptEdt" name="deptEdt" style=display:none>
<form enctype="multipart/form-data" method="post" id="frmDeptEdt"
name="frmDeptEdt" action="{{=URL(('dept_save'))}}">
Department <input type='text' id='deptname' name='deptname'
value="deptnm" />
<input type='submit' value='save' onsubmit="" />
</form>
</div>
Any idea to tacke this?
Thanks,
Vineet
On Oct 4, 9:03 pm, juanduke <[email protected]> wrote:
> Hi Vineet:
>
> web2py_component is a javascript function, includede in web2py.
> So, there's no necesary to put {{ .... }} to call him.
> You can see examples of web2py_component on the book (search for LOAD
> function)
>
> HTH, regards.