|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
I'm trying to write an SSI script that displays a random image. If I have to I'm content with making the page with an .shtml ext, but I've seen pages with an .html extension using the image tag
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre><img src="cgi-bin/script.cgi?blah">[/code] If possible I'd like to know howto do it that way. |
|
#2
|
|||
|
|||
|
or alternatively you could try it like this...
<script language='javascript'> var IE4=(document.all) ? 1 : 0; var NN4=(document.layers) ? 1 : 0; if (IE4) { var theSource='<iframe id="Floating" src="whatever.com/cgi-bin/script" width=468 height=61 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=no></iframe>' document.write(theSource) } else if (NN4) { var theSource='<layer id=Floating src="whatever.com/cgi-bin/script" width=468 height=61 style="position:absolute; top:94; left:174;"></layer>' document.write(theSource) } else { var theSource='<img src="static.gif">' document.write(theSource) } </script> <noscript><img src="static.gif"></noscript> somebody else suggested this in this forum and it work fine for me (I needed to create a dynamically created html banner depending on the user details to go across mulitple sites). the only thing I added was in case there was neither of the two browsers or no javascript. tried it in ie, netscape, opera and lynx and it worked fine.. hth ------------------ cheers |
|
#3
|
|||
|
|||
|
Thanks, however I already found out howto do it via CGI/PERL instead of JavaScript. However now that I have the script working, I want to make sure people cannot steal my bandwidth. I was told to use HTTP_REFERER, but I can't seem to find anything about it anywhere.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Random Image using SSI |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|