The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

No access to main document js functions after include file

Hi guys,

I'm having a headache trying to call js functions from my main page, from a included page.

I added a slide menu to control administrative tools on my main page using server side include:
<%if Session("Grupo")="Admin" OR Session("Grupo")="Superadmin" then %>
<!--#include file="slide_menu.asp" -->
<%end if
%>

And now i'm tying to call js functions and document objects from my main page via the menu, but always get null or unexistence object errors...

Maybe the objects that are created normally (without the include file) are being squashed by some JS that is in the include file. The most obvious thing would be that both sets of JS are using the window.onload event and the include file is overwriting the original.

Maybe the objects that are created normally (without the include file) are being squashed by some JS that is in the include file. The most obvious thing would be that both sets of JS are using the window.onload event and the include file is overwriting the original.

I did research the include code (whitch is almost pure asp inspite I do two SRC insertion of js code (to create the slide menu) )and found no window.onload.
But i found this three lines at the top of one os the js inserted: