ASP.net : Master page Javascript function not firing from every content page?

Is it possible you're not including General. Js in your master page but ARE in CompanyInfo. Aspx?

Up vote 0 down vote favorite share g+ share fb share tw.

A sample of folders in my web application is as follows: MyApplicationName --> MasterPages/MasterPage1. Aspx --> Reports/Clients/ARReports. Aspx --> AboutUs/CompanyInfo.

Aspx --> Javascript/General. Js I have added Print ImageButton to Master page MasterPage1.aspx. It has a JavaScript function onClientClick event: Print The PrintContent function is in General.

Js file. CompanyInfo. Aspx and ARReports.

Aspx both have Masterpagefile = MasterPage1. Now the issue is that the Print ImageButton in CompanyInfo. Aspx is able to call the JavaScript function when clicked.

However, in ARReports. Aspx no JavaScript function is fired when clicked. What could be the problem?

The ImageButton is in Master page which refers to the JavaScript file which has the JS function. It is working for CompanyInfo. Aspx, but if we go deep inside the folders, it is not working.

Javascript URL1 master-pages link|improve this question edited May 25 '11 at 19:25Scott3,572524 asked May 25 '11 at 18:26shazia757 60% accept rate.

Ensure ‘display a notification for every script error’ is turned on in IE options, or use another browser that allows you to open the JavaScript console. In general I would strongly avoid JavaScript-fuelled print links, and use a print stylesheet that hides the unwanted parts of the page instead. – bobince May 25 '11 at 18:43 Webpage error details Message: Object expected Line: 154 Char: 1 Code: 0 URI: localhost:3093/applName/reports/clients/arreports.

Aspx This is the error in IE – shazia May 25 '11 at 19:34.

Is it possible you're not including General. Js in your master page but ARE in CompanyInfo. Aspx?

Can you show us where (in what file) and how (syntax) you're including General. Js?

I checked the MasterPage and here is the code inside the head ABC Company There is no reference to JS file in the Content pages – shazia May 25 '11 at 21:47.

In Page Load I add the JavaScript file dynamically, so that all pages can access it with ResolveUrl Page.Header.Controls. Add(CreateJavaScriptLink("~/javascript/General. Js")).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions