<SCRIPT Language ="VBScript">
Sub KeyCheck1
Wdatatype = window.form1.Sdatatype.Value
Wplandate = window.form1.Splandate.Value
document.getElementById("Serror1").innerHTML=""
window.form1.Serror2.Value = "0"
Wcheck1 = "0"
If Window.Event.KeyCode = 13 Then
if Wdatatype = "" then
document.getElementById("Serror1").innerHTML="Please input data type"
window.form1.Serror2.Value = "1"
Wcheck1 = "1"
end if
if (Wdatatype <> "001" and Wdatatype <> "002" and Wdatatype <> "003") and Wcheck1 = "0" then
document.getElementById("Serror1").innerHTML="Data type not correct"
window.form1.Serror2.Value = "1"
Wcheck1 = "1"
end if
if Wplandate = "" and Wcheck1 = "0" then
document.getElementById("Serror1").innerHTML="Please input plan date"
window.form1.Serror2.Value = "1"
Wcheck1 = "1"
end if
if Wdatatype = "001" then
window.form1.Sheading1.value = "Base-Plan-Seq"
window.form1.Sheading2.value = "Product Code"
call WSHSC010()
call CheckStatus()
end if
if Wdatatype = "002" then
window.form1.Sheading1.value = "Machine-Plan"
window.form1.Sheading2.value = "Final item no"
call WSHSC011()
call CheckStatus()
end if
if Wdatatype = "003" then
window.form1.Sheading1.value = "Delivery due"
window.form1.Sheading2.value = "Item no"
call WSHSC012()
call CheckStatus()
end if
msgbox window.parent.document.getElementById("retDeletePageValue1").value
end if
End If
End Sub
</SCRIPT>
<script language="vbscript">
function call1(Sdatatype)
msgbox Splandate
document.getElementById("Serror1").innerHTML="ok"
if Sdatatype = "001" then
call WSHSC010()
call CheckStatus()
end if
if Sdatatype = "002" then
call WSHSC011()
call CheckStatus()
end if
if Sdatatype = "003" then
call WSHSC012()
call CheckStatus()
end if
end function
</script>
<script language="vbscript">
sub WSHSC010()
msgbox "WSHSC010"
set ooldFrame = document.getElementById("fraDelete")
if Not (ooldFrame Is nothing) then
window.clipFrame.removeChild(ooldFrame)
End If
sFrame="<iframe id='fraDelete' frameborder='0' width='400px' height='300px' style='Display:None' src='WSHSC010.asp?"
sFrame=sFrame & "Fuser=" & window.form1.Suser.Value
sFrame=sFrame & "&Frunning=" & window.form1.Srunning.Value
sFrame=sFrame & "&Fplandate=" & window.form1.Splandate1.Value
sFrame=sFrame & "&Fdatatype=" & window.form1.Sdatatype.Value
sFrame=sFrame & "'></iframe>"
Set oFrame = document.createElement(sFrame)
window.clipFrame.appendChild(oFrame)
end sub
sub WSHSC011()
msgbox "WSHSC011"
msgbox window.form1.sdatatype.value
msgbox window.form1.splandate1.value
set ooldFrame = document.getElementById("fraDelete")
if Not (ooldFrame Is nothing) then
window.clipFrame.removeChild(ooldFrame)
End If
sFrame="<iframe id='fraDelete' frameborder='0' width='400px' height='300px' style='Display:None' src='WSHSC010_MEAW.asp?"
sFrame=sFrame & "Fuser=" & window.form1.Suser.Value
sFrame=sFrame & "&Frunning=" & window.form1.Srunning.Value
sFrame=sFrame & "&Fplandate=" & window.form1.Splandate1.Value
sFrame=sFrame & "&Fdatatype=" & window.form1.Sdatatype.Value
sFrame=sFrame & "'></iframe>"
Set oFrame = document.createElement(sFrame)
window.clipFrame.appendChild(oFrame)
end sub
sub WSHSC012()
msgbox "WSHSC012"
set ooldFrame = document.getElementById("fraDelete")
if Not (ooldFrame Is nothing) then
window.clipFrame.removeChild(ooldFrame)
End If
sFrame="<iframe id='fraDelete' frameborder='0' width='400px' height='300px' style='Display:None' src='WSHSC012.asp?"
sFrame=sFrame & "Fuser=" & window.form1.Suser.Value
sFrame=sFrame & "&Frunning=" & window.form1.Srunning.Value
sFrame=sFrame & "&Fplandate=" & window.form1.Splandate1.Value
sFrame=sFrame & "&Fdatatype=" & window.form1.Sdatatype.Value
sFrame=sFrame & "'></iframe>"
Set oFrame = document.createElement(sFrame)
window.clipFrame.appendChild(oFrame)
end sub
sub CheckStatus()
msgbox "bbb"
set ooldFrame = document.getElementById("fraStatus")
if Not (ooldFrame Is nothing) then
window.clipFrame.removeChild(ooldFrame)
End If
sFrame="<iframe id='fraStatus' frameborder='0' width='400px' height='300px' style='Display:None' src='CheckStatusPage.asp?"
'sFrame=sFrame & "uid=" & window.form1.txtUserID.Value
' sFrame=sFrame & "&cname=" & window.form1.txtCompanyName.Value
sFrame=sFrame & "Fuser=" & window.form1.Suser.Value
sFrame=sFrame & "&Frunning=" & window.form1.Srunning.Value
sFrame=sFrame & "'></iframe>"
Set oFrame = document.createElement(sFrame)
window.clipFrame.appendChild(oFrame)
end sub
</script>
<!-- Script for select all document -->
<script type="text/javascript"><!--
var formblock;
var forminputs;
function prepare() {
formblock= document.getElementById('form_id');
forminputs = formblock.getElementsByTagName('input');
}
function select_all(name, value) {
for (i = 0; i < forminputs.length; i++) {
// regex here to check name attribute
var regex = new RegExp(name, "i");
if (regex.test(forminputs[i].getAttribute('name'))) {
if (value == '1') {
forminputs[i].checked = true;
} else {
forminputs[i].checked = false;
}
}
}
}
if (window.addEventListener) {
window.addEventListener("load", prepare, false);
} else if (window.attachEvent) {
window.attachEvent("onload", prepare)
} else if (document.getElementById) {
window.onload = prepare;
}