"Arpan" wrote in message news:eKzz%...
The number '60' can be written as (50+10) or (25+35) or (15+45) or (7+53)
etc... but I want the output as (50+10) only when 60 is typed in a textbox &
the Form is submitted. How do I do this?
An ASP alternative would be:
<%
dim strInput, postback
postback = Request.Form("postback")
if postback = "postback" then
strInput = Request.Form("myInput")
if strInput = "60" then
strInput = "(50 + 10)"
end if
end if
%>
<form id="myform" name="myform" method="post" action="" />
<input id="mytext" name="mytext" value="" />
<input id="postback" name="postback" type="hidden" value="postback" />
<input type="submit" />
</form>
Note: this routine has no security
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp