Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

call a javascript function in the masterpage from the content page

Posted on 2010-09-02
1
Medium Priority
?
326 Views
Last Modified: 2013-11-19
I have a javascipt function inside the master page.
1)  I  need to be able to call this function from the content page on a button click.
2) pass parameters to the function

How can i do the above 2. please help thanks
the javascript function is:
 function AddLink() {

         }    

I need to be able to call the above method from the button click in the content page:
<asp:Button ID="btnProduct" runat="server"  Text="Add Product()"
        style="margin-bottom: 0px"  />
0
Comment
Question by:TrialUser
1 Comment
 
LVL 40

Accepted Solution

by:
Gurvinder Pal Singh earned 2000 total points
ID: 33589819
include this javascript inside your master page, by using <script> tag, and then you can call its function. Did i missed anything?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question