I'm attempting to use http://www.plus2net.com/html_tutorial/set-focus.php
to set the focus to a search box for the user.

However, I'm having problems because I can't pass the formname from
the controller to the view.   I can set it on the controller side but
it does not show up on the view side.

In this thread:
http://groups.google.com/group/web2py/browse_thread/thread/9a8195752b18b0f/2d394e020dc059af?hl=en&lnk=gst&q=formname#2d394e020dc059af

it seemed like there was a similar problem.


controller fragment
    return dict(form=FORM('business: ',INPUT(formname='widget',
name='testit', _name='f1',_id='keyword',
             _onkeyup="ajax('bg_find',['keyword'],'target');")),
             target_div=DIV(_id='target'))

view source on the page:
<form action="" enctype="multipart/form-data" method="post">business:
<input id="keyword" name="f1" onkeyup="ajax('bg_find',
['keyword'],'target');" /></form>

I notice that "formname" and "name" don't get passed.

For the javascript to work, it needs to have something like this:

<form name=f1 action='' method=post><input type=text name=userid></
form>

Is there a way to do this that I'm missing?   Or does somebody have a
better way to set focus?

Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to