On 10/18/05, Martin Heiden <[EMAIL PROTECTED]> wrote:
> window.location.href = 
> '?lenya.step=showscreen&lenya.event=addAsset&lenya.event=addAsset&lenya.usecase=asset';

That would also work, but only because when Netscape created
JavaScript, they correctly assumed most developers would not read the
manual, and each function tries to make sense of garbage input.  Every
browser (except MSIE in some place, but this is not one of them) made
certain to handle everything the same as Netscape.

The "location" object is a string with extra features, and when
associated with a window or frame, any change also changes what is
displayed.  The "href" attribute is redundant, because using the
object directly always produces the same results.  The whole object is
returned by either "location" or "location.href".  Setting either the
"location" object or the "location.href" tries to figure out what was
meant.  In this case, we are setting "location.search".  Because
JavaScript is so forgiving, all of these are equivalent:

window.location = "?myQuerystring";
window.location.href = "?myQuerystring";
window.location.search = "?myQuerystring";
window.location.search = "myQuerystring";

The first two see the question mark, and decide you really meant to
change "location.search".  The last two change "search" directly, and
JS is smart enough to ignore the redundant question mark in the third.
 The last one is the best use of the object model, but the first is
the shortest to type and the easiest to use.

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to