473,385 Members | 1,856 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,385 software developers and data experts.

Problem with document.write()

Hi, with mozilla firefox the following code doesn't work, notting appears on the browser, the browser is blank:
[HTML]<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional/EN" "http://www.w3.org/TR/xhtml1 - transitional">

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>exampletest2</title>
<script language="JavaScript" type="text/javascript">

document.write("<h1>Test</h1>");

</script>
</head>
<body>
</body>
</html>[/HTML]
//Can you anyone give advice please?
Nov 8 '08 #1
8 1111
document.write isn't working. I don't know if is the browser? Because the browser is blank.
Nov 8 '08 #2
Logician
210 100+
You're writing into the body before it's rendered. Put your code block inside the body section.
Nov 8 '08 #3
gits
5,390 Expert Mod 4TB
don't double post your questions ... threads merged. And use a meaningful thread-title ... read the posting guidelines here.

kind regards
MOD
Nov 8 '08 #4
waltapp
31
Your code is in the head. Move it into the body and it will work fine.
Nov 9 '08 #5
gits
5,390 Expert Mod 4TB
hi waltapp,

please have a short look at post #3 in this thread - i quote it again:

You're writing into the body before it's rendered. Put your code block inside the body section.
and here is your reponse:

Your code is in the head. Move it into the body and it will work fine.
if you want to point out some specific things it is more then welcome that you do so but simply repeating someones answer (even with other words) is quite unnecessary ... please read the thread before posting a reply.

kind regards
MOD
Nov 9 '08 #6
waltapp
31
Hi , I was not logged in properly and did not see your previous reply otherwise I would not have posted.
Nov 9 '08 #7
waltapp
31
I am new to this forum and I am glad I found it. It is excellent to have this type of interaction with other people of same interests.
Nov 9 '08 #8
gits
5,390 Expert Mod 4TB
Hi , I was not logged in properly and did not see your previous reply otherwise I would not have posted.
no problem ... i just wanted to gave you this hint ... because another member that you just repeat could feel uncomfortable with such beaviour and it is easy to avoid :)

you are very welcome at bytes.com ...

kind regards
Nov 9 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Lizzy | last post by:
I have an internet application which has a progress bar show whenever the customer is requesting data from the server. This progress bar is coded to work in both Netscape 4.75 and above and IE 5.0...
4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
6
by: ged | last post by:
Hi, i am a oo (c#) programmer, and have not used javascript for a while and i cant work out how javascript manages its references. Object References work for simple stuff, but once i have an...
2
by: darren | last post by:
I have a small Javascript problem with that mutch love web browser safari, I tested the code on all other browsers PC (Win) and Linux and IE on the mac and it seams to work ok, but for some reason...
5
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually...
1
by: mostafahamdyfcis | last post by:
Hello all I have used the sample code which exist in the following URL: http://www.eggheadcafe.com/articles/javascript_modal_dialog.asp which create modal dialog box, but some problem...
5
by: mukeshrasm | last post by:
hello friends I am new to javascript and I have a problem. I am giving the code <!-- Paste this code into the CSS section of your HTML document --> <html> <head> <style type="text/css">...
5
by: thallasridevi | last post by:
Hello, I am trying to get system information. I found a script. When i tried it, it is working in internet explorer. But it is not working with mozilla. I think problem is with below statement as...
2
by: davidson1 | last post by:
Hai friends..for menu to use in my website..i found in one website....pl look below website.... http://www.dynamicdrive.com/dynamicindex1/omnislide/index.htm i downloaded 2 files.... ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.