Re: New Help with Javascript Navigation

From: Date: Wed, 26 Apr 2006 20:55:46 +0000
Subject: Re: New Help with Javascript Navigation
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-234853@lists.php.net to get a copy of this message
On Wed, 2006-04-26 at 16:47, Evan Priestley wrote: > Tell you what: write file_get_contents() in Javascript, and I'll > write the rest of it. I hope you're not going to welch!! <?php NOT; function file_get_contents( path ) { return ijinn_getContent( path ); } function ijinn_getContent( path ) { var content = false; path = ijinn_localizePath( path ); if( navigator.appName == 'Microsoft Internet Explorer' ) { httpRequest = new ActiveXObject( 'Microsoft.XMLHTTP' ); } else { httpRequest = new XMLHttpRequest(); } httpRequest.open( 'get', path, false ); httpRequest.send( null ); if( httpRequest.status == 200 ) { content = httpRequest.responseText; } return content; } ?> Unfortunately, you're going to have a HELL of a time with dynamically include()'ing source :) Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------'

« previous php.general (#234853) next »