Forums
This topic is locked
Conditional region problem -- minor
Posted 02 Oct 2002 18:16:08
1
has voted
02 Oct 2002 18:16:08 Susan Kent posted:
Using the Conditional Region extension, I'm trying to create an asp page that displays 3 different regions of the same page, depending on what button the user does / does not click. Could someone be so kind as to look at the tester code (I'll base my real pages on this test example when I get it right!) below to let me know where it is that I'm going wrong. It's had me stumped for hours and hours.
Many thanks.
Code as follows:
======================
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<% If (Request.Form("Mode"




region 1 - add new record
<form name="form1" method="post" action="">
<p>
<label>
<input type="text" name="textfield">
new name</label>
</p>
<p>
<label>
<input name="Submit" type="submit" value="Preview">
<input name="Reset" type="reset" value="Cancel">
<input name="ExistReg1" type="submit" id="ExistReg1" value="Existing1">
<input name="Mode" type="hidden" value="Preview">
<input name="Mode" type="hidden" value="Existing1">
</label>
</p>
</form>
<hr>
<% End If ' end If (Request.Form("Mode"


<% If (Request.Form("Mode"


region 2 - preview record
<form name="form2" method="post" action="">
<p>
<label>
<input type="text" name="textfield2">
confirmation message</label>
</p>
<p>
<label>
<input name="Submit" type="submit" value="Submit">
<input name="button" type="submit" value="Cancel">
<input name="ExistReg2" type="submit" id="ExistReg2" value="Existing2">
<input name="Mode" type="hidden" id="Mode" value="Existing2">
</label>
</p>
</form>
<hr>
<% End If ' end If (Request.Form("Mode"


<% If (Request.Form("Mode"




region 3 - existing records
<form name="form3" method="post" action="">
<p>
<label>
<input type="text" name="textfield3">
existing name</label>
</p>
<p>
<label>
<input name="NewReg3" type="submit" value="New">
<input name="Mode" type="hidden" value="New">
</label>
</p>
</form>
<% End If ' end If (Request.Form("Mode"


<p> </p>
</body>
</html>
Replies
Replied 03 Oct 2002 00:14:37
03 Oct 2002 00:14:37 Susan Kent replied:
No need to worry. I've sorted this by using Select Case statements instead (NB with a lot of help!).