Ticket #226 ( Closed )

Short Description Task.WebWritten and WEBTOSCREEN strangeness
Entered By: Michael - Charleston When: 1998-12-07 13:51:59 Build: 1.03.07A
Categories Type: Question   Department: Product   Category: SurferScript
Having a problem. I have some code you helped me with a while back which allowed me to have a JavaSCript window pop up when the mainframe came back with the message "NO RECORDS FOUND" in response to a search request. And, importantly, it also restored the user's input back to the entry fields on the web page's form. It is as follows:

<SCRIPT Language="JavaScript">
<!--Hide from older browsers
  function userLoadScript() 
     (Screen(24,42,21) == 
   alert("NO RECORDS were found matching the
search you requested.\rYou might want to try
again either by changing your search\r
criteria or using a different search type.");
   <TESET Task.WebWritten="false">
// end of Script -->

However, when I copied this code and used it in another template as follows:

<SCRIPT Language="JavaScript">
<!--Hide from older browsers
Append By: WindSurfer  When: 1998-12-07 14:15:35  New Status: Pending Customer
Comment You may need to grab the active screen.updateticks variable to an integer variable before entering the current screen so that you can restore it prior to performing the WEBTOSCREEN. What is happening is that the WEBTOSCREEN is apparently checking the timestamp of the active screen against what is in the web variables, and rejecting them, thinking they are out-of-date...by doing a:
<TESET myupdatevar=screen.updateticks>
<TEACTION ENTER "[enter]">
<TESET screen.updateticks=myupdatevar>
You prevent the screen update timertick from being updated and enable WEBTOSCREEN to function without a synch error.

Check to see if this was done in the example that is already working, or for some other approach to avoiding the timestamp conflict...

Append By: Michael - Charleston  When: 1998-12-08 14:35:00  New Status: Pending IE
Comment Well, I put the code you suggested into the template but I still have the same problem. I am sending you the template in an email - maybe when you see it in context you'll be able t more easily spot the problem.


Append By: WindSurfer  When: 1998-12-08 15:13:59  New Status: Pending Customer
Comment First thing to try-- add SKIPCODE or SKIPSCAN to your TEACTION ENTER tags which at present are going to display the result screen inside the JavaScript function you are in the process of sending on the HTTP connection...I'm not sure this will fix everything, but I know it is a step in the right direction!

Sorry that the TEACTION ENTER by default displays the next screen in the output stream...if we could design it again to NOT do this we would. In fact, we will be introducing a new TEENTER tag that will functionally replace TEACTION ENTER, and with the new TEENTER tag the default will be to NOT display the screen!