PDA

View Full Version : using ssl with javascript



marringi
06-24-2007, 11:23 AM
Is there a way to use ssl with document.write?

I can't get this to work:
document.write('<!--#include virtual="file" -->');

Can I somehow get around this?

Twey
06-24-2007, 02:57 PM
I've already answered this here (http://www.dynamicdrive.com/forums/showthread.php?t=21867). Also, what you're discussing is SSI (Server-Side Includes) not SSL (Secure Socket Layer).

marringi
06-24-2007, 03:19 PM
well excuse me!
Someone answered that it could be done threw .js. I'm not much of a programer so I wanted to see if someone who didn't see the former question could maybe help me... the thing is when I use document.write('<!--#include virtual="file" -->'); the file apears in the pages source but does not apear on the page it self. I've tried to use .js but with no progress.. since it apears in the pages source it sould be able to a apear on the page, shouldn't it?

Twey
06-24-2007, 04:31 PM
No, because it's not valid Javascript. You'd need to perform some filtering on the markup so it would go into a Javascript string nicely, which can't be done with SSI, as I said in the other thread. And, also as I said in the other thread, it's a terrible idea anyway.