This is a response from the great Jian himself: JavaScript don't have to be preexecuted because it is a client side language rather than server side language. > > The code runs as soon as the browser loads the code. Unless you specifically > coded it so it runs after the entire page finishes loading. > > Reason we recommend JavaScript over preexecution is to off load server side > load to client side, hence making the MS server able to support more > concurrent users/publishing. > > If you are using AJAX to load information from another page, the best > practice is to have a loading message prior to display of content. > > So it looks like there isn't really a way to get this to fire prior to having the page completely loaded, except for not using a .ready or equivalent.
On Monday, July 9, 2012 12:16:34 PM UTC-5, Joel Kinzel wrote: > > All, > > I've talked with OT Support and Jian (who many know and who also frequents > the board) suggested we use JavaScript for pre-execute whenever possible. > So I took his advice and in a project I'm working on now, I'm using jQuery > to make an ajax call to get content from a different page. The "problem" > that I now have is there is a slight delay when the users load the page, > where the ajax call happens, and then the content gets inserted into the > page. I've wrapped the script block in the pre-execute tags and make sure > .js was a valid pre-execute extension in the project settings. What am I > missing to make this happen BEFORE the rendered page is sent to the user's > browser? > > Thanks in advance. > -- You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/reddot-cms-users/-/vBb2B2zRMRgJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.
