Re: Very strange Nutscrape behavior - PHP/JS/DHTML???

From: Date: Tue, 27 Feb 2001 02:17:30 +0000
Subject: Re: Very strange Nutscrape behavior - PHP/JS/DHTML???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41777@lists.php.net to get a copy of this message
Hello Brian, JavaScript book, that I have, mentions some NN cannot display JavaScript code correctly when user views HTML source code. To work around this, author says disable JavaScript on NN and display source. How about try this to see what the browser really get? (PHP sends the same output for all browsers unless you explicitly does so, I believe. I guess it is due to the browser implementation difference or bug in NN.) Regards, -- Yasuo Ohgaki > This could be a JS issue but right now I'm really > not sure. > > I have this code, > > } elseif ($cat == 'bikes' && $sub_cat == 'Road') { > $i = 1; > while ( list($type,) = each($bikes[$sub_cat])) { > echo "<TD><IMG SRC=\"images/spacer.gif\" WIDTH=\"25\" > HEIGHT=\"1\" > ALT=\"\" BORDER=\"0\"></TD>\n"; > echo "<TD><A HREF=\"#\" CLASS=\"menu\" > onMouseOver=\"popUp('HM_Menu$i',event)\" onMouseOut=\"popDown('HM_Menu$i')\" > onClick=\"return false\">$type</A></TD>\n"; > $i++; > } > echo "<SCRIPT LANGUAGE=\"JavaScript1.2\" SRC=\"HM_Loader.js\" > TYPE=\"text/javascript\"></SCRIPT>"; > > Which creates this (in IE), > > <TD><IMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" > ALT="" > BORDER="0"></TD> > <TD><A HREF="#" CLASS="menu" > onMouseOver="popUp('HM_Menu1',event)" > onMouseOut="popDown('HM_Menu1')" onClick="return > false">Trek</A></TD> > <TD><IMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" > ALT="" > BORDER="0"></TD> > <TD><A HREF="#" CLASS="menu" > onMouseOver="popUp('HM_Menu2',event)" > onMouseOut="popDown('HM_Menu2')" onClick="return > false">Schwinn</A></TD> > <TD><IMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" > ALT="" > BORDER="0"></TD> > <TD><A HREF="#" CLASS="menu" > onMouseOver="popUp('HM_Menu3',event)" > onMouseOut="popDown('HM_Menu3')" onClick="return > false">LeMond</A></TD> > <TD><IMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" > ALT="" > BORDER="0"></TD> > <TD><A HREF="#" CLASS="menu" > onMouseOver="popUp('HM_Menu4',event)" > onMouseOut="popDown('HM_Menu4')" onClick="return > false">Moots</A></TD> > <SCRIPT LANGUAGE="JavaScript1.2" SRC="HM_Loader.js" > TYPE="text/javascript"></SCRIPT> > > However, in NN it creates, > > <TD><A HREF="#" CLASS="menu" > onMouseOver="popUp('HM_Menu1',event)" > onMouseOut="popDown('HM_Menu1')" onClick="return > false">Trek</A></TD> > <TD><IMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" > ALT="" > BORDER="0"></TD> > <TD><A HREF="#" CLASS="menu" > onMouseOver="popUp('HM_Menu2',event)" > onMouseOut="popDown('HM_Menu2')" onClick="return > false">Schwinn</A></TD> > <TD><IMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" > ALT="" > BORDER="0"></TD> > <TD><A HREF="#" CLASS="menu" > onMouseOver="popUp('HM_Menu3',event)" > onMouseOut="popDown('HM_Menu3')" onClick="return > false">LeMond</A></TD> > <TD><IMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" > ALT="" > BORDER="0"></TD> > <TD><A HREF="#" CLASS="menu" > onMouseOver="popUp('HM_Menu4',event)" > onMouseOut="popDown('HM_Menu4')" onClick="return > false">Moots</A></TD> > > Specifically the line, > echo "<SCRIPT LANGUAGE=\"JavaScript1.2\" SRC=\"HM_Loader.js\" > TYPE=\"text/javascript\"> > is simply missing and the JS of course does not work. > > Now, if I reload the page the Jscript WILL work however the line, > echo "<SCRIPT LANGUAGE=\"JavaScript1.2\" SRC=\"HM_Loader.js\" > TYPE=\"text/javascript\"> > still does not show up in the source..... > > This is version 4.08 and it only appears to happen with NN furthermore it > only happens when > the browser is first loaded. Once I go to the page and refresh it I can go > to other pages, > even other sites and come back to it and it will still be fine. But, as soon > as I restart the browser and go to the site it happens again. > > What do you all think? Is this a PHP, Javascript, or DHTML issue? > > -Brian > ************* > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#41777) next »