Billybonga
IS-IT--Management
Hi all,
I have a strange issue with an if statement.
In a page i have done an include to and external file variables.inc
In this file i have an asp statement
What is happening is it is unable to determine if lAnketID = max_questions and so shows you the else.
To test that the max_questions variable is being passed i have added a response.write max_questions in various places of the page and it displays that max_questions is 9
lAnketID is also correct as if I change the code to
<% if lAnketID = 9 then %>
everything works fine?
Can anyone see where things might be failing ?
Cheers,
Billybonga
I have a strange issue with an if statement.
In a page i have done an include to and external file variables.inc
In this file i have an asp statement
Code:
<% max_questions = 9 %>
</code>
In my vote page I have an If statement :
[code]
<form action="cast.asp?ID=<%=lAnketID%>" method="post">
<% if lAnketID = max_questions then %>
<table border="0" cellspacing="1" cellpadding="2" width="98%" bgcolor="#ffe4b5">
<tr>
<td colspan="3" class="header2"><%=sSurveyQuestion%> </td>
</tr>
<tr>
<td colspan="3" class="smalltext"> <textarea name="comments" cols="70" rows="5" id="comments"></textarea></td>
</tr>
<tr>
<td width="48%" height="25" align=right> <input type="reset" name="Reset2" class="flatbutton" value="Clear">
</td>
<td width="3%" align=right> </td>
<td width="49%" align=right><div align="left">
<input type="submit" name="cmdOyVer2" value="Submit" class="flatbutton">
</div></td>
</tr>
</table>
<%else%>
<table border="0" cellspacing="1" cellpadding="2" width="98%" bgcolor="#ffe4b5">
<tr>
<td colspan="3" class="header2"><%=sSurveyQuestion%><span style="font-size:10.0pt;font-family:Arial">
</span></td>
</tr>
What is happening is it is unable to determine if lAnketID = max_questions and so shows you the else.
To test that the max_questions variable is being passed i have added a response.write max_questions in various places of the page and it displays that max_questions is 9
lAnketID is also correct as if I change the code to
<% if lAnketID = 9 then %>
everything works fine?
Can anyone see where things might be failing ?
Cheers,
Billybonga