Crash1hd
05-15-2003, 08:39 AM
Here is the code question to follow!
<%
DIM SQL, HRS
SQL = "Select userid, UserName From members Order By userid"
Set HRS = Conn.Execute(SQL)
do until HRS.EOF
IF HRS.fields("userid") = Session("userid") Then
If Session("allow") = "Lok" Then
response.write"<P align=""center""><a href=/include/utility.asp?method=abandon onClick=location.reload()>" & HRS.fields("username") & " You are curently logged in click here to log out </a></p>"
response.write"<Div style='position:absolute; top:0; left:0%; z-index: 1'><font color=red>" & Session("Clearance") & "</font></div>"
End If
End If
HRS.movenext
Loop
CleanUp2(HRS)
%>
Ok the area marked in red onClick=location.reload is needed for mozzila or a getElementbyid and helps stop the back click on a members only page! but as you may have already guessed if you click on the link in IE it runs the onClick before the method part and you have to click it 2 times to work? so I need a way of hiding that code from ie but allowing mozzila to see it? Ok I am useing IE and W3 for my references of browser check for example
IF(IE){Blah}
IF(W3){Blah}
I am just not sure how to put the script inside asp code as above
<%
DIM SQL, HRS
SQL = "Select userid, UserName From members Order By userid"
Set HRS = Conn.Execute(SQL)
do until HRS.EOF
IF HRS.fields("userid") = Session("userid") Then
If Session("allow") = "Lok" Then
response.write"<P align=""center""><a href=/include/utility.asp?method=abandon onClick=location.reload()>" & HRS.fields("username") & " You are curently logged in click here to log out </a></p>"
response.write"<Div style='position:absolute; top:0; left:0%; z-index: 1'><font color=red>" & Session("Clearance") & "</font></div>"
End If
End If
HRS.movenext
Loop
CleanUp2(HRS)
%>
Ok the area marked in red onClick=location.reload is needed for mozzila or a getElementbyid and helps stop the back click on a members only page! but as you may have already guessed if you click on the link in IE it runs the onClick before the method part and you have to click it 2 times to work? so I need a way of hiding that code from ie but allowing mozzila to see it? Ok I am useing IE and W3 for my references of browser check for example
IF(IE){Blah}
IF(W3){Blah}
I am just not sure how to put the script inside asp code as above