> This is the Perl Win32 Users list.
> It is not devedge.netscape.com or
> msdn.microsoft.com, groups where
> JavaScript matters are regullarly
> dealt with in a most efficient manner.
> 
> This is not even the Perl Win32 Web
> list, where such questions have not met
> an alltogether agressive response.
> 
> BTW, you're using the onClick even
> on a TABLE CELL?  Don't bother, it's
> not supported. Try putting it on an
> anchor.  That's the <A href> tag.
> Then make sure your link is correct
> in function func() by getting it to
> send to alert() the same value it's 
> sending to window's open method.
> Is there a question mark or oblique
> missing before you insert params?
> 
> lee 
> 
> Alexei Danchenkov wrote:
> > 
> > I am getting no event handling on using
> >   print "<TD HEIGHT=17 WIDTH=20% onClick=\"func('$para')\">\n";
> > in Netscape 4.76
> > 
> > The script part is very simple:
> > <SCRIPT LANGUAGE="JavaScript">
> > function func(para) {
> >   window.open("index.cgi" + params, "_parent");
> >   }
> > </SCRIPT>
> > 
> > What the heck?
> -- 
> 
> Lee Goddard     <[EMAIL PROTECTED]>
> -------------------------------------
> Perl : XML : XSLT : XHTML / JS : Java
> 
> --__--__--

Actually, Lee is right, this is NOT the place for this discussion.  BUT,
this does work on IE 5.01 SP1, but not in Netscape.  I have put the onclick
event on both <TD> and <TR> tags in IE with expected results.  The
limitation is Netscape.  

Also, Alexei, in your code you use "onClick" as an event handler.
JavaScript is case sensitive just like Perl.  While this works in my version
of Netscape, you are asking for trouble in the long run by not conforming to
the standards.  Below is what I used in IE successfully.  

Remember IE has a much better DOM then Netscape <6.x.  Don't know how the
new version is, but if you need some functionality and are using an
intranet, then IE cant be beat at this point in time.  You could also use a
browser detection script and serve up the right format based on the browser.


Script below:

<HTML>
<HEAD>
<TITLE>Testing</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function func(para) {
  window.alert(para);
  }
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#800000"
ALINK="#FF00FF" BACKGROUND="?">
<TABLE ALIGN="left" BORDER=1 CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
<TR ALIGN="left" VALIGN="middle">
        <TH>Heading 1</TH>
        <TH>Heading 2</TH>
<TR ALIGN="left" VALIGN="middle"  onclick="func(1)">
        <TD onclick="func(1)"> Value 1 </TD>
        <TD onclick="func(1)"> Value2 </TD>
</TABLE>
</BODY>
</HTML>

Joe Frazier, Jr
Technical Support Engineer
Peopleclick.com
800-841-2365
[EMAIL PROTECTED]




_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to