473,608 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using javascript:func tion() in Netscape 4.x

All,

I am trying to use a URL to call some javascript to do something, which
is working fine in IE6 but using the same code in Netscape 4.79 I cannot
get it to work at all.

I get no errors, but no results either, Netscrape just sits there and
does nothing ?

Below is an emample of what I am attempting to do. I have had a search
through previous posts and tried to implement some of the suggested
solutions but non seem to provide me with a solution in Netscape, even
though all of the seem to work correctly in IE

Can anyone spot what I am doing wrong ?

Thanks for the help in advance.
Martin

file1.js

function GenerateURL()
{
alert('Hello');
}

example1.jsp

<script language="javas cript" src="c:\file1.j s"></script>
<html>
<body>
<a href="javascrip t:GenerateURL() ;">Example1</a>
<br><br>
<a href="javascrip t:void(0)" onclick="Genera teURL();return
false">Example2
<br><br>
<a href="javascrip t:GenerateURL() ;void 0">Example3</a>
<br><br>
<a href="javascrip t:void(0)" onclick="Genera teURL()">Exampl e4</a>
<br><br>
<A HREF="#" onClick="Genera teURL()">Exampl e5</a>
</body>
</html>

Note: It is split across the two files for a reason

Jul 20 '05 #1
1 3790
I wonder if it's the c:\ which is causing the problem. Put the JS file in
the same dir as the example1.jsp and just put
<script language="javas cript" src="file1.js"> </script>

Netscape on my machine when you view a file on the machine ina dir structure
displays file:///C|/ so the best way is to reference it either absolutly
(from the web server POV) or relative.
Hope that helps

Stu

"Martin O'Rourke" <Ma************ @oracle.com> wrote in message
news:3F******** *******@oracle. com...
All,

I am trying to use a URL to call some javascript to do something, which
is working fine in IE6 but using the same code in Netscape 4.79 I cannot
get it to work at all.

I get no errors, but no results either, Netscrape just sits there and
does nothing ?

Below is an emample of what I am attempting to do. I have had a search
through previous posts and tried to implement some of the suggested
solutions but non seem to provide me with a solution in Netscape, even
though all of the seem to work correctly in IE

Can anyone spot what I am doing wrong ?

Thanks for the help in advance.
Martin

file1.js

function GenerateURL()
{
alert('Hello');
}

example1.jsp

<script language="javas cript" src="c:\file1.j s"></script>
<html>
<body>
<a href="javascrip t:GenerateURL() ;">Example1</a>
<br><br>
<a href="javascrip t:void(0)" onclick="Genera teURL();return
false">Example2
<br><br>
<a href="javascrip t:GenerateURL() ;void 0">Example3</a>
<br><br>
<a href="javascrip t:void(0)" onclick="Genera teURL()">Exampl e4</a>
<br><br>
<A HREF="#" onClick="Genera teURL()">Exampl e5</a>
</body>
</html>

Note: It is split across the two files for a reason

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2569
by: Patrice | last post by:
Hi, I'm trying to use a javascript function passing a vb variable. I don't understand why it doesn't work. Can someone help me? Thanks in advance. Here is my javascript function used to show a text:
5
2347
by: David C. Holley | last post by:
How would I run a JavaScript function in a *.asp page and then pass the value returned to VBScript for further processing? ***Converting the function to VBScript is *NOT* an option.
4
1334
by: Don | last post by:
I have a client page that employs hover buttons. They work just fine in IE. But, when using Netscape, they intermittently won't display. When they don't display, all that shows is a gray box the normal size of the button, with a red "x" inside the box at the left. Any idea what's going on here? Thanks, Don -----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
2
4749
by: Nasir Wasim | last post by:
How can Access DIV Properties in Script while using Netscape 7.2. I want to use the div id with it's Visibility and left propertyin script but it's not working :-( Main File : ----------- <div id="index" style="position:absolute; width:200px; height:115px; z-index:1; left:-400px; top: 286px visibility:false;">
5
25845
by: elsenraat_76 | last post by:
Hello! I was wondering if someone could help me out with a problem I'm having? I'm trying to input a javascript value into an anchor tag (from a function), but don't have an event to call the function...if that makes sense. Here's what I mean... I have a javascript array set up like so: <script language="javascript" TYPE="text/JavaScript"> //custom object constructor
2
3005
by: Jim Hammond | last post by:
The script function in the code below works fine when it is JavaScript, but when I try to use C#, the function doesn't get executed. <body MS_POSITIONING="GridLayout"> <form id="Form1" name="Form1" method="post" encType="multipart/form-data" runat="server" VIEWASTEXT> <asp:button id="Button3" runat="server" Text="TAKE PHOTO"></asp:button> </form>
4
2381
by: mantrid | last post by:
Can anyone see why the checkbox in the code below doesnt get ticked when the textbox is changed ***This javascript function is called in the textbox's onchange event to check it when it is changed***** <script type="text/JavaScript"> function changed(x){ document.getElementById(x).checked=true;
6
10618
by: Ajit Goel | last post by:
Hi; We have a Javascript function which I have been tasked to move to a CSharp class. This javascript function uses Regular expression extensively. This function has a string input parameter and output parameter. My questions are: a. Can I expose a function in my CSharp code and internally call a javascript function?? Is this a good idea?? b. Do we have any tool which can convert a javascript function into
1
13680
by: santhoskumara | last post by:
I am using Internet Explorer browser, I want to know how to clear cache and cookies using javascript function or java, when each time the page is loaded. i know to do manually in IE using TOOLS option in IE. but i want to know using javascript function. urgent please can anyone advice me. with regards A.santhosh kumar
10
7292
by: evicailieva | last post by:
A have a php scrip where I call a JavaScript function. I don't know why, but it doesn't work. At the beginning, when I was writing the script it was working but now it's not. I don't know wхat to do. Please help me. Here is the php code: function print_rezBilet($rezBilet,$posRezBilet1){ $step=$_SESSION; $max=$_SESSION; $curr= $_SESSION+$step-1 ; if($max<$curr) $curr=$max;
0
8075
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8363
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6836
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5494
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3983
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4044
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2487
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1614
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.