How To Call Outside Javascript File?
Example : Our Project File Folder Name "Sample" Another
Folder Name "Check".Check Folder Is Out Side Of Our
Project ?Check Folder Have Verify.Js File. My Question Is
How To Call Verify.Js File.

Answers were Sorted based on User's Feedback



How To Call Outside Javascript File? Example : Our Project File Folder Name "Sample" Ano..

Answer / varun

If you want to access a java script file from outside the
project folder then follow this:-

<script src="../verify.js" type="text/javascript">
</script>

this way where ever this file will be located; it will be
fetched.

thanks

Is This Answer Correct ?    5 Yes 0 No

How To Call Outside Javascript File? Example : Our Project File Folder Name "Sample" Ano..

Answer / sanjay

You can call in header section with following code.
<script src="myJavaScript.js"
type="text/javascript"></script>

Is This Answer Correct ?    3 Yes 3 No

How To Call Outside Javascript File? Example : Our Project File Folder Name "Sample" Ano..

Answer / vikas

Assuming the following directory structure:

~/Sample/project.html
~/Check/verify.js

to use the javascript file in project.html insert the below
code between the <head> and </head>:

<script src="../Check/verify.js" type="text/javascript">
</script>

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More ASP.NET Interview Questions

What are session variables?

2 Answers   Microsoft,


How would you implement inheritance using VB.NET/C#?

3 Answers   Siebel Systems,


What is the difference between web.config and machine.config in ASP.NET?

0 Answers   Amazon,


What is the Web.config file used for? a) To store the global information and variable definition for the application. b) Configures the time that the server-side codebehind module is called c) To Configure the Web Server. d) To Configure the Web browser.

8 Answers   HCL, IBM, Syntax Softtech, Vypin, WideVision Technologies,


What is http request and response?

0 Answers  






What are the steps involved to fill a dataset?

0 Answers  


What is a postback ispostback and autopostback in asp net?

0 Answers  


Why we are using mvc instead of asp.net? : Asp.Net MVC

0 Answers  


what are the server controls used in sitepath navigation?

1 Answers  


When Cookies are expired in ASP.NET?

0 Answers   Sans Pareil IT Services,


What are the benefits of Razor View?

0 Answers   NA,


what is AutoEventWireUp and what is the use of This property explain in details?

0 Answers   ITC Infotech,


Categories