How to call external js file to custom master page

Hi all,
I have created custom master page and i need to call external .js to master page. i tried every aspect of including this in master page. but this js is not running. 
<script src="test.js" type="text/javascript"></script>
i have put the above calling js script to head tag. 
And, When i am running the site, the js file is not loading. 
How to load this js file to custom master page. 
Thanks,
Rakesh

I have placed js file in same folder of custom master page. 
This is quite annoying and i am struggling to call it. 
js file is in same master page folder still i am calling it through whole URL as
<script type="text/javascript" language="javascript" src="http://SharePoint/sites/SiteName/_catalogs/masterpage/Master%20Page%20Template/test.js"></script>
Still it is not working.
Now i am not sure what is wrong here. 
Please help..
Thanks in adv !!
Rakesh

Similar Messages

  • Call External Javascript file in Custom Visual WebPart

     Hi..
     How to call external javascript file in Custom Visual WebPart in sharepoint 2010
    Ravindranath

    Hello,
    Download that script and save in layout folder or within a site. Then use below script tag in webpart:
    <SharePoint:ScriptLink ID="ScriptLink2" Name="location/jquery-1.5.min.js" runat="server" OnDemand="false" Localizable="false" />
    http://stackoverflow.com/questions/5068663/how-to-call-an-external-javascript-file-from-a-webpart
    http://stackoverflow.com/questions/5243821/external-javascript-file-in-sharepoint-web-part
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to define scriptmanager timeout property in custom master page

    I have a custom master page. When you create a custom master page then another page with similar name is automatically created by SharePoint.
    For e.g. my master page name is mymaster.html so sharepoint created mymaster.master file with it. I want to increase the AsyncPostBackTimeout property of ScriptManager. I opened mymaster.html in SPD but didn't find any code there. Then I opened mymaster.master
    in SPD and I can see the ScriptManager code written as below.
    <asp:ScriptManager id="ScriptManager" runat="server" --more code here-- />
    Problem is, SPD doesn't allow you to edit .master page and I can't add this code in my .html master page file. How to edit this code in SPD?

    Hi Frank,
    How did you mean that you could not edit master page with SharePoint 2010 Designer?
    You can edit master page by the followings:
    Open the site with SharePoint 2010 Designer
    Click on Master Pages on the left launch, then click on mymaster.master
    Edit the file, then you can add the code. If you cannot edit the file, please click on
    Advanced Mode in Editing section at the top
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to call external jar files in EJB project for CE

    Hi,
    I would be thankful if someone could help me with this -
    I need to call the external jar files into my EJB project - Here is what I have done and am getting runtime exception as  -
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
    1. Created a EJB  project" HelloWorld "  using Java perspective in NWDS 7.1 called with client as HelloWorldClient and EAR project as HelloWorldEAR.
    2. Am working on HelloWorld project (1st one).
    3. In my code I am instantiating a class which is a class in one of  the external jar file that I need to refer in my project.
    4. I have set the Java Build path but it works only for the compile time and fails during runtime.
    5. Have read I need to create external library DC and refer in my project "HelloWorld".
    Can anyone help me with exact steps what needs to be done - during creation of external library project and then for my "HelloWorld" EJB project. How would I be able to reference or set the external library project in my EJB project?
    Looking forward to hear from experts.
    Thanks,
    Shiv
    Edited by: Shiv Khullar on Aug 30, 2010 9:39 PM

    Hi Edson,
    I tried it , but it still gives me runtime exception.
    javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
    Steps I performed are -
    1. Created a library project and created 2 Public parts "Compilation" and "Assembly"
    2. Build the library project.
    Now in my EJB project using Project Explorer - set the classpath and added both compilation jar and assembly jar files.
    This is how the classpath entries for external library looks like -
    <classpathentry kind="lib" path="/LocalDevelopmentLocalDevelopmentexternallibrarypdftoolsforwatermarkingdemo.sap.com/gen/default/public/WatermarkAssembly/lib/java/demo.sap.comexternallibrarypdftoolsforwatermarking~WatermarkAssembly.jar"/>
         <classpathentry kind="lib" path="/LocalDevelopmentLocalDevelopmentexternallibrarypdftoolsforwatermarkingdemo.sap.com/gen/default/public/WatermarkCompilation/lib/java/demo.sap.comexternallibrarypdftoolsforwatermarking~WatermarkCompilation.jar"/>
    I have also added the jar files I used in my external library project as "User Library" from Java Build Path . I dont do it , then the code fails during compilation itself.
    Regards,
    Shiv

  • How to call a .jar file in JSP

    Hi Folks,
    I would like to know how to call a .jar file in a JSP page..
    Thanks in adv.

    Any web app creating tutorial can. You know, if this doesn't ring a bell with you at all, I don't really feel inclined to explain it to you because I think you shouldn't yet be dealing with JEE in the first place.
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WebComponents3.html

  • How to call external files from java?

    How to call external files in java. For example how to call a *.pdf file to open in its default editor(say Acrobat), or a *.html file to open in the default browser or a *.txt file in a notepad etc..,
    In my program i have *.chm (Compiled Windows HTML Help) help file. how to open it in its default editor it?

    Jayarathina_Madharasan wrote:
    no one answered my questionHi what wrong did i do...basically insulted all the volunteers here who took the time to consider your question and try to offer you help. Other than that, you did nothing wrong.
    From JavaRanch :
    And even if an answer doesn't solve your problem, even if it should totally miss the point - the best thing to do to motivate others to continue trying to help you is showing respect and gratitude for the investment of time that was put into dealing with your issue.
    Edited by: Encephalopathic on Apr 14, 2008 10:01 AM

  • How to call a jar file from oracle forms (6i)

    Hi,
    I'm working with oracle 6i. I want to know that how to call a .jar file from forms menu. when I use HOST('<path>\test.jar') it is working in 'Client Server' any way. but the problem is I use application server in order to run my form. so my form is in the server and I run the form via clients web browser. in that case above solution will not work. if any body knows how to overcome this problem please reply.
    thanks.
    duminda

    I created a bean area and set the class name as implementation class. within that java bean class I called to a bat file which consists of the execution command of the jar file ( because i don't know how to call .jar file from my bean class directly).
    then i tried to run it in application server. its still not running.
    can you tell me what i have to do within my bean class? or can you suggest any solution?
    thank you.

  • How to call a .jsp file from Applet

    Could any one guide me how to call a .jsp file from a Applet using action Event.
    Thanks

    http://javaalmanac.com/cgi-bin/search/find.pl?words=URL+post

  • How to call a .jar file from a java bean?

    any body knows how to call a .jar file from a java bean?

    Crosspost!
    http://forum.java.sun.com/thread.jspa?messageID=4349619

  • How to call a .bat file from java code?

    How to call a .bat file from java code? and how can i pass parameters to that .bat file?
    Thanks in advance

    thanks for ur reply
    but still i am getting the same error.
    I am trying to run a .bat file of together tool, my code looks like below
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.File;
    class SysCall{
         public static void main(String args[]){
              String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
              //String path="D://Borland//Together6.2//bin//Together.bat ";
              Runtime r= Runtime.getRuntime(); //Declare the system call
              try{
                   System.out.println("Before batch is called");
                   Process p=r.exec(cmd);
                   System.out.println(" Exit value =" + p.exitValue());
                   System.out.println("After batch is called");
              /*can produce errors which must be caught*/
              catch(Exception e) {
                   e.printStackTrace();
                   System.out.println (e.toString());
    I am getting the below exception
    Before batch is called
    java.lang.IllegalThreadStateException: process has not exited
    at java.lang.Win32Process.exitValue(Native Method)
    at SysCall.main(SysCall.java:17)
    java.lang.IllegalThreadStateException: process has not exited

  • How to call the XML file as PrivateResourcePath in JSP

    Hi All,
    I want to call the layer-config.xml values in JSP dropdown list. How to call the XML file as PrivateResourcePath in JSP... please advise me if any solution.
    locaiton: dist/PORTAL-INF/layer-config.xml
      <?xml version="1.0" encoding="utf-8" ?>
    - <layer-config>
    - <system>
      <layer>Test</layer>
      <internal>true</internal>
      </system>
    - <system>
      <layer>Test1</layer>
      <internal>false</internal>
      </system>
    - <system>
      <layer>Test3</layer>
      <internal>false</internal>
      </system>
      </layer-config>
    Thanks in advance.

    Hi,
    The below link may help you.
    [Accessing image from dist/imgaes folder inside JSPDynpage Component;
    Regards,
    Suresh Bachimanchi

  • How to call that javascript file?

    I developed javascript for automated pdf files. But i don't know how to call that javascript file from outside of acrobat. Kindly advice me the various way to use that script. This is for acrobat 8.0 for windows platform.

    You can place Acrobat JavaScripts in various form elements, document actions, documents, and the application folder or user application folder. See the Acrobat JavaScript API Reference and Guide fo rmore information, http://www.adobe.com/devnet/acrobat/javascript.html .
    From within Acrobat's JavaScript's debugging console, one can use the following code to locate the JavaScript folders used by Acrobat/Reader:
    function JSInfo() {
    /* define function to report JS information */
    // some basic system information
    console.println(app.viewerType + ' ' + app.viewerVersion + ' is running on ' + app.platform);
    // user level script folder
    try {
    var userJS = 'User level JS folder: ' + app.getPath("user","javascript");
    } catch(e) {
    var userJS = "User has not defined use JS folder level scripts";
    console.println(userJS);
    // application level script folder
    try {
    var appJS = 'Application level JS folder: ' + app.getPath("app","javascript");
    } catch(e) {
    var appJS = "There are no defined application level JS folder level scripts";
    console.println(appJS);
    return;
    } // end of JSInfo function
    JSInfo(); // call the function

  • How to call a html file in a java file

    how to call a html file inside a java file ?

    Hopeless. Are you by any chance a rare gas? You seem completely inert. LOL You totally pwned him there :rolls eyes:
    well, no, I think he's looking for something to this degree:
    in HTML, there is a mailto: command that makes the system default handled way to email emails open up. He's looking for a command thats very nice and opens a html file in the system default browser.
    So, Dick, Runtime.exec would work execpt that he needs a way to find the default system browser to call exec on, AND he has to know how to pass html file locations to the executable via command line arguments
    He just didnt try to phrase it at all :P

  • How to call .chm Help File

    How to call .CHM help file on click of button through the dialog? I tried using the command WinHelpCall() but unable to find the required result. Also could anyone please suggest how to I get a link/jump to the subtopics on click of help button under that module Example Under Navigator device if the help button is clicked the help file has to display Navigator Page.
    Can anyone provede me a quick suggestion.
    Thanks in Advance

    DIAdem doesn't have a method to open .chm files because these files are Microsoft help files, rather than DIAdem specific help files. However, there is a KnowledgeBase on Microsoft's web page that may be of help. You can find this document at http://support.microsoft.com/?kbid=209843. I found this by doing a web search for "Programmatically open .chm". I hope this helps you.
    Regards,
    Shannon R.
    Applications Engineer
    National Instruments

  • How to call windows help files .hlp from Java program

    Hai all everybody
    How to call windows Help file that is xxx.hlp files from java programs
    any help great!!!!
    regards
    veeru

    How about
    Runtime.getRuntime().exec("start xxx.hlp");

Maybe you are looking for

  • Automatically Setting Date and Time - How often does it occur?

    Can anyone tell me exactly when Mac OS X retrieves the date and time from Apple's time server? Quite often, the time on my Mac is several seconds out from the correct time. When I open the "Date and Time Preferences", it seems to sync up with the cor

  • Ran Disk Utility - need interpretation.

    Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent" has been modified and will not be repaired. If it matters, I recently installed Snow over Tiger. Ran DU because of a problem with Safari not openi

  • No entry in table in T512W

    No entry in table in T512W Below is the pcr i wrote 8000 Personnel Calculation Rule  8000       6000 Bonus         NUM?10     Comparison             AMT=  1000 Set             AMT+1000   Addition             ADDWT 1000 OT   Output table           <  

  • HT3798 I POD Classic will not sync states a duplicate file name was specified

    I keep getting error message stating The i pod "LUCK'S IPOD cannot be synced. A duplicate file name was specified.  How can I fix this?

  • [SOLVED] Infinality Font Configuration

    I recently installed the Infinality patchsat {freetype2-git-infinality} and the corresponding Windows 7 fonts {ttf-win7-fonts} packet and ever since I have not had any fonts available other than the ones which were installed with the ttf-win7-fonts p