Solved

call a javascript function in the masterpage from the content page

Posted on 2010-09-02
1
319 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:
gurvinder372 earned 500 total points
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now