Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


Using global Variables in HTML



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> HTML Forum
View previous topic :: View next topic  
Author Message
ArvindKamath



Joined: 06 May 2008
Posts: 3

PostPosted: Tue May 06, 2008 9:17 am    Post subject: Using global Variables in HTML Reply with quote

Hi ,
I have a query say that there are 10 different HTML pages and have a common message to be displayed for ex Copright XYZ.com i wanted to make such that i can place this in a common file and use the variables in the HTML pages if its possible please let me know waiting for reply


Regards ,
Arvind Smile
Back to top
View user's profile Send private message
rangana
250+ Club


Joined: 27 Feb 2008
Posts: 439
Location: Cebu City Philippines

PostPosted: Tue May 06, 2008 10:07 am    Post subject: Re: Using global Variables in HTML Reply with quote

Possible on both client-side (Javascript) or Server-side (PHP or ASP) Wink

...Decide on which of the two you'll use and we'll be glad to help you out Smile
Back to top
View user's profile Send private message Yahoo Messenger
ArvindKamath



Joined: 06 May 2008
Posts: 3

PostPosted: Tue May 06, 2008 10:41 am    Post subject: Re: Using global Variables in HTML Reply with quote

hey
thanks for the reply it would be using javascript please let me how to do it with example it would be great

Regards,
Arvind
Back to top
View user's profile Send private message
rangana
250+ Club


Joined: 27 Feb 2008
Posts: 439
Location: Cebu City Philippines

PostPosted: Tue May 06, 2008 11:07 am    Post subject: Re: Using global Variables in HTML Reply with quote

This shall be the steps:

1.) Know your division element's id. For instance, if you want your "global variable" to show in a particular div, then just take note of that elements id. Example:
<div id="footer"></div>

2.) Note the highlighted, then in your JS, you'll have:
Code:

<script type="text/javascript">
window.onload=function()
{
var myvar = 'Copyright 2008 by Raymond Angana and Company and all of which....';
document.getElementById('footer').innerHTML=myvar;
}
</script>


3.) Replace the contents of myvar variable.
4.) Then, have some beer Wink
Back to top
View user's profile Send private message Yahoo Messenger
ArvindKamath



Joined: 06 May 2008
Posts: 3

PostPosted: Tue May 06, 2008 11:18 am    Post subject: Re: Using global Variables in HTML Reply with quote

Hey Buddy,
Thanks a lot Yippe!!! it worked


Smile
Back to top
View user's profile Send private message
rangana
250+ Club


Joined: 27 Feb 2008
Posts: 439
Location: Cebu City Philippines

PostPosted: Tue May 06, 2008 11:26 am    Post subject: Re: Using global Variables in HTML Reply with quote

You're welcome. Glad I could help Wink
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> HTML Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap