Re: my script doesn't work.... sigh!
On Tue, 03 Feb 2004 21:01:50 GMT, Luca <drywaterfallNO SPAM@hotmail.co m>
wrote:
[snip]
[color=blue]
> I'm courious to understan something of your last message:
> Can i put this href again after the script path, like this:
>
> <a href="http://www.assoleader. it"
> onclick="window .open('http://www.mywebsite.c om/cgi-bin/click/go.cgi?http://t
> his.href', 'w'); return false;">
> www.Assoleader.it .</A> ?[/color]
Yes, but with a slight difference. this.href yields a string, so you would
concatenate it. For example,
<a href="http://www.assoleader. it/"
onclick="window .open('http://www.mywebsite.c om/cgi-bin/click/
go.cgi?'+this.h ref,'w');return false;">www.Ass oleader.it</a>
would be the same as
<a href="http://www.assoleader. it/"
onclick="window .open('http://www.mywebsite.c om/cgi-bin/click/
go.cgi?http://www.assoleader. it/','w');return false;">www.ass
oleader.it</a>
Line wrapping can be a pain sometimes, can't it. :)
[color=blue]
> Is it always necessary to put this in the "head" (I hadn't this (but
> whit, or without I have seen no changes are):
> <meta http-equiv="Content-Script-Type" content="text/javascript">
> ?[/color]
Strictly, if you use intrinsic events, such as onclick, you should include
that META element. It indicates the language used in the event code.
However, most (possibly all) browsers just assume JavaScript anyway so in
practice it's not really necessary. Because I try to conform to the
various specifications as best I can, I use that META element nevertheless.
Mike
--
Michael Winter
M.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)
On Tue, 03 Feb 2004 21:01:50 GMT, Luca <drywaterfallNO SPAM@hotmail.co m>
wrote:
[snip]
[color=blue]
> I'm courious to understan something of your last message:
> Can i put this href again after the script path, like this:
>
> <a href="http://www.assoleader. it"
> onclick="window .open('http://www.mywebsite.c om/cgi-bin/click/go.cgi?http://t
> his.href', 'w'); return false;">
> www.Assoleader.it .</A> ?[/color]
Yes, but with a slight difference. this.href yields a string, so you would
concatenate it. For example,
<a href="http://www.assoleader. it/"
onclick="window .open('http://www.mywebsite.c om/cgi-bin/click/
go.cgi?'+this.h ref,'w');return false;">www.Ass oleader.it</a>
would be the same as
<a href="http://www.assoleader. it/"
onclick="window .open('http://www.mywebsite.c om/cgi-bin/click/
go.cgi?http://www.assoleader. it/','w');return false;">www.ass
oleader.it</a>
Line wrapping can be a pain sometimes, can't it. :)
[color=blue]
> Is it always necessary to put this in the "head" (I hadn't this (but
> whit, or without I have seen no changes are):
> <meta http-equiv="Content-Script-Type" content="text/javascript">
> ?[/color]
Strictly, if you use intrinsic events, such as onclick, you should include
that META element. It indicates the language used in the event code.
However, most (possibly all) browsers just assume JavaScript anyway so in
practice it's not really necessary. Because I try to conform to the
various specifications as best I can, I use that META element nevertheless.
Mike
--
Michael Winter
M.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)
Comment