Click to See Complete Forum and Search --> : body onload


kalon
11-14-2007, 07:53 PM
I'm upgrading my shopping cart to then new version,
but they advised me to use AddToBodyOnLoad("") instead of
BodyOnLoad = BodyOnLoad & ....
In order to be compatible.

Im not sure how re-write it

Here's the original script code

If InStr(LCase(Request.ServerVariables("SCRIPT_NAME")),"default.asp") > 0 Then
BodyOnLoad = AddToBodyOnLoad("choosePic()")
End If

<body bgcolor="#FFFFFF" leftmargin="0" rightmargin="0" topmargin="0"
bottommargin="0" marginwidth="0" marginheight="0"<%=AddToBodyOnLoad%>>

Here's my guess:
If InStr(LCase(Request.ServerVariables("SCRIPT_NAME")),"default.asp") > 0 Then
AddToBodyOnLoad = BodyOnLoad & "choosePic()"
End If

<body bgcolor="#FFFFFF" leftmargin="0" rightmargin="0" topmargin="0"
bottommargin="0" marginwidth="0" marginheight="0"<%=AddToBodyOnLoad%>>

As I am not familiar with any of this, could some one please help me out and let me know if the above is correct and if not how is it supposed to work?

Thanks,
Kevin

kalon
11-14-2007, 10:23 PM
### CORRECTION###
Here's my guess:
If InStr(LCase(Request.ServerVariables("SCRIPT_NAME")),"default.asp") > 0 Then
AddToBodyOnLoad = AddToBodyOnLoad("choosePic()")
End If

<body bgcolor="#FFFFFF" leftmargin="0" rightmargin="0" topmargin="0"
bottommargin="0" marginwidth="0" marginheight="0"<%=AddToBodyOnLoad%>>