including with innerHTML
am 11.11.2007 08:57:17 von marco.stolle
Hi,
I know how to use innerHTML but I want to use it to dynamicly include
other text files on the web server.
I know this can be done by php (did that before) and SSI (not yet
done) but since I moved my personal site to the site of the provider
that does not support php and SSI I'm looking for a system that always
works under html + javascript
thanx
Marco
Re: including with innerHTML
am 11.11.2007 10:14:49 von Bone Ur
Well bust mah britches and call me cheeky, on Sun, 11 Nov 2007 07:57:17 GMT
scribed:
> Hi,
>
> I know how to use innerHTML but I want to use it to dynamicly include
> other text files on the web server.
>
> I know this can be done by php (did that before) and SSI (not yet
> done) but since I moved my personal site to the site of the provider
> that does not support php and SSI I'm looking for a system that always
> works under html + javascript
>
> thanx
>
> Marco
You can use:
and put it in your page where you want the text. In "text.txt" do a
document.write. (Avoid xhtml.)
--
Bone Ur
Cavemen have formidable pheromones.
Re: including with innerHTML
am 11.11.2007 10:40:39 von marco.stolle
On 11 nov, 10:14, Bone Ur wrote:
> Well bust mah britches and call me cheeky, on Sun, 11 Nov 2007 07:57:17 GMT
> scribed:
>
> > Hi,
>
> > I know how to use innerHTML but I want to use it to dynamicly include
> > other text files on the web server.
>
> > I know this can be done by php (did that before) and SSI (not yet
> > done) but since I moved my personal site to the site of the provider
> > that does not support php and SSI I'm looking for a system that always
> > works under html + javascript
>
> > thanx
>
> > Marco
>
> You can use:
>
>
>
> and put it in your page where you want the text. In "text.txt" do a
> document.write. (Avoid xhtml.)
>
> --
> Bone Ur
> Cavemen have formidable pheromones.
Ok thanks,
I also found a way to use httprequests http://www.boutell.com/newfaq/creating/include.html
I'm also exploring that path
in order to include the pages in my main page I would use links with
variables in so that you can give someone a link that works like
www.mysite.com?page=thebodypage.htm
where thebodypage.htm is the page I want to include
how can I filter the variables in the link with javascript ( in php
there is the $_GET variable)
thanx
Marco
Re: including with innerHTML
am 11.11.2007 11:23:59 von tabkanDELETETHISnaz
marco.stole@gmail.com wrote:
> in order to include the pages in my main page I would use links with
> variables in so that you can give someone a link that works like
>
> www.mysite.com?page=thebodypage.htm
>
I think you meant: http://www.mysite.com/getpage?page=thebodypage.htm
Why using this strange URI syntax?
http://www.mysite.com/thebodypage
Is a much better URI.
> where thebodypage.htm is the page I want to include
>
So, if you want to include a specific static page, you don't need server
side scripting.
> how can I filter the variables in the link with javascript ( in php
> there is the $_GET variable)
Which variables?
The URI parameters of a request that hasn't yet been sent? Not possible.
The URI parameters of the current page if it's dynamic and uses
parameters? In that case, since the page is dynamic, write these
parameters in the page, at the adequate places, from the server side
script.
Beware: AJAH breaks most features of browsers: Printing, bookmarking, any
form of history (including the great Opera feature that searches in the
history), links panel, back & forward buttons, address copying, offline
browsing and local page saving, sessions, source viewing, address bar
navigation (i.e. manually editing the URI to access a different resource
or a previously seen resource, or a higher level "directory"),
multi-windows browsing, the right of disabling JavaScript and/or
XmlHttpRequest for privacy or security reasons and features that haven't
yet been invented, relying on the document model. It also breaks search
engine bots and produces inaccessible pages. Only the two or three most
popular full-featured browser with default settings set can access the
pages.
If nothing is dynamic on the server side, then, most probably, AJAH is a
bad thing, as static documents could most probably be served to the client.
--
If you've a question that doesn't belong to Usenet, contact me at