Not quite a Lasso question.
I have a very long entry form with a couple of edit buttons on it. If one of the edit buttons is clicked before the page is fully loaded information on the fields below the edit button are not entered. Is there a way to make the edit buttons active only when the page is fully loaded? Thanks Charles Gorenstein -- ------------------------------ Lasso Support: http://support.omnipilot.com/ Search the list archives: http://www.listsearch.com/lassotalk.lasso Manage your list subscription: http://www.listsearch.com/lassotalk.lasso?manage |
On 6/2/05 at 2:10 PM by [hidden email]:
>Not quite a Lasso question. >I have a very long entry form with a couple of edit buttons on it. >If one of the edit buttons is clicked before the page is fully loaded >information on the fields below the edit button are not entered. >Is there a way to make the edit buttons active only when the page is >fully loaded? You can use JavaScript to accomplish this. Set a variable at the top of the page to false. Set the variable to true at the bottom of the page. In the middle, you need an onclick handler on your submit buttons that checks the variable value (if the onclick returns false then the mouse click is ignored). The buttons should be disabled until the page has finished loading. <script language="JavaScript">var doneLoading = false</script> <form response="[response_filepath]" method="post"> <input type="submit" name="submit" value="submit" onclick="return doneLoading" /> </form> <script language="JavaScript">var doneLoading = true</script> Hope this helps, [fletcher] -- Fletcher Sandbeck [hidden email] Lasso Product Specialist [hidden email] OmniPilot Software, Inc. http://www.omnipilot.com -- ------------------------------ Lasso Support: http://support.omnipilot.com/ Search the list archives: http://www.listsearch.com/lassotalk.lasso Manage your list subscription: http://www.listsearch.com/lassotalk.lasso?manage |
In reply to this post by remerge
On Jun 2, 2005, at 2:10 PM, [hidden email] wrote:
> I have a very long entry form with a couple of edit buttons on it. > If one of the edit buttons is clicked before the page is fully loaded > information on the fields below the edit button are not entered. > Is there a way to make the edit buttons active only when the page is > fully loaded? I can think of two methods: have the buttons disabled until a Javascript activated onLoad enables them, or test for the presence of the last form parameter on the page and if it's not present return a status code of 204. I personally like the latter since it's server based instead of client based, but both could be used together if you like. On the response page use code like: If: !(((Client_PostParams) -> (Find: 'lastelementname')) -> Size); $__http_header__ = 'HTTP/1.0 204 No Content\r\n'; $__http_header__ += 'Server: Lasso/7.0\r\n'; $__http_header__ += 'MIME-Version: 1.0\r\n'; $__http_header__ += 'Content-type: text/html; charset=UTF-8\r \n'; $__http_header__ += '\r\n'; $__html_reply__ = ''; Abort; /If; -- Douglas Burchard, President DouglasBurchard.com, Web Applications 15024 NE 66th Street Redmond, WA 98052, USA direct: (206) 227-8161 [hidden email] http://www.douglasburchard.com/ -- ------------------------------ Lasso Support: http://support.omnipilot.com/ Search the list archives: http://www.listsearch.com/lassotalk.lasso Manage your list subscription: http://www.listsearch.com/lassotalk.lasso?manage |
In reply to this post by remerge
Thanks Fletcher and Douglas.
I opted for the javascript solution since we are on an intranet. Kind regards, Charles Gorenstein -- ------------------------------ Lasso Support: http://support.omnipilot.com/ Search the list archives: http://www.listsearch.com/lassotalk.lasso Manage your list subscription: http://www.listsearch.com/lassotalk.lasso?manage |
Free forum by Nabble | Edit this page |