This Message Forum is no longer in use

Please use the new Bravenet Help Forums FOUND HERE

General Forum
This Forum is Locked
Author
Comment
View Entire Thread
Re: borrowed html

When you are in the Bravenet content editors, editing one of your pages, note that the little warning about Javascript, only exists on the side-bar edit windows. The main content window doesn't have that warning, nor does it have that restriction. For some odd reason, they don't want anyone messing with their side-bars. I have my guesses why, but that's beyond the scope of this question. The point being, you can use all the Javascript you want, as long as you only use it in the main content area. But read on.

There isn't anything really wrong with the code, and it can be made to work on your site. The clock code worked just fine for MacMac, because he probably didn't use the Website Wizard. And that's fine. I don't use it for any other reason than trying to find solutions to other user's problems. The problem exists with the way the Wizard deals with "return" characters and the commenting in the Javascript.

Below is a clipping from one of the clocks on your web site. In the Javascript, just after the


Below is what the code looks like, after the Wizard's editor gets done with the code. Note that there are no more "return" characters. Strictly speaking, HTML and Javascript do not require "return" characters, as long as your using pure code. It's when you start sticking in comments, that the problem starts.



What is happening in the above code is that, because there are no "return" characters in the code, the Javascript comment is disabling the code. But the Javascript comment character is needed to prevent the HTML comment terminator from being read by the Javascript interpreter. What a conundrum.

Well the answer is really pretty simple. Remove all commenting from Javascript before inserting it in a Wizard design. Sometimes authors will put their name and url in the Javascript comments and request that you include that in the code. If you want to credit the author, do it another way. Get the comments out of the Javascript.

Below is the code I clipped from your site and then modified to work in the Wizard. You should be able to do a copy/paste directly from this post. Or, you can just remove the comments from your existing code. Note that all the commenting is removed. Here is a link to a Wizard test page that shows the clocks working. The extra one at the end is a gratuitous addition for myself.



London


Phoenix



Re: borrowed html

Photo Sharing and Video Hosting at Photobucket

Here's your clocks (Qlocks) displayed on your site using Martin's code...

Re: borrowed html

What wonderful people you are. Such a detailed explanation is going to need my full attention but I am sure I will then have learnt something very valuable.
It will have to wait until this afternoon. I am about to have breakfast and then off to give some lessons to elderly people who are 10 to 20 years younger than me. Great to still feel useful.
Many, many thanks and I will report progress.

Re: borrowed html

I've tried on www.vets4510.bravehost.com a dozen times but keep getting London and Brisbane 4 times instead of those I have carefully changed to follow the way you showed me. Can't figure out where I am going wrong. This is what I have:














src="http://www.qlock.com/live/qlock.js" type=text/javascript>

Re: borrowed html

The codes didn't appear in my reply ????????????????

Re: borrowed html

NEED to KNOW how to POST HTML properly to these forums if you don't then it won't work in your posts

Re: borrowed html

Well, I looked at the web site you mentioned, "www.vets4510.bravehost.com". Other than the one in your side-bar from "poodwaddle.com", I don't see any code for a clock. That one works fine in the side-bar because it's a shockwave-flash type. But any Javascript in the side-bar would be deleted by the Wizard's editor.

The Wizard is only going to allow the Javascript to work if it is in you main content area. If you are trying to put it in any of the side-bars, it is not going to work. But on that site, I don't see much space in your main content area. All of your text is images and overlaps the side-bar areas on smaller browsers windows. Is there a specific page that you are putting the clock code on?

Don't worry about the code not showing in the forum. The basics of making the HTML code display in the forum is fairly simple, but when you mix it with posting CSS, Javascript, and various mouse events, it gets pretty messy. It is far easier to simply post a URL to the problem area or a test page. We can then view the code ourselves.

Re: borrowed html

Thanks for your time Martin. I put them on the second page but as I said they came up London and 3 times Brisbane. I took them off and decided to try something else. I now have the times I wanted in a much neater way which was simple to copy and paste. I will be doing the other site with American, Canadian, European towns.

Re: borrowed html

Browser: xselans_cool@hotmail.com,3