Forum Moderators: open

Message Too Old, No Replies

Window.open+window.location

open source code in another .html page

         

gaucho

1:16 pm on May 14, 2005 (gmt 0)

10+ Year Member



Hi,

I hope there is possible to do in JS!

Firstly I am working with 1 file and I wish put this command line working inside the <iframe>

onclick=window.open("http://www.test.de/contrerror/control1.html"+window.location = "view-source:" + window.location.href'

Goal: Instead open the source code wqithing 'Notepad" the user would open the source code in another html page

Thank you for your attention

G.

Bernard Marx

2:55 pm on May 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



"Instead open the source code wqithing 'Notepad" the user would open the source code in another html page"

I don't like saying "not possible", but this just isn't - not using "view-source" anyway.
Not at all, if the target page is outside your domain.

gaucho

5:20 pm on May 14, 2005 (gmt 0)

10+ Year Member



Ok.

...(a practical and real example).

I have a (or an?) .HTA application. Right?
I have also an <iframe> where I open the webpages I want. Right?

My reasoning if the following:

If I open any webpage inside an <iframe> WHAT its source code I cannnot open inside an Iframe?

G.

Bernard Marx

10:56 pm on May 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh, I see. If you are using an HTA, that makes things more possible.

The easiest thing to use is the download behavior.
I'll sort out a demo.

Bernard Marx

11:51 pm on May 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In fact, just searching the DOM is easier.
DEMO code:

[edited by: jatar_k at 3:47 pm (utc) on Oct. 5, 2005]
[edit reason] removed old url [/edit]