Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Progress Bar?

Re:Progress Bar? 13 years 1 month ago #12717

  • xingu
  • xingu's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 32
  • Thank you received: 1
Upon investigating this issue with IE, I have found the problem. Once again IE sucks. I found this.
IE assumes that the clicking of a link heralds a new navigation where the current page contents will be replaced. As part of the process for perparing for that it halts the code that animates the GIFs. I doubt there is anything you can do about it (unless you aren't actually navigating in which case use return false in the onclick event).

There were 2 solutions, but as I am not a coder I don't understand how to implement this. Could someone help. This is one of the few things I wish was included in the form component.

1.
The accepted solution did not work for me.
After some more research I came across this workaround, and it actually does work.
Here is the gist of it:
<script>
function showProgress() {
var pb = document.getElementById("progressBar");
pb.innerHTML = '<img src="./progress-bar.gif" width="200" height ="40"/>';
pb.style.display = '';
}
</script>

and in your html:
<input type="submit" value="Submit" onclick="showProgress()" />
<div id="progressBar" style="display: none;"><img src="./progress-bar.gif" width="200" height ="40"/></div>

So when the form is submitted the img tag is inserted which for some reason it is not effected by the ie animation issues.
Tested in Firefox, ie6, ie7 and ie8.

2.
IE assumes that the clicking of a link heralds a new navigation where the current page contents will be replaced. As part of the process for perparing for that it halts the code that animates the GIFs. I doubt there is anything you can do about it (unless you aren't actually navigating in which case use return false in the onclick event).
I tried the solution given by AnthonyWJones above by adding -

return false;

at the end of the script in the clicked link and it worked. Thanks!
The administrator has disabled public write access.

Re:Progress Bar? 12 years 7 months ago #14432

Works perfectly, thank you.
The administrator has disabled public write access.

Re:Progress Bar? 11 years 10 months ago #17406

  • rizalito
  • rizalito's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
HI, I tried using the proposed solution but I could not get it to work. Any tips?
The administrator has disabled public write access.

Re: Progress Bar? 11 years 9 months ago #17631

  • milosmilcom
  • milosmilcom's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
As I'm using ajax validation, think that didn't exist when this topic started, this solution was partially helpful.
The problem is that the loading gif appears onsubmit (click) even if the form didn't validated and files didn't start uploading…

As I'm using jQuery, this example is done with jQuery and one page form. Will make some tests for multi-page forms or if somebody get how to obtain the variable, please post it.
EDIT: Multipage variable added

Add a Free Text field, and put this code inside:
<div id="loading" style="display: none;">
	Please wait, we are uploading the files <br /> 
	<img src="[CHANGE_THIS_TO_YOUR_PATH]/ajax-loader.gif" alt="" />
</div>
 
<script type="text/javascript">
/* <![CDATA[ */
jQuery(document).ready(function() {
 
	var formId 	= jQuery('form input[name="form[formId]"]').val(),
		form 	= rsfp_getForm(formId),
		page 	= '{page}';
 
	jQuery('#Submit').click( function () {
		var Valid = ajaxValidation(form, page);
		if (Valid) { 
			jQuery('#loading').css('display','block');
		}
	});
});
/* ]]> */
</script>

You can make your own loading gif and change style params for it, however, you need one gif for this example, use the link provided in the first answer.

Hope not missing something....
Last Edit: 11 years 9 months ago by milosmilcom.
The administrator has disabled public write access.
The following user(s) said Thank You: beth.ray

Re: Progress Bar? 11 years 5 months ago #19213

  • xingu
  • xingu's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 32
  • Thank you received: 1
Still not working in IE

Anyone have a html5 solution or something??
The administrator has disabled public write access.

Re:Progress Bar? 11 years 4 months ago #20207

  • innoslov
  • innoslov's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hello Ocatvian, am having aproblem implemeting Ajax Loading gif when form is submited in my joomla form pls can u assist me to accomplish the... Just another Joomla beginner. Thanx in Advance.
The administrator has disabled public write access.

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!