[Solved by Darin Lee] Easy HTML Form Question about Buttons
I've created a simple HTML form that has a button that I've linked to www.google.com using the HTML Layout Painter program. It's super simple, just the one button.
When the HTML form runs, the button doesn't do anything. I can click on it all I want, but it doesn't go to www.google.com. In fact, it just sort of sits there...it doesn't even try to open a new window. I created this HTML form because we were having the same trouble with a form we created yesterday that calls a .fex.
The code is shown below if that's relevant.
< !-- Generated by Report Layout Painter -->
<script id=IBI_OptionsScript type=text/javascript> var rltVersion = "76"; var cgipath = "cgipath"; var ibirls = "ibirls2";
var rltdyncalendar = "rltdyncalendar"; var olap="olap"; var olappanebase="olappanebase"; var olapdrill="olapdrill";
HtmlPage <script id=clientEventHandlersJS type=text/javascript> //Begin function window_onload function window_onload() { UpdateData(); // TODO: Add your event handler code here } //End function window_onload
This message has been edited. Last edited by: Jason K.,
Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
June 05, 2009, 03:43 PM
Darin Lee
I think the big difference is the lack of an onClick event in Jason's original code. No button will work without something defined for onClick. Don't know where it went, but it is correctly included in Tom's code
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
WebFocus/Maintain 7.6.4-8 on Win2000 and 2003 Server
June 05, 2009, 04:16 PM
Jason K.
the onclick handler was missing. Thanks Darin Lee.
Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
June 06, 2009, 12:38 AM
Doug
There's really nothing wrong with coding a simple hyperlink like
<a href="http://www.google.com"]Google[/a]
But this was done, and should work when, "using the HTML Layout Painter". With a form as simple as this one is said to be, I'd create a new one from scratch and pay particular attention to what I did or didn't do differently from the first form. It Should work...
June 08, 2009, 05:02 AM
mark66
Hi guys,
If I may ask another question whilst we are talking about buttons and events...
My users would like to have s shortcut key, such as F6, that will trigger my "Run Report" button, but I am not sure where to code it? Is it possible?
I would have thought the event would need to be on the form, but I can't see how to code for a particular button and not just any Keypress?
(Jason I hope you don't mind me bumping this question onto the bottom of your thread!)
Thanks
Mark
WebFocus 765. iSeries v5r4
June 08, 2009, 01:06 PM
Dave Ayers
Doug,
I take your point about "using the HTML Layout Painter", but my comment, was more based on good user interface design.
A hyperlink is blue, underlined text, not a button ! (Norman, Nielsen, et al)
And, while I admit to a heavy bias towards hand coding vs. IBI tools, I don't see how anyone can do much of a non- trivial nature with WebFocus, even using these tools, without an understanding of HTML.
I know this is an old post and you probably already have the answer, but I am so excited I actually know the answer to one of these posts. I have to share.
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML