I'm trying to use function pageLoad() (asp.net related JS event)
I have one in the masterpage, and one in a different page. For some reason they don't want to be friends... only one is called.
When I cancel one, the other one is called so I don't see a problem there...
Any idea?
Master page:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="....." Inherits="......." %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script>
function pageLoad() {
alert('masterpage load');
CallStyledArrowSelect();
}
</script>
//more irrelevant code
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
And in the content page:
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script>
function pageLoad(){
alert('hi i'm not working');
}
//more code...
OK,
thanks to andrey.shedko for the link,
Apparently it is not possible to have 2 pageLoad functions - one in the masterpage and one in the content page. The solution suggested there is making another function on the content page and call it if it exist: