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

document.write(var) include


<script language="JavaScript">
<!--
document.write('<form name="combo"><select name="example" size="1
onChange="Draw()">');
document.write('<option value=none>Maak je keuze');
document.write('<option value=none>--------------------');
document.write('<option value="een">Trend 1');
document.write('<option value="twee">Trend 2');
document.write('<option value="drie">Trend 3');
document.write('</select>');
document.write('</form>');
//-->
</script>
</div>
<div style="POSITION: absolute; TOP: -70px;" align="center" >
<SCRIPT Language="JavaScript">
function Draw() {
i
(document.combo.example.options[document.combo.example.selectedIndex].valu
!= "none") {
var tre = "<!--" + "# include VIRTUAL=/usr/"
document.combo.example.options[document.combo.example.selectedIndex].valu
+ ".txt -->" ;
alert(tre)
venster = window.open("","","width=400,height=600");
venster.document.write(tre);

}
</SCRIPT>

men! whats wrong.. venster.document.write(tre) do not wor

hijwe
-----------------------------------------------------------------------
Posted via http://www.forum4designers.co
-----------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message35833.htm

Jul 20 '05 #1
5 7276
hijwel wrote:

<script language="JavaScript">
<!--
document.write('<form name="combo"><select name="example" size="1"
onChange="Draw()">');
document.write('<option value=none>Maak je keuze');
document.write('<option value=none>--------------------');
document.write('<option value="een">Trend 1');
document.write('<option value="twee">Trend 2');
document.write('<option value="drie">Trend 3');
document.write('</select>');
document.write('</form>');
//-->
</script>
</div>
<div style="POSITION: absolute; TOP: -70px;" align="center" >
<SCRIPT Language="JavaScript">
function Draw() {
if
(document.combo.example.options[document.combo.example.selectedIndex].value != "none") {
var tre = "<!--" + "# include VIRTUAL=/usr/" +
document.combo.example.options[document.combo.example.selectedIndex].value
+ ".txt -->" ;
alert(tre)
venster = window.open("","","width=400,height=600");
venster.document.write(tre);

}
</SCRIPT>

men! whats wrong.. venster.document.write(tre) do not work


Yeah, tell us: What is wrong?
It doesn't look wrong to me, but of course I cannot see the values in your
radiobuttons.

What makes you say that the content:
<!-- # include VIRTUAL=/usr/blabla.txt -->
is not written away to venster-window?
Maybe it is working and the behaviour the include (which is NOT javascript
by the way, AFAIK) is not what you expect.
I think the line you write does nothing.

If you want javascript to include something, try this:
<SCRIPT SRC="/usr/blabla.js"></SCRIPT>

If you want to execute something SERVERSIDE (SSI), it won't work writting it
to a fresh window, because no server is involved.
Regards,
Erwin Moller
Jul 20 '05 #2

thx..

how can i write in the same document?

document.write

hijwe
-----------------------------------------------------------------------
Posted via http://www.forum4designers.co
-----------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message35833.htm

Jul 20 '05 #3
hijwel wrote:

thx..

how can i write in the same document?

document.write?
Hi hijwel.

yes.

But you have to provide all the information you write via Javascript.
Warning: If you decide to use document.close() and you reopen the document,
the page will be rebuild from their. So take care.

If you need anything that is stored on the server you have to use a
scriptinglanguage, like PHP/Perl/ASP/etc.

PHP example:

example.php
----------------------------------
<html>
<body>
Hello, I am Dutch too!
<br>
Here follows an include named myIncludes/someinclude.php:
<br>
<?php include 'myIncludes/someinclude.php'; ?>
<br>
Here follows javascript writing to the document:
<br>

<script type="text/javascript">
document.write("This is javascript writing!");
</script>

</body>
</html>

----------------------------------

Hopelijk helpt dit. :-)

Succes!

Groetjes,
Erwin Moller


hijwel
------------------------------------------------------------------------
Posted via http://www.forum4designers.com
------------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message35833.html


Jul 20 '05 #4
hijwel wrote:
------------------------------------------------------------------------
Posted via http://www.forum4designers.com
------------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message35833.html

Do you realize that you are not posting to a webiste forum when you use
this site. They are passing your posts on to the usenet newsgroup
comp.lang.javascript

comp.lang.javascript is a publicly available newsgroup. The website you
are using is stealing its content directly from there and pretending
that it is their own. There is no original material at all on the
website you are looking at now. It is all coming directly from usenet.

I suggest you obtain a newsreader and visit us at
news:comp.lang.javascript - you will get a far better reaction to your
question there.
--
Randy
Chance Favors The Prepared Mind
Copied from Richards Post

Jul 20 '05 #5
JRS: In article <hi***********@mail.forum4designers.com>, seen in
news:comp.lang.javascript, hijwel <hi***********@mail.forum4designers.co
m> posted at Thu, 22 Jan 2004 06:10:15 :-
thx..
how can i write in the same document?


You can find out how to do that by reading the newsgroup FAQ, and by
reading the newsgroup itself before posting.

This is an Usenet newsgroup, not a Web service; you need to understand
what you are doing here, and to comply with accepted norms.

Whenever anyone is introduced to Usenet news, in whatever form it is
presented, their attention should be firmly drawn to the FAQ system,
which is intended to obviate the continued presentation of well-known
questions.

--
© John Stockton, Surrey, UK. ??*@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Check boilerplate spelling -- error is a public sign of incompetence.
Never fully trust an article from a poster who gives no full real name.
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Andrew V. Romero | last post by:
I have been working on a function which makes it easier for me to pull variables from the URL. So far I have: <script language="JavaScript"> var variablesInUrl; var vArray = new Array(); ...
6
by: Mike Daniel | last post by:
I am attempting to use document.write(pageVar) that displays a new html page within a pop-up window and the popup is failing. Also note that pageVar is a complete HTML page containing other java...
13
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
7
by: dd | last post by:
Hello all. First, I'm a newbie to javascript but not to ASP. Secondly I've been searching for the answer for two hours and I decided to finally post this question. I'm trying to take a...
2
by: ethandbrown | last post by:
Hi All-- I'm a bit stymied here. I need to display arbitrary HTML obtained through AJAX. The problem is when a <script> block is encountered one can't use innerHTML to set the content, because...
2
by: key9 | last post by:
Hi all look at the organize tree main.c ------ #include lib_adapter.c main() { foo();
3
by: windandwaves | last post by:
does it matter if I write var anchors = document.getElementsByTagName("A"); or var anchors = document.getElementsByTagName("a"); Or is there a better way to catch both <a hrefs and <A...
8
by: johnsonlau | last post by:
When I use document.write to replace the comment of a frame, I found that the page was always showing as loading in Firefox (2.0.0.2). But it seems that it is OK in IE6. Could someone help me...
1
by: Jean | last post by:
function myFunction(){ document.write('var path="../images/2008/'); } I use this kind of function to declare the variable path. It's on a extern javascript file. If I use this function in an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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?
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
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.