In VBScript I'm getting an error every time I run this code. I just want to reload the page if the "p" variable can't be found in the querystring
.
What am I doing wrong exactly?
Dim sURL 'URL of the document
sURL = document.URL
'Set page number equal to 1
If( InStr( sUrl, "?" ) = 0 ) Then
sURL = sURL & "?p=1"
window.location = sURL
window.location.reload()
End If
What are you doing wrong? It looks like almost everything. Your code looks like mess of VBS and JavaScript.
What you need is