Writing HTML-templates - Here is the problem!
Thanks for the quick replies to my question. Unfortunately, however,
they didn't solve my problem.
I should have been more concrete; below follows the code fragment which
gives the problem:
I want to populate a droplist dynamically. This, in itself, is no
problem. The code below works fine, is correctly interpreted by FORTE,
and does the job - I just can't write the code in Frontpage 98.
Every time I save it or switch to WYSIWYG View, the
<option>$$BrandRow.Brand</option> is deleted and the </select> is moved
right behind the <select name="BrandDl" size="1">.
<?forte execute MyWebAppHandler.getBrands resultset="BrandListRS">
<form method="POST" action="--WEBBOT-SELF--">
<select name="BrandDl" size="1">
<?forte iterate BrandRow BrandListRS.BrandList>
<option>$$BrandRow.Brand</option>
<?/forte iterate BrandRow></p>
</select>
I understand from some of your replies (Dr. Daniel Marcus), that using
ITERATE and OPTION together in Frontpage can cause problems. Has anyone
successfully solved this problem?
I think it is crucial, that you can indeed write and maintain a template
in a WYSIWYG-editor. I don't like the idea of having to maintain a
template in a simple text editor, simply because you happen to have
added "incompatible" FORTE-tags.
The only sensible way around I can think of at the moment, is to let the
template pass through a pre-parser (basically a FORTE method), which
converts a self-defined syntax, accepted by Frontpage, into the proper
FORTE template syntax. In this way, one would never destroy the original
HTML template which can then be maintained in Frontpage with all the
WYSIWYG features.
[1901 byte] By [
] at [2007-11-25 5:01:25]

(436.3 7-23-1997)) id 85256572.00584E3D ; Fri, 19 Dec 1997 11:04:31 -0500
X-Lotus-FromDomain: WORLDBANK
One possible solution to this problem (in FrontPage 98) is to take
advantage of the special tags <% and %>. FrontPage 98 will not reformat
any text between these tags.
Example:
<%
<?forte execute mdm(root="AREA_CNTRY" ) resultset="MDMResults">
<form method="POST" action="--WEBBOT-SELF--">
<select name="BrandDl" size="1">
<?forte iterate x mdmresults.mdmlist>
<option>$$x.Description</option>
<?/forte iterate x></p>
</select>
</form>
%>
Next you must remove (global replace) them before you turn around the
HTTPresponse to the user. This can be done by over-riding the
HandleTemplate method on your HTMLScanner.
Example:
response : HTTPresponse = new;
// process the template
response = super.HandleTemplate(request);
// get rid of the FrontPage Special Chars
ReplaceString(InputString=response.EntityBody, StringToReplace='<%',
ReplaceBy='');
ReplaceString(InputString=response.EntityBody, StringToReplace='%>',
ReplaceBy='');
return response;
Norm DeGennaro
vsi@lindhard.com on 12/19/97 04:53:20 AM
Please respond to vsi@lindhard.com
To:Forte-Users@Sagesoln.Com
cc:
bcc: Norman C. De Gennaro
Subject: Writing HTML-templates - Here is the problem!
Thanks for the quick replies to my question. Unfortunately, however,
they didn't solve my problem.
I should have been more concrete; below follows the code fragment which
gives the problem:
I want to populate a droplist dynamically. This, in itself, is no
problem. The code below works fine, is correctly interpreted by FORTE,
and does the job - I just can't write the code in Frontpage 98.
Every time I save it or switch to WYSIWYG View, the
<option>$$BrandRow.Brand</option> is deleted and the </select> is moved
right behind the <select name="BrandDl" size="1">.
<?forte execute MyWebAppHandler.getBrands resultset="BrandListRS">
<form method="POST" action="--WEBBOT-SELF--">
<select name="BrandDl" size="1">
<?forte iterate BrandRow BrandListRS.BrandList>
<option>$$BrandRow.Brand</option>
<?/forte iterate BrandRow></p>
</select>
I understand from some of your replies (Dr. Daniel Marcus), that using
ITERATE and OPTION together in Frontpage can cause problems. Has anyone
successfully solved this problem?
I think it is crucial, that you can indeed write and maintain a template
in a WYSIWYG-editor. I don't like the idea of having to maintain a
template in a simple text editor, simply because you happen to have
added "incompatible" FORTE-tags.
The only sensible way around I can think of at the moment, is to let the
template pass through a pre-parser (basically a FORTE method), which
converts a self-defined syntax, accepted by Frontpage, into the proper
FORTE template syntax. In this way, one would never destroy the original
HTML template which can then be maintained in Frontpage with all the
WYSIWYG features.
at 2007-6-29 9:20:56 >
