473,414 Members | 1,627 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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 2469
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: hijwel | last post by:
<script language="JavaScript"> <!-- document.write('<form name="combo"><select name="example" size="1 onChange="Draw()">'); document.write('<option value=none>Maak je keuze');...
2
by: Bruce | last post by:
I have sucessfully used document.write in a new window, but I now wish to write to an already open & framed window. How do I do it. Please show example, as I have trouble getting my head around JS....
7
by: Remi Bastide | last post by:
I'm trying to open a blank window and write a message in it. The following page works as expected in IE, but in Firefox the message is not written: <HTML> <HEAD> <TITLE>Document.write...
4
by: Prowler | last post by:
In the application we are currently building, we need to write positioning code on-the-fly, based upon the screen offset of the element in the AS/400 application which drives the Web app. The 400,...
2
by: bissatch | last post by:
Hi, I am trying to use JavaScript to write a table column on a web page. The code is as follows: <html> <head> <script> function displaycount() {
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
2
by: robert.waters | last post by:
Hello, I am dynamically editing the contents of a page and using document.write() to reload the new, edited content. However, on the new page, any calls to functions located in external .js...
10
by: Geoff | last post by:
I am using the following statement in a script: If (res == 123) document.write (" Blah Blah"); else document.write (" XYZ"); This of course brings up a new page on my site and prints Blah...
10
by: webEater | last post by:
Hello, I try the following in Firefox and other modern browsers: window.addEventListener('load', function() { document.title = CSS.getClass('fontSize'); var div = document.createElement('div');...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.