Reply
Onload and Onunload to work only on one page.
Old 11-01-2006, 11:57 AM Onload and Onunload to work only on one page.
Average Talker

Posts: 24
Location: Manchester, England, UK
I've got google map to work on my website and now I have come across a problem.

For google map to work I need to have onload="load(); " onunload="GUnload()" in the body.

But when I do this it causes errors throughout the rest of the site as its only being used on the location page.

How do I make it so onload="load(); " onunload="GUnload()" only gets called on on location.ascx
__________________
http://www.imagered.co.uk
mattbuk is offline
Reply With Quote
View Public Profile Visit mattbuk's homepage!
 
When You Register, These Ads Go Away!
Old 11-03-2006, 02:50 AM Re: Onload and Onunload to work only on one page.
chrishirst's Avatar
Super Moderator

Posts: 13,516
Location: Blackpool. UK
The obvious answer is;

only put the code on that page.

However I take it that is NOT what you are actually asking.

As the page is .ascx that would be in ASP.NET, so I'd guess that you need some code to only include the code IF the page name is location.ascx

We need more info on your site to be able to provide code, such as what language the site is coded in.
There is a .net forum here and this thread is flagged to be moved there.

in ASP VbScript it would be
Code:
<%
if instr(request.servervariables("SCRIPT_NAME"),"location.ascx") = 0 then 
%>
     <!--#include virtual="page_with_GoogleMap_code.ext" -->
<%
end if
%>
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Onload and Onunload to work only on one page.
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12374 seconds with 12 queries