Zero-x252
08-07-2003, 01:23 PM
Ok I have somehow crewed this up...
I meant for this script to display a font and most of the letters for it. but as we all know fonts are in the windows directory which means I would have to split the path by \ and then split the length-1 by . and use the split var[0] or var[1] im not sure but this code dont seem to work:
function fontwrite(){
var the_script = "<script src=fontwrite.js></script>"
var the_font = the_ff.value
var seper = the_font.split('.')
var seper2 = seper.split('\')
var the_fw = seper2[seper2.length-1]'
var the_sol = the_fw
var writer = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890`~!@#$%^&*()_-+=[]{}abcdefghijklmnopqrstuvwxyz;><.,/\?"
var the_solution = '<font face="' + the_sol + '">' + writer + '</font>'
if (the_font != "")
{
top.document.disp.document.open();
top.document.disp.document.writeln(the_solution + '<link rel=StyleSheet type=text/css href=the_style.css>');
top.document.disp.document.close();
}
}
here is the main document:
<html>
<!-- Generated by AceHTML Freeware http://freeware.acehtml.com -->
<!-- Creation date: 8/7/03 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="legofrk234@aol.com">
<meta name="generator" content="AceHTML 5 Freeware">
<script language="JavaScript" src="fontwrite.js"></script>
<link rel="StyleSheet" type="text/css" href="the_style.css">
</head>
<body>
<table name="the_disp" width="100%" height="100%">
<tr>
<td bgcolor="white"><iframe frameborder="0" framespacing="0"border="0" width="100%" name="disp" src="about:NO FONT<br> To get a font right click it in the browse window and select properties type in its MS-DOS name with the file extension (ex: arial.ttf).<link rel=StyleSheet type=text/css href=the_style.css>"></iframe></td>
</tr>
<tr>
<td bgcolor="white" name="choose" height="20" >
<input name="the_ff" type="file" onChange="fontwrite()" value="Choose Font:">
</td>
</tr>
</td>
</body>
</html>
I meant for this script to display a font and most of the letters for it. but as we all know fonts are in the windows directory which means I would have to split the path by \ and then split the length-1 by . and use the split var[0] or var[1] im not sure but this code dont seem to work:
function fontwrite(){
var the_script = "<script src=fontwrite.js></script>"
var the_font = the_ff.value
var seper = the_font.split('.')
var seper2 = seper.split('\')
var the_fw = seper2[seper2.length-1]'
var the_sol = the_fw
var writer = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890`~!@#$%^&*()_-+=[]{}abcdefghijklmnopqrstuvwxyz;><.,/\?"
var the_solution = '<font face="' + the_sol + '">' + writer + '</font>'
if (the_font != "")
{
top.document.disp.document.open();
top.document.disp.document.writeln(the_solution + '<link rel=StyleSheet type=text/css href=the_style.css>');
top.document.disp.document.close();
}
}
here is the main document:
<html>
<!-- Generated by AceHTML Freeware http://freeware.acehtml.com -->
<!-- Creation date: 8/7/03 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="legofrk234@aol.com">
<meta name="generator" content="AceHTML 5 Freeware">
<script language="JavaScript" src="fontwrite.js"></script>
<link rel="StyleSheet" type="text/css" href="the_style.css">
</head>
<body>
<table name="the_disp" width="100%" height="100%">
<tr>
<td bgcolor="white"><iframe frameborder="0" framespacing="0"border="0" width="100%" name="disp" src="about:NO FONT<br> To get a font right click it in the browse window and select properties type in its MS-DOS name with the file extension (ex: arial.ttf).<link rel=StyleSheet type=text/css href=the_style.css>"></iframe></td>
</tr>
<tr>
<td bgcolor="white" name="choose" height="20" >
<input name="the_ff" type="file" onChange="fontwrite()" value="Choose Font:">
</td>
</tr>
</td>
</body>
</html>