Is URL Within An XML Tag Legal

Jul 18, 2009

In other words, can I do this:

I'm asking because when I press "Get Schema" Dreamweaver gives me an "Expected entity name for reference(13,16). The "image" tag line is line 16.

View 1 Replies


ADVERTISEMENT

Is It Legal To Use Element ID To Pass Data

Feb 28, 2011

I wrote a little live clock in JS (using Steve Levithan's "date format" code) that formats the time display according to a format string. I then find all elements by classname and search for a classname of "clock" and write the clock string to the innerHTML of every element I find.But recently I added another "feature". Rather than hard code a format string, I instead pass it in ID. Example:

<span class="clock" id="hh:mm:mm tt"></span>

..and the JS:

var doClock = function () {
var now = new Date();
var e = getElementsByClassName('clock');

[code]...

Note that I am passing the clock FORMAT STRING by using the span's ID. It works great...

View 18 Replies View Related

SetTimeout Seems To Return A Simple Integer As It's "id" Which Can Be Used To Clear The Timeout Ahead Of Time - Is Right / Legal

Oct 25, 2011

I've noticed that setTimeout seems to return a simple integer as it's "id" which can be used to clear the timeout ahead of time. So, in order to have multiple setTimeouts called (which requires the previous one to be cleared before the next one is called), I simply did this:

clearTimeout(setTimeout(function() {
/* some code */
}, 1000) -1);

Note the "-1"... each time this code is called, it starts a new setTimeout and clears "instance-1" which is supposed to be the previous instance. The idea is that this block can be called hundreds of times, and when the calling finally stops, the inner code is executed 1 second later. This SEEMS to be working (yes, even in MSIE!). Question is, am I fooling myself? Is this wrong?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved