VBScript body onLoad() with Parameters
Hi Forum!
I need help to write an OnLoad() function with parameters on body tag for an asp page.
The parameters are variables defined with Dim
Ex.:
%>
<SCRIPT LANGUAGE=vbscript>
<!--
Sub OpenURL(w1, w2, w3, w4)
Dim myUrl
myUrl = "prn_certified.asp?nv1=" &w1&"&nv2="&w2&"&nv3=" & w3 & "&nv4=" & w4 "&print=visible&cancel=hidden"
MsgBox myUrl, vbExclamation, "Warning"
window.open myUrl, "_blank", "fullscreen=yes,scrollbars=yes,location=no"
End Sub
-->
</SCRIPT>
<html>
<head>
<%
Dim v1, v2, v3, v4
v1 = Request("field1")
v2= Request("field2")
if v3 > 0 then
v3 = fGetFormatted(v3, Request("sort"))
else
v3 = AnotherFinction()
end if
v4 = Request("field3")
%>
</head>
<body onLoad="OpenUrl(<%=v1%>, <%=v2%> , <%=v3%> , <%=v4%>);">
</body>
</html>
I have a lot of errors, how writing the onload with parameters?
How writing the OpenURL subroutine?
Is there any data conversion to do?
Help please
|