I think what you're grabbing with the getElementById is the row that the
field is in. I think you should drop the '__row' from the element id.
Can you try this:
document.getElementById(certificate_request_commonname).createAttribute("value","abc")
...and see if it helps?
-Jim
On Thursday, August 27, 2015 at 7:13:34 AM UTC-5, Iancic Bogdan wrote:
>
> The user enters input to fill the form, but I want to manually complete
> one field. I've tried using
> document.getElementById(certificate_request_commonname__row).createAttribute("value","abc");
>
> but it doesn't work. In the form i'm adding data to a table.
> certificate_request is the name of the table and commonname is the column
> name. After I've looked on the web2py book I saw that I have to write:
> tablename_columnname__row. I've done that but it doesn't work. it always
> says to me: Empty string passed to getElementById(). Can anyone help?
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.