I'm Trying to Output data inside a script page for a menu. Is there any way this would work? Does anyone know how to Query DBases using Plain Script?
My Code Is Below:
var currentPopOut = "none";
var currentMenu = "none";
var HTMLStr
function mOver(sender)
{
var poperid = sender.id;
document.all(poperid).className="eOff";
if (currentPopOut != "none")
{
document.all(currentPopOut).style.display = "none";
currentPopOut = "none";
}
if (currentMenu != "none" && currentMenu != poperid)
{
document.all(currentMenu).className="e";
currentMenu = "none";
}
currentMenu = poperid
poperid = poperid.replace(/poper/, "popup")
currentPopOut = poperid;
document.all(poperid).style.display = "";
window.event.cancelBubble = true;
}
function mPopupOver(sender)
{
window.event.cancelBubble = true;
}
HTMLStr =
"<script language=javascript for=document event=onmouseover>" +
"if (currentPopOut != 'none')" +
"{" +
" document.all(currentPopOut).style.display = 'none';" +
" currentPopOut = 'none';" +
"}" +
"if (currentMenu != 'none')" +
"{" +
" document.all(currentMenu).className='e';" +
" currentMenu = 'none';" +
"}" +
"</script>" +
" <div id=poper1 class=e onmouseover='mOver(this)'>Dessert Products</div>" +
" <div onmouseover='mPopupOver(this)' id=popup1 class=ePopup style='display:none;'>" +
" <table width=300 class=eSub cellpadding=2>" +
" <tr>" +
" <td width=5 rowspan=9></td>" +
" <td colspan=2>Select a category:</td>" +
<CFSET Counter = 1><cfoutput query="getemp"><CFIF Counter eq 1>
" </tr>" +
" <tr>" +
</CFIF>
" <td width=148>• <Span class=ea><a href=?keyword=showprod&stable=0&str=0&std=0&Type=#idnm#&Tid=#session.Vitals[2]#>#Name#</a></Span></td>" +
<CFIF Counter eq 2>
" </tr>" +
<CFSET Counter = 1><CFELSE><CFSET Counter = Counter + 1></CFIF></cfoutput>
" </table>" +
" </div>";
document.write (HTMLStr)
Enter your message below
Sign in or Join us (it's free).