473,804 Members | 3,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

document.write( var) include


<script language="JavaS cript">
<!--
document.write( '<form name="combo"><s elect name="example" size="1
onChange="Draw( )">');
document.write( '<option value=none>Maak je keuze');
document.write( '<option value=none>--------------------');
document.write( '<option value="een">Tre nd 1');
document.write( '<option value="twee">Tr end 2');
document.write( '<option value="drie">Tr end 3');
document.write( '</select>');
document.write( '</form>');
//-->
</script>
</div>
<div style="POSITION : absolute; TOP: -70px;" align="center" >
<SCRIPT Language="JavaS cript">
function Draw() {
i
(document.combo .example.option s[document.combo. example.selecte dIndex].valu
!= "none") {
var tre = "<!--" + "# include VIRTUAL=/usr/"
document.combo. example.options[document.combo. example.selecte dIndex].valu
+ ".txt -->" ;
alert(tre)
venster = window.open("", "","width=400,h eight=600");
venster.documen t.write(tre);

}
</SCRIPT>

men! whats wrong.. venster.documen t.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 7300
hijwel wrote:

<script language="JavaS cript">
<!--
document.write( '<form name="combo"><s elect name="example" size="1"
onChange="Draw( )">');
document.write( '<option value=none>Maak je keuze');
document.write( '<option value=none>--------------------');
document.write( '<option value="een">Tre nd 1');
document.write( '<option value="twee">Tr end 2');
document.write( '<option value="drie">Tr end 3');
document.write( '</select>');
document.write( '</form>');
//-->
</script>
</div>
<div style="POSITION : absolute; TOP: -70px;" align="center" >
<SCRIPT Language="JavaS cript">
function Draw() {
if
(document.combo .example.option s[document.combo. example.selecte dIndex].value != "none") {
var tre = "<!--" + "# include VIRTUAL=/usr/" +
document.combo. example.options[document.combo. example.selecte dIndex].value
+ ".txt -->" ;
alert(tre)
venster = window.open("", "","width=400,h eight=600");
venster.documen t.write(tre);

}
</SCRIPT>

men! whats wrong.. venster.documen t.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
scriptinglangua ge, 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.javas cript

comp.lang.javas cript 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.forum4desi gners.com>, seen in
news:comp.lang. javascript, hijwel <hi***********@ mail.forum4desi gners.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.demo n.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demo n.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
24189
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(); function loadUrlVariables() { varString = location.search;
6
12989
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 scripts. Being a javascript newbie and after significant testing, I suspect that the document.write fails after finding a </script> within pageVar. Does a trick exist that enables one to slightly alter pageVar whereby enabling...
13
9661
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 assigned to a variable and output using document.write. (Note, there is no submit button or other form elements. Basically
7
16276
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 javascript and make it work with asp. Any thought, ideas or pointers in the right direction would be greatly appreciated. I am getting the following error: Microsoft JScript runtime error '800a1391'
2
2627
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 the <script> block won't be evaluated. Googling around, a found the createContextualFragment() solution which does execute script code. The following, for example, works:
2
3533
by: key9 | last post by:
Hi all look at the organize tree main.c ------ #include lib_adapter.c main() { foo();
3
16564
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 HREFS
8
3753
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 with this problem? Thanks. My file: <html>
1
2345
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 other function to define var path, the result is an error: path not defined. Can someone explain to me why this doesn't work?
0
9591
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10594
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10331
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10087
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9166
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6861
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

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.