font size

M

Mikemike

i am using a java script and have to define the size of
my font in the script, but it does not seem get any
bigger than size 7....how can i make the script larger?
 
T

Tom Pepper Willett

S

Steve Easton

You didn't post much to go on, so I'm
goign to make a couple of assumptions.

If you are using document.write to write
text to an element in a page, let the script
write the text and use an inline style or a style sheet
with a designated class to define the font
and size.
 
G

Guest

Here is the portion of the script which defines the text
and size:

var n=0
if (document.all){
document.write('<font color="'+neonbasecolor+'" font
face="HY필기L" size="7"><i><b>')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight">'+message.charAt(m)
+'</span>')
document.write('</font></i></b>')

I am slightly more than a beginner at programming here
so, while i can make minor modifications to java and
html, I really dont have any idea how to "let the script
write the text and use an inline style or a style sheet
with a designated class to define the font and size" as u
suggest.

I just need to know what I must do to make the target
script larger than size 7. I want to effect the target
script only and not the rest of the page.

I DO appreciate your time and help.

Mikemike
 
S

Steve Easton

For starters it appears that the script is corrupt,
as the font designations in the script don't "seem" to be valid.

Go back to where you found it, and copy it and
paste it into notepad, and then from notepad to
your web page.

Next, you've defined a global variable var n=0
but I can't see where the variable is used
in the script.
 
M

mikemike

The script is fine...the font designation is a korea
font...it does not come through in western encoding.

as for the var n=0, that comes in rest of the script..i
did not put it in here becus i was just showing you where
the font size could not go over 7. Here is the entire
script:

<script language="JavaScript1.2">

var message="Teach and travel Korea.com"
var neonbasecolor="red"
var neontextcolor="blue"
var flashspeed=100 //in milliseconds

///No need to edit below this line/////

var n=0
if (document.all){
document.write('<font color="'+neonbasecolor+'" font
face="arial" size="7"><i><b>')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight">'+message.charAt(m)
+'</span>')
document.write('</font></i></b>')

//cache reference to neonlight array
var tempref=document.all.neonlight
}
else
document.write(message)

function neon(){

//Change all letters to base color
if (n==0){
for (m=0;m<message.length;m++)
tempref[m].style.color=neonbasecolor
}

//cycle through and change individual letters to neon
color
tempref[n].style.color=neontextcolor

//cycle through and change individual letters to neon
color
tempref[n].style.color=neontextcolor


if (n<tempref.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",1500)
return
}
}

function beginneon(){
if (document.all)
flashing=setInterval("neon()",flashspeed)
}
beginneon()


</script>
 
S

Steve Easton

Ah ok.

1. Some fonts won't display "odd" sizes over 5 with out help.

2. Try removing the font size reference from the script,
and add style="font: 14px" to the element that contains
id="neonlight"

vary the px setting to get the size you want.

hth

--
95isalive
This site is best viewed..................
...............................with a computer

mikemike said:
The script is fine...the font designation is a korea
font...it does not come through in western encoding.

as for the var n=0, that comes in rest of the script..i
did not put it in here becus i was just showing you where
the font size could not go over 7. Here is the entire
script:

<script language="JavaScript1.2">

var message="Teach and travel Korea.com"
var neonbasecolor="red"
var neontextcolor="blue"
var flashspeed=100 //in milliseconds

///No need to edit below this line/////

var n=0
if (document.all){
document.write('<font color="'+neonbasecolor+'" font
face="arial" size="7"><i><b>')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight">'+message.charAt(m)
+'</span>')
document.write('</font></i></b>')

//cache reference to neonlight array
var tempref=document.all.neonlight
}
else
document.write(message)

function neon(){

//Change all letters to base color
if (n==0){
for (m=0;m<message.length;m++)
tempref[m].style.color=neonbasecolor
}

//cycle through and change individual letters to neon
color
tempref[n].style.color=neontextcolor

//cycle through and change individual letters to neon
color
tempref[n].style.color=neontextcolor


if (n<tempref.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",1500)
return
}
}

function beginneon(){
if (document.all)
flashing=setInterval("neon()",flashspeed)
}
beginneon()


</script>


-----Original Message-----
For starters it appears that the script is corrupt,
as the font designations in the script don't "seem" to be valid.

Go back to where you found it, and copy it and
paste it into notepad, and then from notepad to
your web page.

Next, you've defined a global variable var n=0
but I can't see where the variable is used
in the script.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top