knight4u
03-28-2003, 11:50 PM
I am trying to set up an html loop to do the following:
define var()=lang1,lang2,lang3,etc.
then using "onclick" of an image to set var
Take this var to script routine
Right now I am using:
<script language='javascript'>
<!-- Begin
frlang = "French"; grlang = "German"; itlang = "Italian"; nolang = "Norwegian";
polang = "Portuguese"; splang = "Spanish"; enlang = "English";
trans = "\"http:\/\/fets3.freetranslation.com\/\?Sequence\=core\&Language\=English\%2F";
MySite = window.location.href;
// end --></script>
<!-- THIS PART HAS TO BE REPEATED FOR EACH LANG -->
<script>
document.write('<align\='+'center'+'>');document.write('<font size\='+'1'+'>');
document.write('<a href\=' + trans + enlang + '&Url=' + MySite+'\">'+ enlang ); document.write('<br>');
document.write('<img border\='+'0'+ ' src\='+'..\/images/flg-uk.jpg' + ' alt\='+ enlang + ' width\='+'30'+' height\='+'21'+'><\/a>');
document.write('<br>');
</script>
I am trying to reduce the above to a loop.
Anyone that can help would be appreaciated. Roger:D
define var()=lang1,lang2,lang3,etc.
then using "onclick" of an image to set var
Take this var to script routine
Right now I am using:
<script language='javascript'>
<!-- Begin
frlang = "French"; grlang = "German"; itlang = "Italian"; nolang = "Norwegian";
polang = "Portuguese"; splang = "Spanish"; enlang = "English";
trans = "\"http:\/\/fets3.freetranslation.com\/\?Sequence\=core\&Language\=English\%2F";
MySite = window.location.href;
// end --></script>
<!-- THIS PART HAS TO BE REPEATED FOR EACH LANG -->
<script>
document.write('<align\='+'center'+'>');document.write('<font size\='+'1'+'>');
document.write('<a href\=' + trans + enlang + '&Url=' + MySite+'\">'+ enlang ); document.write('<br>');
document.write('<img border\='+'0'+ ' src\='+'..\/images/flg-uk.jpg' + ' alt\='+ enlang + ' width\='+'30'+' height\='+'21'+'><\/a>');
document.write('<br>');
</script>
I am trying to reduce the above to a loop.
Anyone that can help would be appreaciated. Roger:D