<% Option Explicit %>
Test of Input
<%
Function CleanSQL(badStr) 'Clean up string by stripping out all but alphanumerics
Dim goodStr
Dim i
Dim ch
Dim goodChars
goodChars = "-_. @"
for i = 1 to Len(badStr)
ch = Mid(badStr, i, 1)
if ( (ch>="A") and (ch<="Z") ) or ((ch>="a") and (ch<="z") ) or ((ch>="0") and (ch<="9")) or (InStr(goodChars,ch)>0) then
goodStr = goodStr & ch
end if
next
CleanSQL = goodStr
End Function
Dim Input
Dim Message
Input = Request.Form("Command")
Message = CleanSQL(Input)
%>
You typed: <% = Input %>
After processing: <% = Message %>
">
Files in Periscope that are changed
Javascript to check every checkbox in first form (0)
function CheckAll(chk)
//for check all the checkboxes in a page
//Assumes first form in browser
{
for (var j=0;j < document.forms[0].elements.length;j++)
{
var e = document.forms[0].elements[j];
if (e.type == 'checkbox' && e.disabled==false)
{
e.checked = chk.checked
}
}
}
Attachment | Size |
---|---|
![]() | 697 bytes |
![]() | 437 bytes |