Our Most Popular Topics!

 

Navigation

Can you write HTML code?  JavaScript?  PHP?

We're looking for a little advice on how to do a simple task.
We are proficient in BASIC, FORTRAN, and understand DATABASE MANAGEMENT, LIBRARIES, etc

But this one simple task has us  stumped.  One of many things that separate us from all of the other dental offices out there is the cumulative experience and teamwork of our staff.  Most dental offices experience a fairly regular turnover of staff, who often stay a few years and then move on.  We're proud to tell you that the average length of service for our staff members in our office is over 13 years!  Our newest staff member has been with us over 3 years.  We work together as a cohesive team, and that benefits all of our patients.

We want to highlight that experience by featuring each staff member's length of service on that person's profile page, and have that figure updated each day.  How difficult can that be?  The staff member's start date is a fixed known number.  The computer knows the current date, or at least it can be retrieved from the Internet.  All we need to do is subtract the START DATE from TODAY'S DATE, and display the number as YEARS, MONTHS, and DAYS.

For example:
"Judy's start date was March 15, 1992.
She has worked in our office for 18 years, 10 months, and 12 days.
(This does not include years spent in dentistry before working in our office!)

   

On our HOME PAGE, we would like to feature a running cumulative TOTAL and the AVERAGE per staff member.

 

For example:
"Our experienced staff has worked in our offfice for a total of 276 years, 5 months, and 14 days ,
which is an AVERAGE of 12.7 years per staff member!  We're proud of that!  

I have copied E-mails from some advisors and from the support department at SquareSpace.com.  This will give you an idea of what we have tried so far . . . and where we have encountered dead ends.  Just so everything will be visible on this HTML page, we put the letters "TEST" in front of every "SCRIPT", so that the code we have tried already will actually print out!

 

If you have any ideas or advice, click on Dr. Wolter's Mailbox and send him an E-mail.

 

 

 ----------------------------------------------------------------  

FROM AN ADVISOR:

 

Hi Dr. Wolter,

I think I have found a simple way for you to add the "count-up" code to your associates' webpages without needing to decipher all the jibberish which the Dynamic Drive page specified. I have simplified it to work. Add the following script to the page right after the tag of the web page you want to see this count-up on. It's not necessary to change a thing unless you don't want the colors I have chosen or you want to eliminate the seconds or whatever! Oh yeah, just change the date of when each employee started working for you for "TargetDate = " "

<TESTscript>
TargetDate = "04/10/1948 5:00 AM";
BackColor = "white";
ForeColor = "black";
CountActive = true;
CountStepper = 1;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
</TESTscript>
<TESTscript src="countdown.js"></TESTscript>


Now you must add the javascript file to your directory (in other words the folder that holds all the files to the page you are working on)

I have attached the javascript page for you and have converted it so that it should now work.

======================================
  


WHEN WE STILL COULDN'T GET IT TO WORK, WE ASKED OUR ADVISOR TO TRY BY ACCESSING THE ADMINISTRATIVE PART OF THE SITE:


Hi Dr. Wolter,

I'm sorry this task is plaguing you to the point of "pulling an all-nighter"! 

I accessed your site this morning and spent about 30 minutes trying to figure it out.  I went into the code on the "Dr. Wolter" page and added the javascript code.  I then went into the storage files and saw the "countdown.js".  Notice that you do NOT see any other .js files in there.  I used the same code as the .jpg files showed and that didn't work, in spite of the fact that you uploaded the .js file to the same directory holding all your images.
 
I then looked around your site and found the HTML code of where all your other .js files reside.  This is where they are: 

 

<TESTscript src=""/universal/scripts/countdown.js">.  I don't know how to access that universal file on this program.  Do you know how to access "data and media" under "management" as you wrote below?
 
I know there is a way to do it and I did leave the code on your Dr. Wolter page. (it's not visible to the viewer) The only problem getting this to work is to have the script location properly noted.  (ie: <TESTscript src="/universal/scripts/countdown.js">  Right now, the countdown.js is in a place which is probably where it shouldn't be.

 

I went back to the site where I found this code:
Here is where I found this information!
http://www.hashemian.com/tools/javascript-countdown.htm  (http://www.hashemian.com/tools/javascript-countdown.htm )
 
I decided to let this guy host the .js file.  It still doesn't work!

==============================================

HELP! I have
I wrote to you a couple of months ago about setting up a countdown timer to show the cumulative length of service of each of my employ spent over 50 hours on this already, and paid outside support people, and we're all stumped!
ees. You suggested that I contact someone who knows JavaScript, which I did.

Apparently, I need to add Javascript code to each employee. For example, if you access MY page, which is: "http://www.drwolter.com/dr-wolter-cover/ (http://www.drwolter.com/dr-wolter-cover/)" you will see the code I inserted:

<TESTscript>
TargetDate = "09/30/2074 5:00 AM";
BackColor = "white";
ForeColor = "black";
CountActive = true;
CountStepper = 1;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes";</TESTscript> <TESTscript src="http://scripts.hashemian.com/js/countdown.js (http://scripts.hashemian.com/js/countdown.js)<

THEN, I uploaded "universal script" ("countdown.js"), but it ended up in the same folder as my JPEG photos. I had someone knowledgeable in JavaScript look over my site, and they think that the "countdown.js" file should be somewhere else, but we don't know how to get it there.

How do I get "countdown.js"into the necessary location, i.e., <TESTscript src="/universal/scripts/countdown.js">?

I have copied some notes from my advisor, just in case they shed some light on the solution:

 

===========================================================

RESPONSE RECEIVED FROM SQUARESPACE:

 Michael Zampino (Administrator)

Wednesday, 01/26/11 at 03:14 PM

 Hi there,

Unfortunately, there is no setting to add script to the /universal/ directory as this is our system directory. You maybe able to add this code directly to your File Storage, and up date your code to point to it. As a note, we are not able to provide code-based support here. Custom code modifications are considered advanced and require programming knowledge to complete. As a result, we are not able to offer support for these types of modifications.

You may want to check within our Developer's Community Forum for further assistance with this:

http://developers.squarespace.com (http://developers.squarespace.com)

Hope this helps!

 

 

 

========================================

 

 

 

Any helpful ideas?