During the implementation of my JSPX code with loading GIF
When a list drop down is selected, the code looks like this:
<ui:composition>
<style type="text/css">#mask {display: none;cursor: wait;z-index: 99999;position:absolute;top: 0;left: 0;height: 100%;width: 100%; background-color: white;filter: alpha(opacity = 50); }
</style>
<div id="mask"><div style="position: absolute; top : 300px; left :550px; text-align : center; vertical-align: middle;font-family:arial,helvetica,verdana,sans-serif; color : red;font-size : 16px;font-weight : bold; text-decoration: underline;"><img id="ajaxBusyImage" src="#{facesContext.externalContext.requestContextPath}/images/progress.gif" />
<br/>loading</div></div>onchange="resetAllCheckBoxes();refreshAllActionButtons(#{myBean.selectedRotate.rotateReadOnly});showCursor();
The showCursor() method is as follows:
function showCursor() {
document.getElementById('mask').style.display = 'block';
return false;
}
I need to replicate this in a JSP file
When I tried including it within <body>, I encountered an error stating that it's not the correct place to include it.
How can I fix this issue or is there another approach to implementing it in JSP?
I added within the <body> tag and called the onChange method showCursor()
<div id="mask"><div style="position: absolute; top : 300px; left : 550px; text-align : center; vertical-align: middle;font-family: arial,helvetica,verdana,sans-serif; color : red; font-size : 16px; font-weight : bold; text-decoration: underline;"><img src="../images/blank.gif" /><br/>loadinggg</div></div>
--- Update: I have removed the image ID and provided the source path instead. The error has been resolved, but the GIF only appears as an image icon upon initial page load.
I am still unable to get the GIF working as intended.