|
%{********************************************************************** *******%} %{ Some JavaScript goes here - Used to edit the values entered into fields %} %{********************************************************************** *******%} <script language=JavaScript> function CheckFields(all) { var validData = true; var msgData = "The following errors were detected:\n\n"; var msgtodnochg = "HIT BACK BUTTON if NO CHANGE NEEDED, ELSE pick VALID Entries, and/or enter COMMENTS.\n"; var msgsequence = "There is a time sequencing error.\n"; var msgtest = "Test error message.\n"; ClearErrorMsg(); with (document.updForm) { %{*** See the "compound" Javascript statement below - the || indicates an OR condition, while && would indicate an AND condition. ***%} if (tsdin1.value == "$(savin1)" && tsdou1.value == "$(savou1)" && tsdin2.value == "$(savin2)" && tsdou2.value == "$(savou2)" && tsdin3.value == "$(savin3)" && tsdou3.value == "$(savou3)" && tsdcom.value == "$(savcom)" && tsdvac.value == "$(savvac)" && tsdper.value == "$(savper)" && tsdhol.value == "$(savhol)" && tsdoth.value == "$(savoth)" && tsdocd.value == "$(savocd)") { validData = false; msgData=SetErrorMsg(msgData, msgtodnochg); } if (tsdot1.value == "01:30a") { validData = false; msgData=SetErrorMsg(msgData, msgsequence); } if (tsdcom.value == "01:30A") { validData = false; msgData=SetErrorMsg(msgData, msgtest); } if(!validData) { ClearErrorMsg(); alert(msgData); return false; }else{ return true; } } } %{ New Function starts --------------------------------------------------- %} function ClearErrorMsg() { window.status = ""; } %{ New Function starts --------------------------------------------------- %} function SetErrorMsg(msgData, errorMsg) { window.status = errorMsg; return msgData + errorMsg; } </script> </head> -----Original Message----- From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Milan Zdimal Sent: Tuesday, March 13, 2007 9:13 AM To: Web Enabling the AS400 / iSeries Subject: Re: [WEB400] Net.Data & Javascript Hi Don, I assume you have an onclick/onchange event handler in your javascript that triggers the value to change. Can you send that code. My first thought is that it sounds like a case of faulty logic in the JS. Milan On 3/13/07, Don Cavaiani <dcavaiani@xxxxxxxxxxxxx> wrote:
I have a field which comes up in an update mode. It is a time related
field, e.g., 01:30a. When the field is displayed, the existing value from the file displays. The user may then use the dropdown arrow to select a different time from the table of times displayed. That table of times is brought in via the @query1() - see below: <tr> <td><font color="#0066cc">Time Out(1)</font></td> <td> <select name="tsdou1" size="1"> value="tsdou1" <option value=$(savou1)>$(savou1)</option> @query1() </td> </tr> In the Javascript, I am trying to do some editing (sequencing) of the In vs Out times. The problem I am running into is that the tsdout1.valuefield seems to be "1 step behind" what it should be. In other words, as I put in or select a different time value, hit enter to validate, the javascript does not work with the new time value selected. It does however work with the EXISTING value in that field - the value read in from the file. I'm thinking the @query() is making
this too complicated for the Javascript?
Hope this makes sense. Don F. Cavaiani IT Manager Amerequip Corp. 920-894-7063 ' -- This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.
-- Home Office: (519) 541-1905 Cellular: (519) 490-0036 MSN: milanz@xxxxxxxxx -- This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.