On 8/2/05, Ben Curtis [EMAIL PROTECTED] wrote:
Good catch. Now we're talking a good excuse for regular expressions.
Instead of my recommendation of:
a[i].getAttribute('href').toUpperCase().indexOf(HTTP://) == 0
...I now recommend:
On Jul 29, 2005, at 5:53 PM, Andrew Krespanis wrote:
On 7/30/05, Thierry Koblentz [EMAIL PROTECTED] wrote:
I think you ought to check specifically that 'http://' is at the
beginning of the string.
Good point, I'll change this.
A more reusable approach would be to check for '://', as
In a controlled input situation (eg: a web developer's blog), a
solution like Patrick Lauke's 'type' link styling expermient (
http://www.splintered.co.uk/experiments/38/ ) adds more useful info to
the markup and can be used the same way; but when a client is in
control of the content you set
Andrew Krespanis wrote:
The problem was that we wanted to handle links to non-html files in a
different manner than regular links. Ideally, it shouldn't require any
more effort from the content author.
The following page shows a simple demonstration of the solution:
Hi all,
I'd appreciate your feedback about this technique that does not rely on
hooks; it only uses the href attribute...
http://www.tjkdesign.com/articles/popups.asp
Thanks,
Thierry | www.TJKDesign.com
**
The discussion list for
Thierry Koblentz wrote:
Hi all,
I'd appreciate your feedback about this technique that does not rely on
hooks; it only uses the href attribute...
http://www.tjkdesign.com/articles/popups.asp
Looks good Thierry.
One thing though-- what happens to mailto: links?
i know in an *old* switcher
Hi Brian,
Looks good Thierry.
Thanks
One thing though-- what happens to mailto: links?
Good point! To be honnest with you I didn't even think about these :)
But they are safe because I'm checking for an HTTP string inside the
attribute's value.
I think this method could be used to style
On Jul 29, 2005, at 12:43 PM, Thierry Koblentz wrote:
One thing though-- what happens to mailto: links?
Good point! To be honnest with you I didn't even think about these :)
But they are safe because I'm checking for an HTTP string
inside the
attribute's value.
I think you ought to
I think you ought to check specifically that 'http://' is at the
beginning of the string.
Good point, I'll change this.
a href=/protocols/about_http.htmlFind out about HTTP/a
a href=/affiliate.asp?ref=http://foo.com/bar.php;Set your
affiliation reference cookie/a
And other than
I use a little javascript to make open pop up link and this is Valid
XHTML Strict!.
I know maybe there are many master here, and i just share my little knowledge.
Below this code and example :
1. create javascript code and save as .js file
--
function externalLinks() {
if
On 7/30/05, Thierry Koblentz [EMAIL PROTECTED] wrote:
I think you ought to check specifically that 'http://' is at the
beginning of the string.
Good point, I'll change this.
A more reusable approach would be to check for '://', as this is what
differentiates 'mailto:', relative paths and
A more reusable approach would be to check for '://', as this is what
differentiates 'mailto:', relative paths and 'http://' links, but will
still allow you to use the script on secure pages.
Whenever dealing with href maniputlation, it's always good to keep
'https' in the back of your mind
Something similar to this came up at work last week and I think it
would be good to tack it on to this thread (hopefully there's enough
relevance!).
The problem was that we wanted to handle links to non-html files in a
different manner than regular links. Ideally, it shouldn't require any
more
13 matches
Mail list logo