Re: how to put in an HTML element the content of a txt file?



D.Campagna ha scritto:

If I understand, you managed to exploit the fact that a html page can read a text file, intended to contain some javascript.
Then you read the content of the .js file, that is not javascript more than I am an elephant, but a text, and then you in some tricky way put it where you want in the page.

I apologize for my misunderstanding of the thing due to a very quick overview.
The .js rightfully only contain assignments to the variable defined in the global function. Oops! :-)
By the way I tried something similar, in a more primitive way. (I wanted a hidden iframe to load the desired file and to assign the text to the element in the page via a script)

In the past, and working with frames, I managed to do something like this:
-when loaded, a frame initializes an array object
-when submitted, a form (targeting another frame), asks something to the server, and there goes the answer from the server: it's a javascript function that fills the array
-the frame from which the form was submitted now displays the content of the array.

As previously stated, all worked fine with frames, but I have not yet understood from an Iframe how to refer to the main page and vice versa.
Anyway, thanks again, I'll try to put together the informations received and to make something by myself.
D. Campagna
.



Relevant Pages

  • Re: How do I setup php script to return a browser page?
    ... > client-side page in my case ... > content via an array, have server A process the form, and rebuild (via ... an event handler for the 'onsubmit' event in javascript that would parse the ...
    (comp.lang.php)
  • Curious IE 6 SP2 error.
    ... The portal works using frames, with one frame remaining on the portal ... The server side page does some processing (in this case adds ... The javascript is all dead. ... What's more if you refresh the page everything works fine. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Attempt to de-mystify AJAX
    ... maximising the server side. ... developers will want to do in a browser interface today or very soon, there is very little choice but to use javascript. ... I choose to minimise the Javascript because Javascript lacks all the advantages of true, ... But I prefer to skirt around the issue by using frame sets. ...
    (comp.databases.pick)
  • Re: I would like to make a chat program. How?
    ... It seems that I would have to do this by having JavaScript ... JavaScript is a client-side language so it cannot communicate with server. ... some JavaExtension to chat wouldnt be wise. ... next time frame 1 communicate it sends updated chat text ...
    (microsoft.public.scripting.jscript)
  • Re: Frames in IE
    ... I was actually thinking of variables in server pages, not in JavaScript, but ... thanks for the snipe. ... >> outside that frame without reloading it. ...
    (microsoft.public.scripting.jscript)