Hi there, 

I'ld like my DbForms application to jump to the first row of a table after
the user did a sort. 
E.g. there are 2 sort tags, one is set to Ascending and the user sets the
other to Descending. This triggers the javascript:document.dbform.submit()
in the onChange attribute rendered by db:sort. 
I have altered the db:sort onClick event to write to a hidden input field on
the JSP page and get the value from the request. The HTML INPUT field must
be within the db:dbform tag (actually I placed it in the db:header). The
value can then be accessed from the request variable in the following page. 
However, I have no clue how to trigger that "jump to first row" part from
within some extra JSP code. I'ld be grateful for any hints whatsoever. :)

DBSORTTAG.JAVA:
===============
110c110
<             tagBuf.append("\" size=\"0\"
onChange=\"javascript:document.dbform.submit()\" >");
---
>             tagBuf.append("\" size=\"0\"
onChange=\"javascript:document.dbform.jumpToFirst.value = true;
document.dbform.submit()\" >");

HTML INPUT TAG:
===============
<input type="hidden" name="jumpToFirst" value="false">

Regards, 

Sebastian Scheible

P.S.: Some tecspecs of my setup: dbforms 1.1.3, Tomcat 4.0.4


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to