Hide HTML form unless certain querystring is selected
<form name=dateform method="get">
Select Date:
<a href="http://www.test.com/test/default.asp?action=home" onclick="location.href=this.href+'&rundate='+rundate;return false;"></a>
<script language="JavaScript" src="calendar_us.js"></script>
<link rel="stylesheet" href="calendar.css">
<script language="JavaScript">
new tcal ({
// form name
'formname': 'dateform',
// input name
'controlname': 'rundate'
});
</script>
<font size="1"></font>
<input type="text" name="rundate" size="20" value="<%response.write(rundate)%>">
<input type="submit" value="Submit" name="B1">
</form>
And this is my case statement
<%SELECT CASE action%>
<%CASE "HOME"%>
<!--#include virtual="/test/stest.asp"-->
<!--#include virtual="/test/stest.asp"-->
<!--#include virtual="/test/stest.asp"-->
<%CASE "CB"%>
<!--#include virtual="/test/stest.asp"-->
<%CASE "CM"%>
<!--#include virtual="/test/stest.asp"-->
<%CASE "L"%>
<!--#include virtual开发者_运维百科="/test/stest.asp"-->
<%CASE "ALL"%>
<!--#include virtual="/test/stest.asp"-->
<!--#include virtual="/test/stest.asp"-->
<!--#include virtual="/test/stest.asp"-->
<%CASE "Z"%>
<!--#include virtual="/test/stest.asp"-->
And I only want the form to show when home is selected
Classic ASP is spaghetti code, so this should work just fine:
<%SELECT CASE action%>
<%CASE "HOME"%>
<form name=dateform method="get">
Select Date:
...
...
...
<!--#include virtual="/test/stest.asp"-->
...
Can't see how this question is related to JavaScript.. ?
精彩评论