me have two projects now me want to call the function 0f one project an another project for example me have project A and B in A there are a javascript funtion which me want to call in project B on button click it possible can any one explain are share any idea
projeca A function Code are below

<!DOCTYPE html>

<html lang="en" xmlns="">
    <meta charset="utf-8" />
        function updateMyRentals()


                alert("its Fine");

    <h2> Test Function </h2>
    <input type="button" onclick="updateMyRentals()" value="Call From Local Page" />

write your common function in one .js file

say you have written your javascript code in project a like


Now you want to access that same file in another projectb which is I assume that it is stored at same level. So you can include your main javascript file as follwoing

<script language="javascript" src='../projecta/js/myfunction.js'></script>

So now in your code page where you add above line, You can use the fuction and javascript variables declared in myfunction.js