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

Reply
 
Thread Tools Search this Thread Display Modes
  #1 JavaScript  
Old 01-21-2008, 11:11 AM
joeobrien joeobrien is offline
New real estate webmaster
 
Join Date: Jan 2008
Posts: 14
joeobrien is on a distinguished road
Cool JavaScript

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
Reply With Quote
Old 01-21-2008, 11:20 AM
Aaron Aaron is offline
Real Estate Webmasters Staff
 
Join Date: Jun 2005
Location: Nanaimo
Posts: 7,524
Aaron is on a distinguished road
Send a message via MSN to Aaron
Default Re: JavaScript

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,
__________________
Aaron
Programming
Real Estate Webmasters
Reply With Quote
Old 01-21-2008, 11:30 AM
joeobrien joeobrien is offline
New real estate webmaster
 
Join Date: Jan 2008
Posts: 14
joeobrien is on a distinguished road
Default Re: JavaScript

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?
Reply With Quote
Old 01-21-2008, 11:52 AM
joeobrien joeobrien is offline
New real estate webmaster
 
Join Date: Jan 2008
Posts: 14
joeobrien is on a distinguished road
Default Re: JavaScript

I made a snippet out of the <head> code and it works.
__________________
Thanks,

Joe

www.JosephOBrienRealty.com

Reply With Quote
Old 01-21-2008, 03:40 PM
Aaron Aaron is offline
Real Estate Webmasters Staff
 
Join Date: Jun 2005
Location: Nanaimo
Posts: 7,524
Aaron is on a distinguished road
Send a message via MSN to Aaron
Default Re: JavaScript

.. cool ... snippets are good to use for javascript code because the editor will usually break the Javascript code.
__________________
Aaron
Programming
Real Estate Webmasters
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need A Simple Calculator Javascript RICK0525 Coding 4 03-26-2007 10:22 PM



For our members

Main Sections

IDX Coverage Areas

Spiders Welcome

All times are GMT -7. The time now is 08:37 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.