threethirdsfull-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2007-Sep-06 14:44 UTC
Ajax requests and safari problems
Hi,
I''m currently experinceing a major problem getting a fundimental part
of my app working in safari.
I''m building an PHP upload progress bar using prototype similar to the
one built in jQuery.
But it works in every browser apart from safari.
The code below seems to work right through to the point of the
Ajax.Request the periodical call works fine...
<script type="text/javascript">
//<![CDATA[
$(''submit'').onclick = function()
{
$(''progressbar'').show();
var period = new
PeriodicalExecuter(function() {
var request = new
Ajax.Request("/front_dev.php/projectItem/upload/
progress_key/46dfffc516826.html", {
onSuccess:
function(transport, json) {
var width
Math.round(json.current/json.total*100);
$
(''bar'').setStyle({"width": width+"%"});
$(''bar-
text'').innerHTML = width+"%";
},
onException:
function(xhr, ex) {
alert(ex.description);
},
onFailure: function()
{
alert(''request
failed'');
}})
}, 0.1);
}
//]]>
</script>
any help would be much appreciated.
Regards
Ali
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---