473,387 Members | 2,436 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,387 software developers and data experts.

JAVASCRIPT opendoc

I am trying to open an html document on a html page as a text
variable. So that in a perfect world the code would look like this:

<SCRIPT LANGUAGE="JavaScript">
var test = document.open("file.html");
document.write(" " + test + " ");
</SCRIPT>

So basically I would be retrieving the text out of that file, and
using it on the current page I am on a VARIABLE.

Any help will be apreciated.

Thanks,
Jul 23 '05 #1
3 3553
In article <9a*************************@posting.google.com> ,
se********@yahoo.com enlightened us with...
I am trying to open an html document on a html page as a text
variable. So that in a perfect world the code would look like this:


Not in a client-side javascript in the default security environment, you
can't.

Solutions that are either not cross-browser, not stictly client-side script,
and/or not default security:
java applet
server-side script to create a javascript text file from the html file
ActiveX
COM
HTA

--
--
~kaeli~
Join the Army, meet interesting people, kill them.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
kaeli wrote:
In article <9a*************************@posting.google.com> ,
se********@yahoo.com enlightened us with...
I am trying to open an html document on a html page as a text
variable. So that in a perfect world the code would look like this:


Not in a client-side javascript in the default security environment, you
can't.

Solutions that are either not cross-browser, not stictly client-side
script, and/or not default security:
java applet
server-side script to create a javascript text file from the html file
ActiveX
COM
HTA


Or open it in a frame / iframe.

C.
Jul 23 '05 #3
In article <ce******************@news.demon.co.uk>,
co**************@andthis.mms3.com enlightened us with...
kaeli wrote:
In article <9a*************************@posting.google.com> ,
se********@yahoo.com enlightened us with...
I am trying to open an html document on a html page as a text
variable. So that in a perfect world the code would look like this:

Not in a client-side javascript in the default security environment, you
can't.
Solutions that are either not cross-browser, not stictly client-side
script, and/or not default security:
java applet
server-side script to create a javascript text file from the html file
ActiveX
COM
HTA


Or open it in a frame / iframe.

That will not work if the content is outside the domain of the opener
(security error). You can't access the content of a frame from another frame
if it's in a different domain of the script trying to access it. Even a
different protocol would throw the error.

Otherwise it would work in DOM browsers pretty well.

--
--
~kaeli~
If that phone was up your a$$, maybe you could drive a
little better!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #4

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

Similar topics

3
by: anadimpa | last post by:
Hello all I build a javascript function string in the code behind and register it in the Page_Load of my User Control. I do this because I build the javascript based on some variables that are...
1
by: Sylum | last post by:
Hi everyone, I'm coding an web application with Javascript and ActiveXWord 2000. Basicly, on the client side, i use javascript to create an instance Word 2000 in order to have a new document...
5
by: Cedric | last post by:
Hi Folks, I'm wondering if someone has already succeed to open a word2000 document located on server side with javascript code executed by a web browser on client side. In fact, i make it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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
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,...

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.