This code worked in an old IE browser but I can’t get it to work in Edge, FF, Chrome.
The way it worked is that if you click it expands the question and shows you the answer and if you double click it opens in another window to edit. In the newer browsers, when you click it doesn’t open as distribed, but if you double click it does open the edit window.
Any help would be appreciated, thank you.
<SCRIPT LANGUAGE=vbscript>
function toggle(id)
if document.all ("info"&id).style.display="inline" then
document.all ("info"&id).style.display="none"
else
document.all ("info"&id).style.display="inline"
end if
end function
</SCRIPT>
the script language= syntax is deprecated, so i wouldnt recommend using it… unless you have a very strong need for this to be vbscript, i would suggest translating it into actual Javascript.
The browser uses JS. It understands JS. What you have inside your script tag is not JS. Make it JS.
At the very least, start by properly formatting the function and if statements. You’ve shown this forum that you were working with AJAX functions and jQuery notations. So… go ahead and give it a try and write the normal JS for a function and an if, and keep an eye on your assignment vs equality operators.