Re: Problem calling function



Xerxes wrote on 26 jun 2009 in comp.lang.javascript:

Hi,
I have an aspx page that uses a master page. In the master page, I
added a reference to a javascript file.
When in the aspx page I try to call a function located in the
javascript file, I keep getting error that function is undefined.

In Master Page I have:
<body class="center">
<script type="text/javascript" src="../assets/scripts/
wz_tooltip.js"></script>
<form id="MainForm" runat="server">
....
</form>
</body>

In the aspx file:

<script type="text/javascript">
function doTip(name) {
var msg = "Edit " + name + " Properties";
Tip(msg); <----- This function is defined in the
javascript file, causes error
}
</script>
......
<a href="..." onmouseover="doTip('some_value')">blah</a>

<form id="MainForm" runat="server">

Strange, a form running on the server!

Better ask this in:

neas:microsoft.public.dotnet.framework.aspnet

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
.



Relevant Pages

  • Re: Problem calling function
    ... I have an aspx page that uses a master page. ... added a reference to a javascript file. ... javascript file, I keep getting error that function is undefined. ...
    (comp.lang.javascript)
  • Problem calling function
    ... I have an aspx page that uses a master page. ... added a reference to a javascript file. ... javascript file, I keep getting error that function is undefined. ...
    (comp.lang.javascript)
  • RE: Including and Executing JS and CSS from an ASPX within a Master Pa
    ... mark-up of the ASPX page? ... If I am including jQuery from the MasterPage and *then* want to ... include the js file between master page and content page like the example ... Including and Executing JS and CSS from an ASPX within a Master ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Including and Executing JS and CSS from an ASPX within a Master Pa
    ... mark-up of the ASPX page? ... We can insert any javascript functions in the page by markups. ... If I am including jQuery from the MasterPage and *then* want to ... include the js file between master page and content page like the example ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: trouble with rollover buttons on master page
    ... Here's the contents of the javascript file (which was created by a button ... Notice the first line is var buttonFolder = ... // SET MOUSEOVER BUTTON ... one of the buttons is defined in the master page markup as follows: ...
    (microsoft.public.dotnet.framework.aspnet)