PDA

View Full Version : Saving time and space


sirarfalot
07-31-2003, 08:15 AM
Hi there,

I am just wondering, is there (in any web language) to save space and time by defining a value at the top of a page and then say, using it over and over again?

For example, could you say in javascript:

var define gamename()
gamename=Half life 2

</head>


blah blah blah, overall, **gamename** is going to be brilliant...

something like that?

MikeParent
07-31-2003, 01:32 PM
Your syntax is a bit off, but yes you can do that... do a
<script language="javascript">
document.write(strgamename);
<script>

sirarfalot
08-01-2003, 12:44 AM
ok thanks, brilliant