![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am using .shtml pages with SSI, and I have two different "include" content pages. I have the variable "favorite" set to either "east" or "west", like this (via javascript): favorite="east"; (or) favorite="west"; Is it possible to have the SSI Include directive syntax swapped dynamically based on whether the variable is set to east or west? I tried something like this, but it doesn't actually parse the Include file into the page: if (favorite == "east") { document.write('<!--#include file="includes/myTestInclude2.shtml" -->'); } Does anybody know if this can be done, and how? I appreciate ANY help you can give me on this one! |
#3
| |||
| |||
|
|
Is it possible to have the SSI Include directive syntax swapped dynamically based on whether the variable is set to east or west? |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Thanks Murray and Alan for getting back to me. Murray: That's what I was afraid of. It seemed like the two don't talk to each other. Alan: I looked at that, but couldn't get the javascript variable into the conditional statement. In light of what Murray said, I'm not sure that this can be done. |
#6
| |||
| |||
|
| Thanks Murray and Alan for getting back to me. Murray: That's what I was afraid of. It seemed like the two don't talk to each other. Alan: I looked at that, but couldn't get the javascript variable into the conditional statement. In light of what Murray said, I'm not sure that this can be done. depending on what the page is doing and when it's doing it- the JavaScript variable doesn't exist in the code on the server- it only exists and has a value when the clientside JS is executed... don't know what the big picture is on this so can't suggest more. |
#7
| |||
| |||
|
|
Murray: That's what I was afraid of. It seemed like the two don't talk to each other. |
|
Alan: I looked at that, but couldn't get the javascript variable into the conditional statement. In light of what Murray said, I'm not sure that this can be done. |
![]() |
| Thread Tools | |
| Display Modes | |
| |