--- IRA <[EMAIL PROTECTED]> wrote:
> Automatic digest processor wrote on 8/11/2004, 11:01
> PM:
>
> > Has anyone tried to get the asp style ADP parser
> originally written in
> > like 1999 or 2000 by some guys at AM Computers
> working with Aolserver
> > 4? The source file was nsAspStyleAdps.c. It
> allowed conditional code
> > throughout the file separated by the <% %>
> sequence, in the manner of
> > ASP.
>
>
> This has always been one of my biggest complaints
> with aolserver. When
> you have to output html conditionally in adp pages,
> you have to
> backslash everything to keep tcl from choking on it.
>
> It's just this sort of problem that makes me wonder
> if the people
> building aolserver ever actually USE aolserver to
> build web
> applications. It seems like not that big of a deal
> . . . until you
> realize that we do this ALL THE TIME.
>
>
Won't single quotes work (at least for the \" part)?
i.e.:
if {$vlCountryCode == "DE"} {
ns_puts "<td
background='$imageDir/hdr_bg.gif' valign='top'
align='right'><a
.
.
.
or am I missing something? I don't use ADP too much, I
just prefer straight Tcl pages...
> Here's an example from our code:
>
> if {$vlCountryCode == "DE"} {
> ns_puts "<td
> background=\"$imageDir/hdr_bg.gif\" valign=\"top\"
> align=\"right\"><a
>
href=\"http://www.aol.de/action_templates/globalhelp_1.jsp?cid=1041541\"
> target=\"top\"><img
> src=\"$imageDir/btn_helptop.gif\" width=$img2w
> height=$img2h border=0 alt=\"$str6\"></a></td>"
> } elseif {$vlCountryCode == "FR"} {
> ns_puts "<td
> background=\"$imageDir/hdr_bg.gif\" valign=\"top\"
> align=\"right\"><a
>
href=\"http://aolaide.aol.fr/version4/topic/theme6.htm\"
> target=\"top\"><img
> src=\"$imageDir/btn_helptop.gif\" width=$img2w
> height=$img2h border=0 alt=\"$str6\"></a></td>"
> } else {
> ns_puts "<td
> background=\"$imageDir/hdr_bg.gif\" valign=\"top\"
> align=\"right\"><a
>
href=\"javascript:pop=prntPack('help/help.adp',530,500);\"><img
> src=\"$imageDir/btn_helptop.gif\" width=$img2w
> height=$img2h border=0
> alt=\"$str6\"></a></td>"
> }
>
>
>
> Whereas in darn near any other language/appserver
> out there
> (php,npe,jsp,asp), it would look something like this
> (syntax varies a
> bit, of course):
>
>
> <% if $vlCountryCode == "DE" %>
>
> <td background="<%=$imageDir%>/hdr_bg.gif"
> valign="top" align="right">
> <a
>
href="http://www.aol.de/action_templates/globalhelp_1.jsp?cid=1041541"
> target="top"><img src="$imageDir/btn_helptop.gif"
> width=<%=$img2w%>
> height=<%=$img2h%> border=0
> alt="<%=$str6%>"></a></td>
>
> <% elseif $vlCountryCode == "FR" %>
>
> <td background="<%=$imageDir%>/hdr_bg.gif"
> valign="top" align="right">
> <a
>
href="http://aolaide.aol.fr/version4/topic/theme6.htm"
> target="top"><img
> src="<%=$imageDir%>/btn_helptop.gif"
> width=<%=$img2w%>
> height=<%=$img2h%> border=0
> alt="<%=$str6%>"></a></td>
>
>
> <% else %>
> <td background="<%=$imageDir%>/hdr_bg.gif"
> valign="top"
> align="right"><a
>
href="javascript:pop=prntPack('help/help.adp',530,500);"><img
> src="<%=$imageDir%>/btn_helptop.gif"
> width=<%=$img2w%>
> height=<%=$img2h%> border=0
> alt="<%=$str6%>"></a></td>
>
> <% endif %>
>
>
> The readability difference may not be so apparent
> given the lack of
> formatting in this email, but the difference in my
> text editor (using
> syntax coloring) is tremendous.
>
> IRA
>
> --
> Sr. Software Engineer
> Parental Controls Web
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an
> email to <[EMAIL PROTECTED]> with the
> body of "SIGNOFF AOLSERVER" in the email message.
> You can leave the Subject: field of your email
> blank.
>
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of
your email blank.