Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Webcoding Question

Page: 1 of 1
 swphreak
07-12-2007, 12:57 PM
#1
This is for you coders out there:

My boss likes to post records on the website, and he puts them on like 5 different pages. So when I go to update a record, I have to edit and reupload 5 different pages. Does anyone know of a way to make things easier?

I tried looking for a way to put the records on a 6th page by itself, and then use some scripting language to recall the numbers on the 5 pages. The end result I was aiming for was to just update the 6th page and upload it, and the 5 pages would have the new numbers.

Did that make sense to anyone? Also, I have absoultely no control over what is running/installed on the web host.
 tk102
07-12-2007, 2:41 PM
#2
This is for you coders out there:

My boss likes to post records on the website, and he puts them on like 5 different pages. So when I go to update a record, I have to edit and reupload 5 different pages. Does anyone know of a way to make things easier?

I tried looking for a way to put the records on a 6th page by itself, and then use some scripting language to recall the numbers on the 5 pages. The end result I was aiming for was to just update the 6th page and upload it, and the 5 pages would have the new numbers.

Did that make sense to anyone? Also, I have absoultely no control over what is running/installed on the web host.

Assuming that all the files you have are static HTML files and not dynamic files(eg. PHP, ASP, JSP etc.), you could accomplish this through javascript.

Let's say you want the same bit of html to appear on each page. In a text editor, type the following:

var mystrings=new Array();
mystrings[0]="Hello World.<br>";
mystrings[1]="<b>Bang!</b>";
mystrings[2]="Current value is 14";

Save this as data.js and upload it.

Then in your HTML wherever you want these strings to be imported use the following code in <head> portion.
<script type="text/javascript" src="data.js"></script>
and in the <body> area wherever you want these strings use the following:
<script type="text/javascript">document.write(mystrings[0]);</script>
<script type="text/javascript">document.write(mystrings[1]);</script>
<script type="text/javascript">document.write(mystrings[2]);</script>

Now, whenever you need to make a change, you'll only need to upload the new version of data.js. (You may have to clear your cache to notice the effect of your change.)
 swphreak
07-12-2007, 4:05 PM
#3
That's exactly what I was thinking of. I just couldn't remember how to do it (haven't used JavaScript since High School). I knew it could be done. Thanks for the tip.


And no, I don't think they set up the webserver to use anything other than html. Maybe ASP, but nothing else.
 tk102
07-12-2007, 5:00 PM
#4
:) No problem SWP. It's easy to forget this stuff if you don't use it very often.
 Astrotoy7
07-15-2007, 12:58 AM
#5
glad you're around tk !! This type of stuff is beyond me.. Im very much hardware oriented when it comes to my compy powerz.. :D

mtfbwya
 CLONECOMMANDER501
07-15-2007, 8:54 AM
#6
Do Web-coding programs cost money or are there any good free ones?
 Det. Bart Lasiter
07-17-2007, 9:25 PM
#7
Notepad.
 Lynk Former
07-18-2007, 4:29 AM
#8
Notepad.
Lynk approves.
 ChAiNz.2da
07-18-2007, 10:19 AM
#9
Lynk approves.
ChAiNz.2da thirds it (http://www.notepad.org/) :D

I've got a link to this site on my homepage.. hehehe
 Ray Jones
07-19-2007, 8:41 AM
#10
This is why *I* am *not* geeky. I prefer some syntax highlighting for whatever language I code and proper project/file management.

That's why I use gedit (http://www.gnome.org/projects/gedit/).
 Det. Bart Lasiter
07-22-2007, 1:43 AM
#11
 Ray Jones
07-22-2007, 5:58 AM
#12
that's right
Page: 1 of 1