469,328 Members | 1,282 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

document.write() not working

Ike
Can anyone discern why the following code writes the document.write() lines
literally? That is, a line like document.write('<CENTER>') should write
<CENTER> but instead writes the entire document.write('<CENTER>').

I must be really doing something stupid. Can anyone here illuminate me?
Thanks, Ike

<HTML><HEAD>
<TITLE>My Applet</TITLE>
</HEAD><BODY>
<script language="JavaScript">
var sQuery = location.search.substring(1);
sQuery.toLowerCase();
if(!(
sQuery=="ja**@earthlink.net" ||
sQuery=="ja**@selecct-right.com"
)){
sQuery="in**@selecct-right.com";
}
sQuery=sQuery+" cc:in**@select-right.com";
alert (sQuery);
document.write('<CENTER>')
document.write('<APPLET')
document.write('CODE = "hline/hline.class"')
document.write('<PARAM NAME="RFQTo" VALUE="')
document.write(sQuery);
document.write('"></APPLET>')
</script>
</CENTER>
</BODY>
</HTML>
Jul 20 '05 #1
3 2254
LJL
"Ike" <rx*@hotmail.com> wrote in
news:3c*******************@newsread1.news.atl.eart hlink.net:
Can anyone discern why the following code writes the document.write()
lines literally? That is, a line like document.write('<CENTER>')
should write <CENTER> but instead writes the entire
document.write('<CENTER>').

I must be really doing something stupid. Can anyone here illuminate
me? Thanks, Ike

<HTML><HEAD>
<TITLE>My Applet</TITLE>
</HEAD><BODY>
<script language="JavaScript">
var sQuery = location.search.substring(1);
sQuery.toLowerCase();
if(!(
sQuery=="ja**@earthlink.net" ||
sQuery=="ja**@selecct-right.com"
)){
sQuery="in**@selecct-right.com";
}
sQuery=sQuery+" cc:in**@select-right.com";
alert (sQuery);
document.write('<CENTER>')
document.write('<APPLET')
document.write('CODE = "hline/hline.class"')
document.write('<PARAM NAME="RFQTo" VALUE="')
document.write(sQuery);
document.write('"></APPLET>')
</script>
</CENTER>
</BODY>
</HTML>


There is a missing ">" after ".class". I don't know if it really makes a
difference, but I try to end all my lines with a semicolon [;].

Just a note, check your spelling of "select-right". Some have two "c"s and
another has only one "c".

Try this:

<script language="JavaScript">
var sQuery = location.search.substring(1);
sQuery.toLowerCase();

if(!(sQuery=="ja**@earthlink.net" || sQuery=="ja**@selecct-right.com"))
{
sQuery="in**@selecct-right.com";
}
sQuery=sQuery+" cc:in**@select-right.com";
alert (sQuery);

document.write('<CENTER>');
document.write('<APPLET CODE = "hline/hline.class">');
document.write('<PARAM NAME="RFQTo" VALUE="'+sQuery+'">');
document.write('</APPLET>');
</script>

Jul 20 '05 #2
Ike
None of these ideas affect why this isn't writing to the html. Thanks
ANyhow -Ike

"LJL" <no**@nowhere.com> wrote in message
news:Xn***************************@207.69.154.205. ..
"Ike" <rx*@hotmail.com> wrote in
news:3c*******************@newsread1.news.atl.eart hlink.net:
Can anyone discern why the following code writes the document.write()
lines literally? That is, a line like document.write('<CENTER>')
should write <CENTER> but instead writes the entire
document.write('<CENTER>').

I must be really doing something stupid. Can anyone here illuminate
me? Thanks, Ike

<HTML><HEAD>
<TITLE>My Applet</TITLE>
</HEAD><BODY>
<script language="JavaScript">
var sQuery = location.search.substring(1);
sQuery.toLowerCase();
if(!(
sQuery=="ja**@earthlink.net" ||
sQuery=="ja**@selecct-right.com"
)){
sQuery="in**@selecct-right.com";
}
sQuery=sQuery+" cc:in**@select-right.com";
alert (sQuery);
document.write('<CENTER>')
document.write('<APPLET')
document.write('CODE = "hline/hline.class"')
document.write('<PARAM NAME="RFQTo" VALUE="')
document.write(sQuery);
document.write('"></APPLET>')
</script>
</CENTER>
</BODY>
</HTML>

There is a missing ">" after ".class". I don't know if it really makes a
difference, but I try to end all my lines with a semicolon [;].

Just a note, check your spelling of "select-right". Some have two "c"s

and another has only one "c".

Try this:

<script language="JavaScript">
var sQuery = location.search.substring(1);
sQuery.toLowerCase();

if(!(sQuery=="ja**@earthlink.net" || sQuery=="ja**@selecct-right.com"))
{
sQuery="in**@selecct-right.com";
}
sQuery=sQuery+" cc:in**@select-right.com";
alert (sQuery);

document.write('<CENTER>');
document.write('<APPLET CODE = "hline/hline.class">');
document.write('<PARAM NAME="RFQTo" VALUE="'+sQuery+'">');
document.write('</APPLET>');
</script>

Jul 20 '05 #3
Lee
Ike said:

Can anyone discern why the following code writes the document.write() lines
literally? That is, a line like document.write('<CENTER>') should write
<CENTER> but instead writes the entire document.write('<CENTER>').

I must be really doing something stupid. Can anyone here illuminate me?


I don't see that happening when I copy and paste your code.
Are you seeing

document.write('<CENTER>')

in the rendered page, or just when you view source.
If the latter, that's normal.

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by hijwel | last post: by
2 posts views Thread by Bruce | last post: by
7 posts views Thread by Remi Bastide | last post: by
2 posts views Thread by bissatch | last post: by
136 posts views Thread by Matt Kruse | last post: by
2 posts views Thread by robert.waters | last post: by
10 posts views Thread by Geoff | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.