T
Tom
I am trying to output an string that is made up of HTML tags using the
document.write. The string is taken from the URL. However, my output
is given as text rather than being read by the browser as HTML. Any
thoughts? Here is my code.
<html>
<head>
<title>final2</title>
</head>
<body bgcolor="#FFFFCC">
<FORM NAME="tom">
<INPUT TYPE="hidden" NAME="check">
</FORM>
<SCRIPT LANGUAGE="javascript">
var locate = window.location
document.tom.check.value = locate
var text = document.tom.check.value
function delineate2(str)
{
point = str.lastIndexOf("=");
return(str.substring(point+1,str.length));
}
var a = delineate2(text)
var newString = a.replace(/%3C/g,"<");
var newString2 = newString.replace(/%3E/g,">");
var newString3 = newString2.replace(/%2F/g,"/");
var newString4 = newString3.replace(/%22/g,"");
document.write('newString4');
</SCRIPT>
</body>
</html>
OUTPUT IS SIMPLY THE TAGS!
document.write. The string is taken from the URL. However, my output
is given as text rather than being read by the browser as HTML. Any
thoughts? Here is my code.
<html>
<head>
<title>final2</title>
</head>
<body bgcolor="#FFFFCC">
<FORM NAME="tom">
<INPUT TYPE="hidden" NAME="check">
</FORM>
<SCRIPT LANGUAGE="javascript">
var locate = window.location
document.tom.check.value = locate
var text = document.tom.check.value
function delineate2(str)
{
point = str.lastIndexOf("=");
return(str.substring(point+1,str.length));
}
var a = delineate2(text)
var newString = a.replace(/%3C/g,"<");
var newString2 = newString.replace(/%3E/g,">");
var newString3 = newString2.replace(/%2F/g,"/");
var newString4 = newString3.replace(/%22/g,"");
document.write('newString4');
</SCRIPT>
</body>
</html>
OUTPUT IS SIMPLY THE TAGS!