Forum Moderators: open

Message Too Old, No Replies

Passing a variable with includes

Using JS to construct a virtual includes

         

Bingo

10:24 am on Mar 8, 2005 (gmt 0)

10+ Year Member



Hi,

I have a page "example.shtml?id=SOMEID" and I would like to use "includes" on the page to call a php script using includes and the id:

<!--#include virtual="display.php?id=SOMEID" -->

I am using JavaScript to parse url and get the id sent to the page, but I don't know how to construct the includes to use this id. I'm trying to use document.write but to no avail.

Appreciate some help. Obviously using example.php would get around the problem but I'd like to see if it is possible using SHTML and Javascript.

Thanks,

Bingo

bakedjake

8:57 pm on Mar 17, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



BUMP

Bernard Marx

11:14 pm on Mar 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Obviously using example.php would get around the problem but I'd like to see if it is possible using SHTML and Javascript.

Hmm. Should this thread last, there's bound to be someone who, quite reasonably, suggests not relying on client-side script for this - esp. if PHP is available.

Personally, though, I just can't really get my head round what's actually being asked. Can you help me out / post a little of your scripted attempts?