all groups > dotnet jscript > april 2004 >
You're in the

dotnet jscript

group:

Newbie Question


Newbie Question Kate_Luu
4/30/2004 9:28:51 AM
dotnet jscript:
How can I execute one of the function which locate in seperate file.js when
the user click the <A> tag?

example: <A href=( what I should do here? )

Thanks you all in advance and have a great day...

Re: Newbie Question S. Han
4/30/2004 12:57:47 PM
At the beginning of the code include the file in which contains the function
that you'd like to execute:
<head><title>...</title><script src="file.js"></script></head>

Then
<a href="Javascript:myfunction();" >...

--

This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

Re: Newbie Question Paras Wadehra
4/30/2004 2:56:35 PM
First of all, include the JS file in your page as:

<script language="JavaScript" src="JavascriptFile.js">

and then on the click of a link write the following code:

<a href="javascript:functionName()">

--
Paras Wadehra

You One Stop Entertainment Guide - http://www.paras.2ya.com/

[quoted text, click to view]

Re: Newbie Question Kate_Luu
5/9/2004 9:27:19 PM
Thanks you all for your help, I'm deeply appreciated. Take care and have a
good one...

Kate


[quoted text, click to view]

AddThis Social Bookmark Button