Real Estate Forums
| REW CMS 1 Questions For users of the REW CMS 1 or classic backend - please post your 'how do I' questions here. If you have upgraded to CMS 2, please use the CMS 2 Forum |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|||
|
I'd like to add a image viewer to one of my web pages but need to add jave script code under the <head> section. Is there a way for me to access this?
Thanks, Joe |
|
|||
|
Hi Joe,
What's the code? You might be able to make it a snippet and place it in the body area... Otherwise to access the <head> section that would need to be done by one of the staff. Thank you, |
|
|||
|
Well, I'm not sure which one I want to use but here is the code for one of the viewers:
<HEAD> <SCRIPT LANGUAGE="JavaScript"> NewImg = new Array ( "images/1.gif", "images/2.gif", "images/3.gif" ); var ImgNum = 0; var ImgLength = NewImg.length - 1; //Time delay between Slides in milliseconds var delay = 3000; var lock = false; var run; function chgImg(direction) { if (document.images) { ImgNum = ImgNum + direction; if (ImgNum > ImgLength) { ImgNum = 0; } if (ImgNum < 0) { ImgNum = ImgLength; } document.slideshow.src = NewImg[ImgNum]; } } function auto() { if (lock == true) { lock = false; window.clearInterval(run); } else if (lock == false) { lock = true; run = setInterval("chgImg(1)", delay); } } // End --> </script> </HEAD> How do I make it a snippet? |
|
|||
|
I made a snippet out of the <head> code and it works.
|
|
|||
.. cool ... snippets are good to use for javascript code because the editor will usually break the Javascript code. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need A Simple Calculator Javascript | RICK0525 | Coding | 4 | 03-26-2007 10:22 PM |