- From: Peter Foti (PeterF) <PeterF@SystolicNetworks.com>
- Date: Thu, 26 Jul 2001 11:11:45 -0400
- To: "'www-html@w3.org'" <www-html@w3.org>
Hello, Just wanted to point out that the <noscript> tag typically accompanies a <script> tag. Therefore, if you wish to handle the lnyx case, maybe something like this would work (don't forget to surround your script with HTML comments): <script type="text/javascript"> <!-- function _win(url) { window.open( url, 'PreviewWin', 'width=700,height=500,resizable=yes,scrollbars=yes,status=1'); } // --> </script> Click the following button <script type="text/javascript"> <!-- document.write("<a href='javascript:_win(\"link1.html\")'>"); document.write("<img src='button.gif' alt='button'><\/a>"); // --> </script> <noscript> <a href="link1.html"><img src="button.gif" alt="button"></a> </noscipt> This should solve your problem, although it's quite a bit of work for a single link. :) Note that DJW's solution is much shorter and easier to implement. I just wanted to show you a solution using <noscript>. :D Regards, Peter Foti > -----Original Message----- > From: www-html-request@w3.org > [mailto:www-html-request@w3.org]On Behalf > Of Jungshik Shin > Sent: Wednesday, July 25, 2001 2:33 PM > To: www-html@w3.org > Subject: suggestion: althref for <a> in the spirit of 'alt for <img>' > > > Hello, > > I've been thinking about how to make pages with lots of hrefs to > 'javascript:......' > accesible via browsers not supporting Java script (such as Lynx). At > first <noscript> > appeared to solve the problem. I tried the following with Lynx 2.8.x > > <script language="javascript"> > function _win( url) > { > window.open( url, 'PreviewWin', > 'width=700,height=500,resizable=yes,scrollbars+=yes,status=1'); > } > </script> > > Click the following button > <a href='javascript:_win("link1.html")'> > <img src="button.gif" alt="button"></a> > <noscript><a href="link1.html"><img src="button.gif" alt="button"></a> > </noscript> > > A problem with this is that Lynx displays *both* links and > it's natural > that it should do because there's no way for Lynx to figure out > the first link should be ignored. > > I thought that it'd be nice if there's a kind of alt-attribute > equivalent for <a>. That is, something like the following would > be nice: > > <a href="javascript:_win('link1.html',abc, def)" althref="link1.html"> > Link1</a> > > > Therefore,I searched for > HTML 3 and HTML 4 specs if some sort of alt tag is allowed > as an attribute for <a>. It turned out not. Then, I searched > for www-html > archive if anybody has suggested it. I hit upon a suggestion > made in January 1998, but its purpose is different than mine. > It was suggested to address the problem of inaccessible (due to > URL changes and other reasons) pages and slow connections. My > proposal is to support text-mode browsers (and other browsers > not supporting some of features available in graphic browsers) > without removing those features for users of browsers supporting > them (e.g. java script) > > My search of www-html was not so extensive and this may have been > discussed already, in which case I apologize for duplication > and I would like you to point me to where I could find the previous > proposal. > > Thank you for your kind consideration of my proposal, > > Jungshik Shin > > > > > >
Received on Thursday, 26 July 2001 11:06:21 UTC