Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Nestcape ignores my javascript


Message #1 by "jean cassels" <casselsj@c...> on Wed, 14 Mar 2001 18:34:29
Netscape 6 does not run the script even if there is one error anywhere. IE 
is a little more forgiving in this respoect. I had this problem too. My 
script was running fine in IE but Netscape 6 just totally ignored it. You 
would like to throughly check your script. As I said, even if there is one 
error, it will skip everything and it also does not give any error 
message. Look in your status bar though if it displays any error message 
as "Page loaded but with errors"

> I have a question on something I noticed when using Netscape6 to view a 
> site that I am developing.  It  ignores any  Javascript function that is 
> referenced from HTML ( inside or outside of VB script)  within an anchor 
> tag, using the Javascript : protocol.  There is absolutely no problem 
when 
> using Internet Explorer.  It works fine.  So what's up with Netscape6??
> 
> There are links that reference home grown Javascript functions.  These 
> functions simply pass a variable that indicates a particular sorting 
> order, to another Javascript function which re-submits the page with the 
> variable to indicate the desired sort order.  Using IE, it works fine.  
I 
> tried stripping the HTML out of the VB script.  That was OK with IE, but 
> still not with Netscape.  I tried playing around with the case of the 
> function names.  I also tried double quotes, single quotes, no quotes.  
> Still Netscape seems to be ignoring the JavaScript protocol.
> 
> Could it be having a problem with the fact that it is calling Javascript 
> functions from within an ASP?  Or is it just the  protocol property of 
> Javascript:  that it doesn't like??
> 
> Do you have any ideas?
> 
> 
> Here is the beginning of my ASP where my Javascript funtions are located.
> 
> <%@ LANGUAGE = VBSCRIPT %>
> <% Option Explicit %>
> <% Response.Buffer = True %>
> <% Response.Expires = 0 %>
> <html>
> 
> <head>
> <title>Accounts Payable</title>
> <link REL="stylesheet" TYPE="text/css" HREF="oru.css">
> <script Language="JavaScript">
> 
> function SortByInvoiceNumber() {
> 	SubmitForSort("invcnbr");
> }
> 
> function SortByInvoiceDate() {
> 	SubmitForSort("invcdate");
> }
> 
> function SortByPOK() {
> 	SubmitForSort("pok");
> }
> 
> function SortByGrossAmount() {
> 	SubmitForSort("grossamt");
> }
> 
> function SortByStatus() {
> 	SubmitForSort("status");
> }
> 
> function SortByPaymentDate() {
> 	SubmitForSort("chkdate");
> }
> 
> function SubmitForSort(requestedSequence) {
> 	frmInput.sequence.value = requestedSequence;
> 	frmInput.pagenumber.value = 1;
> 	frmInput.submit();
> }
> 
> function ShowPageOne() {
> 	SubmitPageChange(1);
> }
> 
> function ShowPageTwo() {
> 	SubmitPageChange(2);
> }
> 
> function ShowPageThree() {
> 	SubmitPageChange(3);
> }
> 
> function ShowPageFour() {
> 	SubmitPageChange(4);
> }
> 
> function SubmitPageChange(intGoToPage) {
> 	frmInput.pagenumber.value = intGoToPage;
> 	frmInput.submit();
> }
> 
> 
> </script>
> </head>

  Return to Index