Window and iframe question

Discussion in 'Javascript' started by Don Li, Mar 21, 2008.

  1. Don Li

    Don Li Guest

    Hi,

    Can I rewrite the following statement
    window.frames.frm1.document.designMode = "On";
    with
    window["BusinessNews"].frames.notes#currentrow#.document.designMode =
    "On";
    // where BusinessNews is a named window
    ?

    Also, all the {iframes} are inside a DIV. So, put it another way,
    how to reference frames's {childern} within a DIV?

    Thanks.
     
    Don Li, Mar 21, 2008
    #1
    1. Advertising

  2. Don Li wrote:
    > Can I rewrite the following statement
    > window.frames.frm1.document.designMode = "On";
    > with
    > window["BusinessNews"].frames.notes#currentrow#.document.designMode =
    > "On";
    > // where BusinessNews is a named window
    > ?


    No, there is no built-in registry of Window objects. You can use the mere
    name of a window to refer to it --

    window.open("...", "BusinessNews").frames["notes"]...

    --, but that causes the document of the window in question to be reloaded.
    You have to store a reference *first*, and use it later (that's a FAQ, I
    presume):

    var w = window.open(...);
    ...
    w.frames["notes"]...

    As you have been told repeatedly already, (your) server-side code is
    irrelevant to client-side problems such as this. Please stop posting it then.

    > Also, all the {iframes} are inside a DIV. So, put it another way,
    > how to reference frames's {childern} within a DIV?


    It does not matter that the `iframe' elements are descendents of a `div'
    element, their respective element objects are referenced by items of the
    `frames' collection and can be referenced through it.


    PointedEars
    --
    Use any version of Microsoft Frontpage to create your site.
    (This won't prevent people from viewing your source, but no one
    will want to steal it.)
    -- from <http://www.vortex-webdesign.com/help/hidesource.htm>
     
    Thomas 'PointedEars' Lahn, Mar 21, 2008
    #2
    1. Advertising

  3. Don Li

    Don Li Guest

    > --, but that causes the document of the window in question to be reloaded.
    > You have to store a reference *first*, and use it later (that's a FAQ, I
    > presume):
    >
    >   var w = window.open(...);
    >   ...
    >   w.frames["notes"]...
    >

    An existing process has already open such a window at top level. What
    I tried to do with your technique above was to set a var reference,
    var win = window.open("about:Tabs","BusinessNews");

    Then at the second level, when this "BusinessNews is already open,
    tried to reference the window and set designMode to be "on" for the
    frm1 iframe,
    win.frames.frm1.document.designMode = "On";
    It did not work. What did I do wrong?
     
    Don Li, Mar 21, 2008
    #3
  4. Don Li

    Don Li Guest

    On Mar 21, 4:34 pm, Don Li <> wrote:
    > > --, but that causes the document of the window in question to be reloaded.
    > > You have to store a reference *first*, and use it later (that's a FAQ, I
    > > presume):

    >
    > >   var w = window.open(...);
    > >   ...
    > >   w.frames["notes"]...

    >


    > An existing process has already open such a window at top level.  What
    > I tried to do with your technique above was to set a var reference,
    > var win = window.open("about:Tabs","BusinessNews");

    I'm suspicious of the above, the window is going to be open by a
    process at the top level already,
    // can I can't do anything about this process other than knowing the
    window's name

    then, this set
    var win = window.open("about:Tabs","BusinessNews");
    statement is either illogical or wrong, no? Didn't work anyway.
     
    Don Li, Mar 21, 2008
    #4
  5. Don Li wrote:
    > On Mar 21, 4:34 pm, Don Li <> wrote:
    >>> --, but that causes the document of the window in question to be reloaded.
    >>> You have to store a reference *first*, and use it later (that's a FAQ, I
    >>> presume):
    >>> var w = window.open(...);
    >>> ...
    >>> w.frames["notes"]...

    >
    >> An existing process has already open such a window at top level.


    What are you talking about?

    >> What I tried to do with your technique above was to set a var reference,
    >> var win = window.open("about:Tabs","BusinessNews");

    > I'm suspicious of the above, the window is going to be open by a
    > process at the top level already,
    > // can I can't do anything about this process other than knowing the
    > window's name
    >
    > then, this set
    > var win = window.open("about:Tabs","BusinessNews");
    > statement is either illogical or wrong, no?


    Who knows.

    > Didn't work anyway.


    http://www.jibbering.com/faq/faq_notes/clj_posts.html#ps1DontWork

    Is there a user agent where about:Tabs is a valid URI anyway?


    PointedEars
    --
    var bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    && navigator.userAgent.indexOf('Mac') != -1
    ) // Plone, register_function.js:16
     
    Thomas 'PointedEars' Lahn, Mar 21, 2008
    #5
  6. Don Li

    Don Li Guest

    On Mar 21, 5:10 pm, Thomas 'PointedEars' Lahn <>
    wrote:
    > Don Li wrote:
    > > On Mar 21, 4:34 pm, Don Li <> wrote:
    > >>> --, but that causes the document of the window in question to be reloaded.
    > >>> You have to store a reference *first*, and use it later (that's a FAQ,I
    > >>> presume):
    > >>>   var w = window.open(...);
    > >>>   ...
    > >>>   w.frames["notes"]...

    >
    > >> An existing process has already open such a window at top level.

    >
    > What are you talking about?

    Ok, let me cite a use case,
    <cfwindow name="pubSector" ... />
    that creates a DIV, so I was told...
    then my dynamically created IFRAMES are within that DIV, and I need a
    way to reference them.

    >
    > >> What I tried to do with your technique above was to set a var reference,
    > >> var win = window.open("about:Tabs","BusinessNews");

    > > I'm suspicious of the above, the window is going to be open by a
    > > process at the top level already,
    > > // can I can't do anything about this process other than knowing the
    > > window's name

    >
    > > then, this set
    > > var win = window.open("about:Tabs","BusinessNews");
    > > statement is either illogical or wrong, no?

    >
    > Who knows.

    I tried, it didn't work.

    >
    > > Didn't work anyway.

    >
    > http://www.jibbering.com/faq/faq_notes/clj_posts.html#ps1DontWork
    >
    > Is there a user agent where about:Tabs is a valid URI anyway?

    When one opens up IE7, it defaults to "about:Tabs" in the URL address
    space, hence, one may interprete it as a URI.

    >
    > PointedEars
    > --
    > var bugRiddenCrashPronePieceOfJunk = (
    >     navigator.userAgent.indexOf('MSIE 5') != -1
    >     && navigator.userAgent.indexOf('Mac') != -1
    > )  // Plone, register_function.js:16
     
    Don Li, Mar 21, 2008
    #6
  7. Don Li wrote:
    > [...] Thomas 'PointedEars' Lahn [...] wrote:
    >> Don Li wrote:
    >>> On Mar 21, 4:34 pm, Don Li <> wrote:
    >>>>> --, but that causes the document of the window in question to be reloaded.
    >>>>> You have to store a reference *first*, and use it later (that's a FAQ, I
    >>>>> presume):
    >>>>> var w = window.open(...);
    >>>>> ...
    >>>>> w.frames["notes"]...
    >>>> An existing process has already open such a window at top level.

    >> What are you talking about?

    > Ok, let me cite a use case,
    > <cfwindow name="pubSector" ... />
    > that creates a DIV, so I was told...


    For the last time, your server-side code is irrelevant to this problem. And
    I am afraid you will not accomplish anything if you continue depending on
    hearsay. Use the Source, Luke. It is *there*, in View menu, Source item,
    for example.

    > then my dynamically created IFRAMES are within that DIV, and I need a
    > way to reference them.


    You have been told already.

    >>>> What I tried to do with your technique above was to set a var reference,
    >>>> var win = window.open("about:Tabs","BusinessNews");
    >>> I'm suspicious of the above, the window is going to be open by a
    >>> process at the top level already,
    >>> // can I can't do anything about this process other than knowing the
    >>> window's name
    >>> then, this set
    >>> var win = window.open("about:Tabs","BusinessNews");
    >>> statement is either illogical or wrong, no?

    >> Who knows.

    > I tried, it didn't work.


    That does not necessarily mean that it is illogical or wrong.

    >>> Didn't work anyway.

    >> http://www.jibbering.com/faq/faq_notes/clj_posts.html#ps1DontWork
    >>
    >> Is there a user agent where about:Tabs is a valid URI anyway?

    > When one opens up IE7, it defaults to "about:Tabs" in the URL address
    > space, hence, one may interprete it as a URI.


    It is a URI, per RFC 3986. Whether it is a valid one for the task to be
    accomplished is another matter. Why not begin with testing an empty URI
    reference instead?

    > [my signature]


    For the last time, please stop full-quoting.


    Score adjusted

    PointedEars
    --
    Anyone who slaps a 'this page is best viewed with Browser X' label on
    a Web page appears to be yearning for the bad old days, before the Web,
    when you had very little chance of reading a document written on another
    computer, another word processor, or another network. -- Tim Berners-Lee
     
    Thomas 'PointedEars' Lahn, Mar 21, 2008
    #7
  8. Don Li

    Don Li Guest


    > It is a URI, per RFC 3986.  Whether it is a valid one for the task to be
    > accomplished is another matter.  Why not begin with testing an empty URI
    > reference instead?

    That was my first attempt;
    var win = window.open("","BusinessNews");
    The second time, I used
    var win = window.open("about:Tabs","BusinessNews");

    And of course, I do view source code from my browser... zillions of js
    code generated by the package(not my code) mashed up with html code
    make them unreadable...
     
    Don Li, Mar 21, 2008
    #8
  9. Don Li

    Logos Guest

    On Mar 21, 3:43 pm, Don Li <> wrote:
    > > It is a URI, per RFC 3986. Whether it is a valid one for the task to be
    > > accomplished is another matter. Why not begin with testing an empty URI
    > > reference instead?

    >
    > That was my first attempt;
    > var win = window.open("","BusinessNews");
    > The second time, I used
    > var win = window.open("about:Tabs","BusinessNews");
    >
    > And of course, I do view source code from my browser... zillions of js
    > code generated by the package(not my code) mashed up with html code
    > make them unreadable...


    PointedEars is absolutely correct here, Don. You can't post your
    serverside code and expect people to be able to offer you advice - you
    have to post the code that is generated and that you can see when you
    view source in the browser. Knowing what the server side code is
    doesn't tell anyone jackola about what is actually output by that
    code.

    If you can't read your own code's output, then how do you expect
    others to? I'm afraid the ugly answer is, is that you need to either
    clean up your code or use a different tool to generate it... (in my
    opinion ColdFusion is only one step above Frontpage - a toy, not a dev
    tool! :p)

    Good luck with your issue, and with learning what is actually going on
    with the code you're producing!

    Tyler
     
    Logos, Mar 22, 2008
    #9
  10. Don Li

    Don Li Guest

    On Mar 22, 8:49 am, Logos <> wrote:
    > PointedEars is absolutely correct here, Don.  You can't post your
    > serverside code and expect people to be able to offer you advice - you
    > have to post the code that is generated and that you can see when you
    > view source in the browser.  Knowing what the server side code is
    > doesn't tell anyone jackola about what is actually output by that
    > code.
    >
    > If you can't read your own code's output, then how do you expect
    > others to?  I'm afraid the ugly answer is, is that you need to either
    > clean up your code or use a different tool to generate it... (in my
    > opinion ColdFusion is only one step above Frontpage - a toy, not a dev
    > tool! :p)
    >
    > Good luck with your issue, and with learning what is actually going on
    > with the code you're producing!
    >
    > Tyler


    Tyler,

    Cold Fusion 8 uses lots of open source javascript packages including
    Ext, YUI etc. hence, the page in question loading tons of javascript
    code from these freebies, hence, it did not make sense to copy over
    and paste zillion line of these js code here... but points well taken
    and you guys are absolutely right. FF's extension Firebug seems a
    great debugging tool, with it, now I've identified some problems.

    New Attempt Background Info:
    a) I've now added HTML and its end tag to wrap each instance of data
    set in the output;
    though it's against logic because this section is already inside
    HTML tag, but oh well...
    b) Added javascript definitions and references in the HEAD section for
    each iframe that each instance of data would work with.

    // Editor1 is for iframe content interface with a WYSIWG js function
    Editor1 = document.getElementById('iframe1').contentWindow.document;
    /* seems ok */

    // set data value
    var s1 = 'dynamic data set';
    // set value for the hidden field named text1
    document.getElementById('text1').value = s1;
    /* seems ok */

    // populate each iframe src
    var D = window.frames['iframe1'].document;
    D.open();
    D.write('<html>' + s1 + '</html>');
    D.close();
    /* not working, not sure why */

    Many thanks.

    Don
     
    Don Li, Mar 22, 2008
    #10
  11. Don Li

    VK Guest

    On Mar 22, 8:13 pm, Don Li <> wrote:
    > // populate each iframe src
    > var D = window.frames['iframe1'].document;
    > D.open();
    > D.write('<html>' + s1 + '</html>');
    > D.close();
    > /* not working, not sure why */


    Because your script gets broken somewhere before this point: check
    Tools > Error Console in Firefox for error messages.

    It also can be a security block, the most common errors of this kind
    are:
    1) The initial iframe src loads a page from another domain OR from
    another subdomain of the same domain - neither is allowed for
    scripting later.
    2) The initial iframe src is set to "" (empty string) or not set at
    all - neither is allowed for scripting later.
    3) The initial iframe src is set to "about:blank" or some other
    internal page - neither is allowed for scripting later with higher
    security settings.

    So check that each involved iframe has src attribute set to some
    _real_ page in the same subdomain of your domain as the page itself.
    Any site using (i)frames has for such purpose some minimalistic
    blank.html page without any content and with the background-color
    matching the color of the main page, something like
    <html><body bgcolor="#FFFFFF"></body></html>
    If you don't have such page yet then make it now - and of course you
    don't have to name it "blank.html", name it any way you want. From now
    one take a habit to always point to this page for all your dynamic
    (i)frames and enjoy a much more peaceful life :)

    P.S. A working demo - Untitled1.html assumed to be in the same
    directory where this page is:

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
    <html lang="en-US">
    <head>
    <meta http-equiv="Content-type"
    content="text/html; charset=iso-8859-1">
    <title>Demo</title>
    <script type="text/javascript">

    function init() {
    var doc = self.frames['out'].document;
    if ('designMode' in doc) {
    //self.frames['out'].document.designMode = 'on';
    }
    doc.clear();
    doc.open('text/html','replace');
    doc.write('<html><body>Hello!</body></html>');
    doc.close();
    }

    function releaseContextAndInit() {
    window.setTimeout('init()',10);
    }
    window.onload = releaseContextAndInit;
    </script>
    </head>
    <body>
    <h1>Demo</h1>
    <iframe name="out" src="Untitled1.html"
    contenteditable="true"></iframe>
    </body>
    </html>
     
    VK, Mar 22, 2008
    #11
  12. Don Li

    Don Li Guest

    On Mar 22, 1:45 pm, VK <> wrote:
    > ...
    > function releaseContextAndInit() {
    >  window.setTimeout('init()',10);}
    >
    > window.onload = releaseContextAndInit;
    > </script>
    > </head>
    > <body>
    > <h1>Demo</h1>
    > <iframe name="out" src="Untitled1.html"
    >  contenteditable="true"></iframe>
    > </body>
    > </html>


    Sorry my problem statement wasn't clear enough. The page would have
    multiple iframes, the src of each of them would be populated with data
    set from a db table, not some existinig html file(s).
     
    Don Li, Mar 22, 2008
    #12
  13. Don Li

    VK Guest

    On Mar 22, 9:53 pm, Don Li <> wrote:
    > Sorry my problem statement wasn't clear enough. The page would have
    > multiple iframes, the src of each of them would be populated with data
    > set from a db table, not some existinig html file(s).


    Please take a look at the code I posted and my comments. I do
    understand very clear what you are trying to achieve. Your iframes can
    have any content your want right after the page is loaded. But in the
    HTML source they have to have src attribute set to a real HTML file or
    the bird won't fly:
    ....
    <iframe name="out1" src="blank.html></iframe>
    <iframe name="out2" src="blank.html></iframe>
    <iframe name="out3" src="blank.html></iframe>
    ....
    <iframe name="out33" src="blank.html></iframe>
    ....

    NOW you can use your script to populate your iframes with any content
    you want. And the most common mistake I was mentioning is something
    like:
    <iframe name="out1"></iframe>
    or
    <iframe name="out1" src=""></iframe>
    "because there is not any initial page in my solution" - and it just
    doesn't work this way.

    Study my sample I have posted, you can uncomment
    //self.frames['out'].document.designMode = 'on';
    as well: it doesn't matter.
     
    VK, Mar 22, 2008
    #13
  14. Don Li

    Don Li Guest

    On Mar 22, 3:05 pm, VK <> wrote:
    > On Mar 22, 9:53 pm, Don Li <> wrote:
    >
    > > Sorry my problem statement wasn't clear enough.  The page would have
    > > multiple iframes, the src of each of them would be populated with data
    > > set from a db table, not some existinig html file(s).

    >
    > Please take a look at the code I posted and my comments. I do
    > understand very clear what you are trying to achieve. Your iframes can
    > have any content your want right after the page is loaded. But in the
    > HTML source they have to have src attribute set to a real HTML file or
    > the bird won't fly:
    > ...
    > <iframe name="out1" src="blank.html></iframe>
    > <iframe name="out2" src="blank.html></iframe>
    > <iframe name="out3" src="blank.html></iframe>
    > ...
    > <iframe name="out33" src="blank.html></iframe>
    > ...
    >
    > NOW you can use your script to populate your iframes with any content
    > you want. And the most common mistake I was mentioning is something
    > like:
    > <iframe name="out1"></iframe>
    > or
    > <iframe name="out1" src=""></iframe>
    > "because there is not any initial page in my solution" - and it just
    > doesn't work this way.
    >
    > Study my sample I have posted, you can uncomment
    > //self.frames['out'].document.designMode = 'on';
    > as well: it doesn't matter.


    Thank you. I tried your sample twice.
    a) when loaded from a web server, it loaded data into the iframe,
    however, not editable;
    b) opened it as a file, IE7 blocked it and ask for permission, after
    granting it then loaded data into the iframe, however, not editable;
    So, I think you're exactly right it's related security issue, but why
    with the same security setting, another WYSIWYG editor can load data
    and allow editing and so forth?
     
    Don Li, Mar 22, 2008
    #14
  15. Don Li

    VK Guest

    On Mar 23, 12:05 am, Don Li <> wrote:
    > On Mar 22, 3:05 pm, VK <> wrote:
    >
    >
    >
    > > On Mar 22, 9:53 pm, Don Li <> wrote:

    >
    > > > Sorry my problem statement wasn't clear enough. The page would have
    > > > multiple iframes, the src of each of them would be populated with data
    > > > set from a db table, not some existinig html file(s).

    >
    > > Please take a look at the code I posted and my comments. I do
    > > understand very clear what you are trying to achieve. Your iframes can
    > > have any content your want right after the page is loaded. But in the
    > > HTML source they have to have src attribute set to a real HTML file or
    > > the bird won't fly:
    > > ...
    > > <iframe name="out1" src="blank.html></iframe>
    > > <iframe name="out2" src="blank.html></iframe>
    > > <iframe name="out3" src="blank.html></iframe>
    > > ...
    > > <iframe name="out33" src="blank.html></iframe>
    > > ...

    >
    > > NOW you can use your script to populate your iframes with any content
    > > you want. And the most common mistake I was mentioning is something
    > > like:
    > > <iframe name="out1"></iframe>
    > > or
    > > <iframe name="out1" src=""></iframe>
    > > "because there is not any initial page in my solution" - and it just
    > > doesn't work this way.

    >
    > > Study my sample I have posted, you can uncomment
    > > //self.frames['out'].document.designMode = 'on';
    > > as well: it doesn't matter.

    >
    > Thank you. I tried your sample twice.
    > a) when loaded from a web server, it loaded data into the iframe,
    > however, not editable;
    > b) opened it as a file, IE7 blocked it and ask for permission, after
    > granting it then loaded data into the iframe, however, not editable;
    > So, I think you're exactly right it's related security issue


    In this particular case it is most probably either copy-and-past error
    from your side or some other script block interference:

    http://www.geocities.com/schools_ring/tmp/editable.html

    works just fine for me for both Firefox and IE. The only change I have
    made against of what I already posted is splitting tags in
    document.write:
    doc.write('<ht'+'ml><bod'+'y>Hello!</b'+'ody></h'+'tml>')
    It is absolutely irrelevant to the subject, it is just to prevent
    Yahoo! from inserting their HTML crap right into middle of the script
    so breaking it.
     
    VK, Mar 22, 2008
    #15
  16. Don Li

    Don Li Guest

    > > Thank you.  I tried your sample twice.
    > > a) when loaded from a web server, it loaded data into the iframe,
    > > however, not editable;
    > > b) opened it as a file, IE7 blocked it and ask for permission, after
    > > granting it then loaded data into the iframe, however, not editable;
    > > So, I think you're exactly right it's related security issue

    >
    > In this particular case it is most probably either copy-and-past error
    > from your side or some other script block interference:
    >
    > http://www.geocities.com/schools_ring/tmp/editable.html
    >
    > works just fine for me for both Firefox and IE. The only change I have
    > made against of what I already posted is splitting tags in
    > document.write:
    > doc.write('<ht'+'ml><bod'+'y>Hello!</b'+'ody></h'+'tml>')
    > It is absolutely irrelevant to the subject, it is just to prevent
    > Yahoo! from inserting their HTML crap right into middle of the script
    > so breaking it.- Hide quoted text -
    >
    > - Show quoted text -


    Your link works. The technique of setting iframe.src = 'a dynamic
    data set' also works as simple page (tested with IE7). The thing that
    is killing me is that, when I embed the javascript code inside the
    middle of an appliation page it failed to be called/executed. I
    understand the standard way to add js functions is to place them in
    the HTML head section, however, I have to bypass this rule for this
    case. Also, some one even suggested to place js the bottom of a page,
    which seems to suggest, js can be anywhere and I use inline short js
    command in the middle of nowhere all the time.

    From the execution block of your code and such difficulty I encounter
    (which shouldn't), I tend to draw a conclusion that some javascript
    kitty might be messing around my box, what do you think?

    Thanks.
     
    Don Li, Mar 22, 2008
    #16
  17. Don Li

    VK Guest

    On Mar 23, 2:23 am, Don Li <> wrote:
    > Your link works. The technique of setting iframe.src = 'a dynamic
    > data set' also works as simple page (tested with IE7). The thing that
    > is killing me is that, when I embed the javascript code inside the
    > middle of an appliation page it failed to be called/executed. I
    > understand the standard way to add js functions is to place them in
    > the HTML head section, however, I have to bypass this rule for this
    > case.


    There are some rules we have to bypass sometimes to get the things
    done: and there are some rules that cannot be bypassed because it is
    just not technically possible. It is hard to add anything valuable
    without seeing a minimum output HTML still demonstrating your problem.
     
    VK, Mar 23, 2008
    #17
  18. Don Li

    Don Li Guest

    On Mar 23, 1:58 pm, VK <> wrote:
    >
    > There are some rules we have to bypass sometimes to get the things
    > done: and there are some rules that cannot be bypassed because it is
    > just not technically possible. It is hard to add anything valuable
    > without seeing a minimum output HTML still demonstrating your problem.


    Thank you very much. This 'beast' (forgive me for the language), is
    part of Ext open source stuff... (not complaining).

    Following is the rendered code (and I've marked "PROBLEM AREA" as my
    speculation of culprit close to the bottom). I'm indebted to you and
    I've tried and also commented out your
    "
    function releaseContextAndInit() {
    window.setTimeout('init()',10);
    }
    window.onload = releaseContextAndInit;
    "
    code, I think I understand why you wrote that...

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head><script type="text/javascript">_cf_loadingtexthtml="<div
    align='center'><img src='/resources/cf/images/loading.gif'/>";
    _cf_contextpath="";
    _cf_ajaxscriptsrc="/CFIDE/scripts/ajax";
    _cf_jsonprefix='//';
    _cf_clientid='8CB7C279BB2DF5C9898043CD52062AD3';</script><script
    type="text/javascript" src="/ajax/messages/cfmessage.js"></script>
    <script type="text/javascript" src="/scripts/ajax/package/cfajax.js"></
    script>
    <script type="text/javascript" src="/scripts/ajax/yui/yahoo-dom-event/
    yahoo-dom-event.js"></script>
    <script type="text/javascript" src="/scripts/ajax/yui/animation/
    animation-min.js"></script>
    <script type="text/javascript" src="/scripts/ajax/ext/adapter/yui/ext-
    yui-adapter.js"></script>
    <script type="text/javascript" src="/scripts/ajax/ext/ext-core.js"></
    script>
    <script type="text/javascript" src="/scripts/ajax/ext/package/
    resizable.js"></script>

    <script type="text/javascript" src="/scripts/ajax/ext/package/dragdrop/
    dragdrop.js"></script>
    <script type="text/javascript" src="/scripts/ajax/ext/package/
    util.js"></script>
    <script type="text/javascript" src="/scripts/ajax/ext/build/state/
    State-min.js"></script>
    <script type="text/javascript" src="/scripts/ajax/ext/package/widget-
    core.js"></script>
    <script type="text/javascript" src="/scripts/ajax/ext/package/dialog/
    dialogs.js"></script>
    <script type="text/javascript" src="/scripts/ajax/package/
    cfwindow.js"></script>
    <script type="text/javascript" src="/scripts/ajax/ext/package/tabs/
    tabs.js"></script>
    <script type="text/javascript" src="/scripts/ajax/package/
    cflayout.js"></script>
    <script type="text/javascript" src="/scripts/cfform.js"></script>

    <script type="text/javascript" src="/scripts/masks.js"></script>
    <script type="text/javascript" src="/scripts/cfformhistory.js"></
    script>
    <script type="text/javascript" src="/scripts/ajax/yui/autocomplete/
    autocomplete-min.js"></script>
    <script type="text/javascript" src="/scripts/ajax/package/
    cfautosuggest.js"></script>

    <title>XYZ</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <meta name="keywords" content="XYZ">
    <meta name="description" content="XYZ">
    <script language="JavaScript" src="/Speller.js"></script>
    <style type="text/css">
    #projectautosuggest {
    z-index:10;
    }
    </style>
    <link rel="stylesheet" type="text/css" href="/scripts/ajax/resources/
    ext/css/ext-all.css" />
    <link rel="stylesheet" type="text/css" href="/scripts/ajax/resources/
    cf/cf.css" />
    <link rel="stylesheet" type="text/css" href="/scripts/ajax/resources/
    yui/yui.css" />

    <script type="text/javascript">
    ColdFusion.Ajax.importTag('CFAJAXPROXY');
    </script>

    <script type="text/javascript">
    ColdFusion.Ajax.importTag('CFWINDOW');
    </script>

    <script type="text/javascript">
    ColdFusion.Ajax.importTag('CFPOD');

    </script>

    <script type="text/javascript">
    ColdFusion.Ajax.importTag('CFLAYOUT-TAB');
    </script>

    <script type="text/javascript">
    ColdFusion.Ajax.importTag('CFFORM');
    </script>

    <script type="text/javascript">
    ColdFusion.Ajax.importTag('CFDIV');
    </script>

    <script type="text/javascript">
    ColdFusion.Ajax.importTag('CFINPUT-AUTOSUGGEST');
    </script>

    <script type="text/javascript">
    var _cf_window_init_1206302048158=function()
    {
    var _cf_window=ColdFusion.Window.create('tview','S View','',
    { modal:false, closable:true, divid:'cf_window1206302048157',
    draggable:true, resizable:true, fixedcenter:false, width:500, height:
    300, shadow:true, headerstyle:'background-
    color:#BDD3FF;color:#FFFFFF', callfromtag:true, minwidth:0, minheight:
    0, initshow:false});
    };ColdFusion.Event.registerOnLoad(_cf_window_init_1206302048158);
    </script>

    <script type="text/javascript">
    var _cf_window_init_1206302048160=function()
    {
    var _cf_window=ColdFusion.Window.create('tview','T View','',
    { modal:false, closable:true, divid:'cf_window1206302048159',
    draggable:true, resizable:true, fixedcenter:false, width:500, height:
    300, shadow:true, headerstyle:'background-
    color:#BDD3FF;color:#FFFFFF', callfromtag:true, minwidth:0, minheight:
    0, initshow:false});
    };ColdFusion.Event.registerOnLoad(_cf_window_init_1206302048160);
    </script>

    <script type="text/javascript">
    var _cf_window_init_1206302048168=function()
    {
    _cf_bind_init_1206302048169=function()
    {
    ColdFusion.Bind.register([],{'bindTo':'myMAIN_body','bindExpr':
    ['myMAIN.cfm']},ColdFusion.Bind.urlBindHandler,false);
    };ColdFusion.Event.registerOnLoad(_cf_bind_init_1206302048169);var
    _cf_window=ColdFusion.Window.create('myMAIN','XZY','myMAIN.cfm',
    { modal:false, closable:false, divid:'cf_window1206302048167',
    draggable:true, resizable:true, fixedcenter:false, width:910, height:
    566, shadow:true, headerstyle:'background-
    color:#BDD3FF;color:#FFFFFF', callfromtag:true, minwidth:0, minheight:
    0, initshow:true, x:50, y:40});
    };ColdFusion.Event.registerOnLoad(_cf_window_init_1206302048168);
    </script>
    </head>

    <body>
    <div id="cf_window1206302048157" class="yuiextdlg">


    <div id="tview_title" class="x-dlg-hd" style="background-
    color:#BDD3FF;color:#FFFFFF;">
    S View
    </div>
    <div id="tview_body" class="x-dlg-bd">


    </div>
    </div> <div id="cf_window1206302048159" class="yuiextdlg">

    <div id="tview_title" class="x-dlg-hd" style="background-
    color:#BDD3FF;color:#FFFFFF;">
    T View
    </div>

    <div id="t_body" class="x-dlg-bd">


    </div>
    </div> <div id="cf_window1206302048161" class="yuiextdlg">

    // PROBLEM AREA starts
    <div id="cf_window1206302048167" class="yuiextdlg">

    <div id="myMAIN_title" class="x-dlg-hd" style="background-
    color:#BDD3FF;color:#FFFFFF;">
    XYZ
    </div>
    <div id="myMAIN_body" class="x-dlg-bd">


    </div>

    </div>
    // PROBLEM AREA ends

    </body>
    </html>
     
    Don Li, Mar 23, 2008
    #18
  19. Don Li

    VK Guest

    On Mar 23, 11:12 pm, Don Li <> wrote:
    > <html xmlns="http://www.w3.org/1999/xhtml">
    > <head><script type="text/javascript">_cf_loadingtexthtml="<div
    > align='center'><img src='/resources/cf/images/loading.gif'/>";
    > _cf_contextpath="";
    > _cf_ajaxscriptsrc="/CFIDE/scripts/ajax";
    > _cf_jsonprefix='//';
    > _cf_clientid='8CB7C279BB2DF5C9898043CD52062AD3';</script><script
    > type="text/javascript" src="/ajax/messages/cfmessage.js"></script>
    > <script type="text/javascript" src="/scripts/ajax/package/cfajax.js"></
    > script>
    > <script type="text/javascript" src="/scripts/ajax/yui/yahoo-dom-event/
    > yahoo-dom-event.js"></script>
    > <script type="text/javascript" src="/scripts/ajax/yui/animation/
    > animation-min.js"></script>
    > <script type="text/javascript" src="/scripts/ajax/ext/adapter/yui/ext-
    > yui-adapter.js"></script>
    > <script type="text/javascript" src="/scripts/ajax/ext/ext-core.js"></
    > script>
    > <script type="text/javascript" src="/scripts/ajax/ext/package/
    > resizable.js"></script>
    >
    > <script type="text/javascript" src="/scripts/ajax/ext/package/dragdrop/
    > dragdrop.js"></script>
    > <script type="text/javascript" src="/scripts/ajax/ext/package/
    > util.js"></script>
    > <script type="text/javascript" src="/scripts/ajax/ext/build/state/
    > State-min.js"></script>
    > <script type="text/javascript" src="/scripts/ajax/ext/package/widget-
    > core.js"></script>
    > <script type="text/javascript" src="/scripts/ajax/ext/package/dialog/
    > dialogs.js"></script>
    > <script type="text/javascript" src="/scripts/ajax/package/
    > cfwindow.js"></script>
    > <script type="text/javascript" src="/scripts/ajax/ext/package/tabs/
    > tabs.js"></script>
    > <script type="text/javascript" src="/scripts/ajax/package/
    > cflayout.js"></script>
    > <script type="text/javascript" src="/scripts/cfform.js"></script>
    >
    > <script type="text/javascript" src="/scripts/masks.js"></script>
    > <script type="text/javascript" src="/scripts/cfformhistory.js"></
    > script>
    > <script type="text/javascript" src="/scripts/ajax/yui/autocomplete/
    > autocomplete-min.js"></script>
    > <script type="text/javascript" src="/scripts/ajax/package/
    > cfautosuggest.js"></script>


    Holly mother of Lord! I just love those corporate Frankenstein style
    solutions. The only difference is that the resulting walking dead is
    made not by one but by a whole set of mad doctors. :)
    I just hope that you are getting a sufficient pay for digging in this
    mess. :)

    > <title>XYZ</title>
    > <meta http-equiv="Content-Type" content="text/html;
    > charset=iso-8859-1">
    > <meta name="keywords" content="XYZ">
    > <meta name="description" content="XYZ">
    > <script language="JavaScript" src="/Speller.js"></script>
    > <style type="text/css">
    > #projectautosuggest {
    > z-index:10;
    > }
    > </style>
    > <link rel="stylesheet" type="text/css" href="/scripts/ajax/resources/
    > ext/css/ext-all.css" />
    > <link rel="stylesheet" type="text/css" href="/scripts/ajax/resources/
    > cf/cf.css" />
    > <link rel="stylesheet" type="text/css" href="/scripts/ajax/resources/
    > yui/yui.css" />
    >
    > <script type="text/javascript">
    > ColdFusion.Ajax.importTag('CFAJAXPROXY');
    > </script>
    >
    > <script type="text/javascript">
    > ColdFusion.Ajax.importTag('CFWINDOW');
    > </script>
    >
    > <script type="text/javascript">
    > ColdFusion.Ajax.importTag('CFPOD');
    >
    > </script>
    >
    > <script type="text/javascript">
    > ColdFusion.Ajax.importTag('CFLAYOUT-TAB');
    > </script>
    >
    > <script type="text/javascript">
    > ColdFusion.Ajax.importTag('CFFORM');
    > </script>
    >
    > <script type="text/javascript">
    > ColdFusion.Ajax.importTag('CFDIV');
    > </script>
    >
    > <script type="text/javascript">
    > ColdFusion.Ajax.importTag('CFINPUT-AUTOSUGGEST');
    > </script>
    >
    > <script type="text/javascript">
    > var _cf_window_init_1206302048158=function()
    > {
    > var _cf_window=ColdFusion.Window.create('tview','S View','',
    > { modal:false, closable:true, divid:'cf_window1206302048157',
    > draggable:true, resizable:true, fixedcenter:false, width:500, height:
    > 300, shadow:true, headerstyle:'background-
    > color:#BDD3FF;color:#FFFFFF', callfromtag:true, minwidth:0, minheight:
    > 0, initshow:false});
    > };ColdFusion.Event.registerOnLoad(_cf_window_init_1206302048158);
    > </script>
    >
    > <script type="text/javascript">
    > var _cf_window_init_1206302048160=function()
    > {
    > var _cf_window=ColdFusion.Window.create('tview','T View','',
    > { modal:false, closable:true, divid:'cf_window1206302048159',
    > draggable:true, resizable:true, fixedcenter:false, width:500, height:
    > 300, shadow:true, headerstyle:'background-
    > color:#BDD3FF;color:#FFFFFF', callfromtag:true, minwidth:0, minheight:
    > 0, initshow:false});
    > };ColdFusion.Event.registerOnLoad(_cf_window_init_1206302048160);
    > </script>
    >
    > <script type="text/javascript">
    > var _cf_window_init_1206302048168=function()
    > {
    > _cf_bind_init_1206302048169=function()
    > {
    > ColdFusion.Bind.register([],{'bindTo':'myMAIN_body','bindExpr':
    > ['myMAIN.cfm']},ColdFusion.Bind.urlBindHandler,false);
    > };ColdFusion.Event.registerOnLoad(_cf_bind_init_1206302048169);var
    > _cf_window=ColdFusion.Window.create('myMAIN','XZY','myMAIN.cfm',
    > { modal:false, closable:false, divid:'cf_window1206302048167',
    > draggable:true, resizable:true, fixedcenter:false, width:910, height:
    > 566, shadow:true, headerstyle:'background-
    > color:#BDD3FF;color:#FFFFFF', callfromtag:true, minwidth:0, minheight:
    > 0, initshow:true, x:50, y:40});
    > };ColdFusion.Event.registerOnLoad(_cf_window_init_1206302048168);
    > </script>
    > </head>
    >
    > <body>
    > <div id="cf_window1206302048157" class="yuiextdlg">
    >
    > <div id="tview_title" class="x-dlg-hd" style="background-
    > color:#BDD3FF;color:#FFFFFF;">
    > S View
    > </div>
    > <div id="tview_body" class="x-dlg-bd">
    >
    > </div>
    > </div> <div id="cf_window1206302048159" class="yuiextdlg">
    >
    > <div id="tview_title" class="x-dlg-hd" style="background-
    > color:#BDD3FF;color:#FFFFFF;">
    > T View
    > </div>
    >
    > <div id="t_body" class="x-dlg-bd">
    >
    > </div>
    > </div> <div id="cf_window1206302048161" class="yuiextdlg">
    >
    > // PROBLEM AREA starts
    > <div id="cf_window1206302048167" class="yuiextdlg">
    >
    > <div id="myMAIN_title" class="x-dlg-hd" style="background-
    > color:#BDD3FF;color:#FFFFFF;">
    > XYZ
    > </div>
    > <div id="myMAIN_body" class="x-dlg-bd">
    >
    > </div>
    >
    > </div>
    > // PROBLEM AREA ends
    >
    > </body>
    > </html>


    Yes, but the problem area contains just one styled DIV with two nested
    styled DIV in it. There are not any IFRAME here. Is it supposed to be
    added later by some script block?
     
    VK, Mar 23, 2008
    #19
  20. Don Li

    Don Li Guest

    >
    > >   // PROBLEM AREA starts
    > >      <div  id="cf_window1206302048167" class="yuiextdlg">

    >
    > >         <div  id="myMAIN_title" class="x-dlg-hd" style="background-
    > > color:#BDD3FF;color:#FFFFFF;">
    > >                 XYZ
    > >          </div>
    > >         <div  id="myMAIN_body" class="x-dlg-bd">

    >
    > >          </div>

    >
    > >  </div>
    > >  // PROBLEM AREA ends

    >
    > > </body>
    > > </html>

    >
    > Yes, but the problem area contains just one styled DIV with two nested
    > styled DIV in it. There are not any IFRAME here. Is it supposed to be
    > added later by some script block?- Hide quoted text -
    >
    > - Show quoted text -- Hide quoted text -


    Sorry for lack of clarity. The <PROBLEM AREA/> is supposed to entail
    the following test code:
    --------------------------------
    main page
    <form id="nutsFrm" method="post">
    <iframe name="out" id="out" src="Untitled1.html"
    contenteditable="true" style="width:300px; height:150px"></iframe><br/
    >

    </form>

    <form id="nutsFrm2" method="post">
    <iframe name="nuts2" id="nuts2" style="width:300px; height:150px"></
    iframe><br/>
    </form>
    --------------------------------

    If I use simple other language's equivalent of "include" then it would
    work (both your method and mine), however, it would LOSE the benefit
    of very impressive presentation that is provided by a specific
    function called CFWINDOW here (this app is literally sits inside it).
    Hence, I'm caught in a very difficult situation...

    Now a related question, other than setting iframe's designMode to
    "On", is there another way that would allow similar function, that is,
    WYSIWYG editing?

    Many thanks.
     
    Don Li, Mar 23, 2008
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chandra
    Replies:
    0
    Views:
    652
    Chandra
    Apr 12, 2007
  2. Scott
    Replies:
    6
    Views:
    1,020
    [MSFT]
    Apr 14, 2004
  3. Daedalous
    Replies:
    3
    Views:
    823
    Daedalous
    Jan 16, 2004
  4. Vincent van Beveren

    IFRAME initalization and stylesheet in DOM-created IFRAME

    Vincent van Beveren, Jun 14, 2004, in forum: Javascript
    Replies:
    7
    Views:
    227
  5. Russell
    Replies:
    2
    Views:
    327
    Russell
    Sep 13, 2004
Loading...

Share This Page