[thelist] Javascript - Permission Denied
Rob Smith
rob.smith at THERMON.com
Mon Mar 7 10:37:05 CST 2005
Hey,
You know I never knew the proper order of using anchors and querystring
variables in a URL, which comes last? :
page.asp?productauto=3#a919 - or - page.asp#a919?productauto=3
I ended up doing:
if not request.QueryString("productauto") = "" then
auto = split(request.QueryString("productauto"),"#")
SQL = " and productauto=" & auto(0)
end if
Next piece: This javascript helps expand and hide rows in tables, like
expandable sections:
<script language="javascript">
function toggleSub(submenu) {
if (document.getElementById(submenu).style.display == 'none') {
document.getElementById(submenu).style.display = 'block'
} else {
document.getElementById(submenu).style.display = 'none'
}
}
</script>
example:
<table>
<tr id="zzz<%= rs("productauto")%>">
<td></td>
</tr>
</table>
Next piece: When the page loads if there is an "productauto" in the
querystring then:
onLoad="toggleSub('zzz" & auto(0) & "')
Moving along, there is a link that moves the element/link up or down in the
order it is displayed on the screen. The page that executes the update query
on the move up/down link just clicked, sends the user back to:
response.redirect("LinkManager.asp?productauto=" &
request.QueryString("productauto") & "#a" &
request.QueryString("productauto"))
; which takes us back to the beginning of this email.
However, in IE, I get a Permission Denied error on line 12, char 5, or:
if (document.getElementById(submenu).style.display == 'none') {
When I try this same code it works in Mozilla 1.0.1.
Is this an IE bug?
Rob Smith
More information about the thelist
mailing list