swphreak Posted July 12, 2007 Share Posted July 12, 2007 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. Link to comment Share on other sites More sharing options...
tk102 Posted July 12, 2007 Share Posted July 12, 2007 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.) Link to comment Share on other sites More sharing options...
swphreak Posted July 12, 2007 Author Share Posted July 12, 2007 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. Link to comment Share on other sites More sharing options...
tk102 Posted July 12, 2007 Share Posted July 12, 2007 No problem SWP. It's easy to forget this stuff if you don't use it very often. Link to comment Share on other sites More sharing options...
Astrotoy7 Posted July 15, 2007 Share Posted July 15, 2007 glad you're around tk !! This type of stuff is beyond me.. Im very much hardware oriented when it comes to my compy powerz.. mtfbwya Link to comment Share on other sites More sharing options...
CLONECOMMANDER501 Posted July 15, 2007 Share Posted July 15, 2007 Do Web-coding programs cost money or are there any good free ones? Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted July 18, 2007 Share Posted July 18, 2007 Notepad. Link to comment Share on other sites More sharing options...
Lynk Former Posted July 18, 2007 Share Posted July 18, 2007 Notepad. Lynk approves. Link to comment Share on other sites More sharing options...
ChAiNz.2da Posted July 18, 2007 Share Posted July 18, 2007 Lynk approves. ChAiNz.2da thirds it I've got a link to this site on my homepage.. hehehe Link to comment Share on other sites More sharing options...
Ray Jones Posted July 19, 2007 Share Posted July 19, 2007 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. Link to comment Share on other sites More sharing options...
Det. Bart Lasiter Posted July 22, 2007 Share Posted July 22, 2007 OH MAN RAY'S DA MAN Link to comment Share on other sites More sharing options...
Ray Jones Posted July 22, 2007 Share Posted July 22, 2007 that's right Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.