Web Design and Development Forums

Javascript Variables

This is a discussion on "Javascript Variables" within the Java, JSP, Cold Fusion section. This forum, and the thread "Javascript Variables are both part of the Program Your Website category.

Old Jun 8th, 2007, 09:40   #1 (permalink)
New Member
 
Join Date: Jan 2007
Location: Scotland
Age: 21
Posts: 2
Javascript Variables

One of my clients has a website (designed and created by us) that has a scrolling text box on the main page. There are 5 lines of text in the scroller box and it alternates every few seconds. The users of the website (the client) use Contribute to update this site regularly.

To edit the text in the scroller bar, you need to go into the code for the main page on the website and look halfway down and you will find this section:

myScroller1.addItem("<b>Welcome to CLIENT NAME</b>");
myScroller1.addItem("<b>Call today for full details of our latest offers<b>");
myScroller1.addItem("<b>See us on ITV Wales - or download our latest ad<b/>");
myScroller1.addItem("<b>Bank Holiday Promotions</b>");
myScroller1.addItem("<b>Visit the store for our easter bargains</b>");

For our clients this is not always an easy task as they are not familiar with code of any sort. What I thought I could do was create a simple javascript file that allows the user to edit the captions as they like. Then the main page of the website could simply take the captions from this javascript file. I could also put comments through the javascript file telling them exactly what to edit and what not to edit. I am not really familiar with variables in javascript and how to pass them to another page on the website, does any body have any tips or pointers that may help me out?

Thanks a lot
russellbain is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Aug 9th, 2007, 18:53   #2 (permalink)
Junior Member
 
Join Date: Aug 2007
Location: chesterfield
Age: 36
Posts: 24
Re: Javascript Variables

how about creating a separate .js file and referencing it from the main page , then your client would just need to edit that one file with a small amount of code in it rather that trawlling through the whole page.
if there are any problems then you know wher they were generated
DPhahn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
javascript variable query

Thread Tools
Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
XSL/XML variables & bit of javascript codkat XML, RSS & Atom 4 Jan 25th, 2007 09:56
PhP variables added to XML mavedog21 PHP Forum 0 Nov 28th, 2006 16:09
Variables!! bionics PHP Forum 6 Apr 25th, 2006 15:39
Get URL and use variables JamieH PHP Forum 2 Jan 1st, 2006 03:13
Session Variables ekendricks ASP Forum 4 Dec 19th, 2003 06:33



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 23:04.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59