[Proto-Scripty] Can prototype solve the issue with my spinner not animating when I use window.location=xxx

2010-02-24 Thread greghauptmann

Hi,

I have a requirement after a user goes to page X which takes a while
to load, to show a spinner.   I have an issue trying to solve this
with basic JavaScript (see below).  Can prototype help here?

Details of my current problem:   It seems when I use window.location
as a means to redirect to the API when my longer running transaction
is does not ensure the animation for the spinner gif I have works. ie.
I see the gif ok but it not being animated. Is there another way in
Javascript to force the redirect once the gif animation starts?

div id=loading
/div

script type=text/javascript charset=utf-8
   function show_spinner() {
 $(form).hide()
 $(loading).show()
 window.location = /weekends/display   # == SEEMS TO
STOPSPINNER ANIMATION
}
   window.onload=show_spinner;
/script

CSS:

#loading {
  width:100px;
  height: 100px;
  position: fixed;
  top: 50%;
  left: 50%;
  background:url(/images/ajax-loader.gif) no-repeat center #fff;
  text-align:center;
  padding:10px;
  font:normal 16px Tahoma, Geneva, sans-serif;
  # border:1px solid #666;
  margin-left: -50px;
  margin-top: -50px;
  z-index:2;
  overflow: auto;

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Re: Can prototype solve the issue with my spinner not animating when I use window.location=xxx

2010-02-24 Thread greghauptmann
thanks - I can at least now give up on the current approach I was
trying to get working  :)

On Feb 25, 7:40 am, Pranav pranav.k.moor...@gmail.com wrote:
 AFAIK, the browser stops all executions on the current page when the
 page unloads (when you click on a link, submit a form, set the
 location property etc)
 What you could do is start with an empty weekends/display page that
 only displays the animated gif and then load the page content
 asynchronously.

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Re: does prototype abstract canvas usage to both IE mozilla?

2009-03-02 Thread greghauptmann

Hi guys,

I've just come across http://jalava.buildyourownapps.com

I'm just seeing now that for a diagram editor there seems to be 2
approaches from what I can tell, one based on real drawing (e.g.
raphaeljs, or canvas tag), and the other using the capabilities of
layout inherit using HTML/CSS/etc which is what the above-mentioned
jalava is doing I think (or I think the commercial http://mxgraph.com
is using this also)

Any comments here?  Would you agree that using the HTML/CSS layout
capabilities (which seems to lay in being able to do absolute
positioning of objects) would be a better fit?  This would also get
around any issues re Canvas tag support cross-browsers?




Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] building object orientated javascript libraries - does Prototype support/help here???

2009-02-27 Thread greghauptmann

Hi all,

I confess this is a newbie question in advance:

Q1 - If one wants to build a set of higher level library functions in
javascript (e.g. to aid in drawing objects say) does Prototype assist
here?  That is would it provide a framework, or a standard way of
building up JavaScript code with an OO like approach?

Q2 - What would people recommend here for a set of higher level
Javascript functions that themselves may lend themself to being
modeled in a OO like fashion?  i.e. in the javascript programming
world is this something you just would not consider trying to do (i.e.
and sticking with functional approach).

Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---