Jump to content
  • 0

Is It Possible To Display An Animation While The Data Is Submitted?


Cameron

Question

7 answers to this question

Recommended Posts

  • 0

Hi Cameron,

 

You can paste the respective snippet inside the HTML Header and HTML Footer section.

 

Header: 

<h1 id="loadingTitle" style="display: none">Loading...</h1>

Footer:

<script>
var v_appkey = 'appkey_number',
v_appkeyInputs = document.getElementsByName('AppKey'),
v_appKeyInput = null;

for(var v_i = 0; v_i < v_appkeyInputs.length; v_i++){
if(v_appkeyInputs[v_i].value == v_appkey){
v_appKeyInput = v_appkeyInputs[v_i];
break;
}
}

if(v_appKeyInput){
var v_formNode = null,
v_tempNode = v_appKeyInput.parentNode;
do{
v_formNode = v_tempNode;
v_tempNode = v_tempNode.parentNode;
}while(v_formNode && v_formNode.nodeName.toLowerCase() != 'form');

if(v_formNode){
v_formNode.onsubmit = function(){
var v_title = document.getElementById('loadingTitle');
if(v_title){
v_title.style.display = '';
}
};
}
}</script> 

Hope it helps.

Link to comment
Share on other sites

  • 0

Good morning,

 

I think, the following script can do the same.

The code for Header:

<h1 id="loadingTitle" style="display: none">Loading...</h1>
<div id="mainText"  style="">

The code for Footer:

</div>
<script>
document.getElementById('caspioform').onsubmit = function()
{
   document.getElementById('loadingTitle').style.display = '';
   document.getElementById('mainText').style.display = 'none';
}
</script>

I'm sorry, I don't understand for what the 'appkey_number' is used in the first script?

Link to comment
Share on other sites

  • 0

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...