This topic is locked

Conditional Branching

9/1/2009 12:10:48 AM
ASPRunnerPro General questions
G
guroos author

I've tried a couple of different things like hide/show, etc and nothing seems to work well. What is the recommended way to approach conditional branching?

Sergey Kornilov admin 9/1/2009

I guess this is the article you looking for:

http://www.xlinesoft.com/asprunnerpro/docs/add_folding_section.htm

G
guroos author 9/1/2009

thank you, I have tried that but it only seemed to work when I just try it with plain text (as in the example). When I try it with the code that generates fields and labels, it does not appear to work. Furthermore when I go back to examine the code it is jumbled up.
Perhaps you could tell me where specifically I would place the code if I wanted to hide, say the 'email' field:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML {$html_attrs}><HEAD><TITLE>E2db</TITLE>

<link REL="stylesheet" href="include/style.css" type="text/css"><!--[if IE]><link REL="stylesheet" href="include/styleIE.css" type="text/css"><![endif]-->

<STYLE>

center_block{$id} {width:500px;margin:0 auto;}

contents_block{$id} {text-align:center;}

header_block{$id} {white-space:nowrap;height:31px;padding-top:5px;}

fields_block{$id} {width:100%}

buttons_block{$id} {padding-bottom:5px;white-space:nowrap;text-align:center;}

required_block{$id} {text-align:left;padding:5px}

message_block{$id} {padding:5px 0px}

</STYLE>
<META name=GENERATOR content="MSHTML 8.00.6001.18812"></HEAD>

<BODY>{BEGIN body}{$header}

<TABLE id="center_block{$id}" cellSpacing=0 cellPadding=0>

<TBODY>

<TR>

<TD id="header_block{$id}">{BEGIN flybody}

<DIV id="header_block{$id}">

<H1>E2db, Add new record</H1></DIV>

{BEGIN message_block}<DIV id="message_block{$id}">{$message}</DIV>{END message_block}

<DIV align=left>

<HR SIZE=1 width=300 noShade>

</DIV>&nbsp;&nbsp;&nbsp;<A href="e2db_list.asp?a=return">Back to

list</A><BR><BR>

<TABLE id="fields_block{$id}" border=0 cellSpacing=2 cellPadding=4>

<TBODY>

{BEGIN first_fieldblock}<TR>

<TD class=shade width=150>First</TD>

<TD width=250>{$first_editcontrol} </TD></TR>{END first_fieldblock}

{BEGIN last_fieldblock}<TR>

<TD class=shade width=150>Last</TD>

<TD width=250>{$last_editcontrol} </TD></TR>{END last_fieldblock}

{BEGIN email_fieldblock}<TR>

<TD class=shade width=150>Email</TD>

<TD width=250>{$email_editcontrol} </TD></TR>{END email_fieldblock}

{BEGIN info_fieldblock}<TR>

<TD class=shade width=150>Info</TD>

<TD width=250>{$info_editcontrol} </TD></TR>{END info_fieldblock}</TBODY></TABLE>

<DIV id="buttons_block{$id}">

<DIV align=left>

<HR SIZE=1 width=300 noShade>

</DIV>

<DIV id="required_block{$id}"><IMG src="images/icon_required.gif"> -

Required field</DIV>{BEGIN save_button}<INPUT class=button value=Save type=submit name=submit1>{END save_button}

{BEGIN reset_button}<INPUT class=button value=Reset type=reset {$resetbutton_attrs}>{END reset_button}

{BEGIN cancel_button}<INPUT class=button value=Cancel type=button {$cancelbutton_attrs}>{END cancel_button}

</DIV>{END flybody}</TD></TR></TBODY></TABLE>{$footer} {END body}</BODY></HTML>