Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



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

Posts: 24
Location: Manchester, England, UK
Trades: 0
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
__________________

Please login or register to view this content. Registration is FREE
mattbuk is offline
Reply With Quote
View Public Profile Visit mattbuk's homepage!
 
 
Register now for full access!
Old 11-03-2006, 03:50 AM Re: Onload and Onunload to work only on one page.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
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!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Onload and Onunload to work only on one page.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.09797 seconds with 12 queries