ahhh that makes sense. thanks
by the way i think i owe matt an apology. so i am now just writing
everything between the body tags. however i think the reason it was
failing before wasnt all the headers but rather that for whatever
reason you can NOT get elements by id before they are injected into
the dom!
this seems crazy wacky. if "anElement" is not part of the dom
anElement.getElement('className') works great
anElement.getElement('div') works great
but
anElement.getElement("#idName") fails
anElement.getElementById("idName") fails
here is an example (you´ll need firebug or something to see the
console.logs)
http://mootools.net/shell/jwUe3/
strangeness.
On May 2, 12:59 pm, "Matthew Hazlett" <[email protected]> wrote:
> Server performance and load
>
> If the server has to invoke the php parser for every html file this can
> negatively impact server performance and increase the load and even slow
> down your pages.
>
> The server does not do any processing for an html file besides just serving
> it out. However, if all the pages are php anyway then it makes no
> difference.
>
> -----Original Message-----
> From: [email protected]
>
> [mailto:[email protected]] On Behalf Of brook
> Sent: Sunday, May 02, 2010 11:14 AM
> To: MooTools Users
> Subject: [Moo] Re: ajax and the dom
>
> hey - thanks. i think i´ll go the regexp route its an easy solution.
> still i am surprised its necessary. any thoughts on why onSuccess
> dosen´t return the arguments that the mootools docs claim it does?
>
> also thanks for the tips... as a complete side note (you just reminded
> me i have been wanting to ask someone this) but i always modify the
> htacess files so that the .html files parse php... just seems alot
> nicer to use mysite.html... is there any reason not to do this?
>
> cheers.cheers.b
>
> On May 2, 10:51 am, virtualgadjo <[email protected]> wrote:
> > Hi Brook,
>
> > please do not use iframe, it's sort of evil except for helping to have
> > floating elements above Flash and forms :)
>
> > except from that, i would add 2 or 3 little other things
>
> > - first, of course, assuming all the content you need in the ditant page
> is
> > inside a div with an id page for example, you can also send you Ajax
> request
> > end then parse it with a regex to send only what is between <div
> id="page">
> > and </div><!--/page--> (the comment for your regex to know where is the
> end
> > of the right div)
> > Not that difficult :)
>
> > - actually, if you wanted to use my little trick for a new website i would
> > advise you to do it in a simpler way (my suggestion was just for an
> existing
> > web site with complete pages already coded)
>
> > a better way to implement it would be
> > - to have a distant php page which only returns the content you need (with
> a
> > db request or whatever else) depending on a $_GET var (for htaccess)
> > - include this page into the content container
> > - use htaccess to rewrite url (page-home.php, page-products.php and so
> > on...) so far you have a menu working perfectly without js, but with only
> > two pages and with SEO urls
> > - then, with js, parse the url in the href to retreive the right var you
> > send to the distant page with ajax (home, products...)
> > - and just update your content div with the HTML result of your request
> > It's not that far from the way most the cms work...
>
> > now, your website works perfectly with and without ajax (something i
> really
> > often do and is tiiiiiime and coding saving :))
>
> > Have swing
> > --
> > View this message in
> context:http://mootools-users.660466.n2.nabble.com/Moo-ajax-and-the-dom-tp49
> 9...
> > Sent from the MooTools Users mailing list archive at Nabble.com.