PDA

View Full Version : java script with frontpage



Scrounger
07-19-2007, 01:18 AM
I'm hosting my son's Cub Scout website via GoDaddy. (http://www.cubpack88.org)The site is totally generated with FrontPage 2003. Can I use the really nice digital count down timer from this site on the site. I did some cutting and pasting but nothing shows. It sorta trashed some of my formatting too. Glad I made a backup before I started.

Regards,

Matthew

jscheuer1
07-19-2007, 06:18 AM
FP can be tricky with javascript. However, I cannot be sure, from your description of the problem, whether this is a result of FP peculiarities with javascript, or simply the result of inexperience with javascript and HTML in general. If it is in whole or in part the fault of FP, this will be helpful:


Well, you might be able to configure FP so as to allow you to insert code like this without it mangling it so much. Read the manual or Google for help on that. Another alternative, and what I recommend in all cases like this, is to get your page looking like you want using FP but without any scripts. Save a copy of that somewhere to work on later if the need arises. Next open the page in notepad or simple text (make sure word wrap is turned off in either of these) and add the scripts in according to the installation instructions, including any customization you've added. Never load this version of the page into FP ever again. To preview it locally, use the browser. To upload it, use FTP (preferred) or your host's online uploading tool.

Here is trick I ran across* that should stop FP from changing scripts but, since I do not use FP, I haven't tested it:

In a text editor open the page whose code you wish to preserve.

At the beginning of the section of code you wish to prevent FrontPage from modifying, add the following line of code:


<!--webbot bot="HTMLMarkup" startspan -->

At the end of the code section, add the following line of code:


<!--webbot bot="HTMLMarkup" endspan -->

Save the changes to the file. The next time the file is opened in FrontPage, FrontPage will not attempt to alter the code between the two HTMLMarkup tags. You still need to put the script into the page with a text editor.

*Posted in these forums by usace-lrc and perhaps others.

Sliight
07-19-2007, 06:35 AM
I'm using GoDaddy, and FP 2000 for my site. Granted since I found this forum a couple weeks ago I've since stopped using FP for anything except the html code and preview. I've had zero problems with scripts. With that in mind, FP may alter things if you mess around with the main FP editor, which generates code for you.

Another consideration is that you can't just cut and paste from a websites script page directly into FP. You need to cut and paste it into notepad or something first, then you can cut and paste it into the HTML tab of FP.

Your site looks very good... I'm sure you know HTML well, but I know when I started messing with scripts I didn't place the correct stuff in the <head></head> section and that of course caused issues.

If the copy/paste using notepad as the middle man doesn't work... maybe just tell us where you want the countdown timer at in the page? Also link the exact timer you want... Could post the code you'd want here...