Menu

IFRAME and aynHTML

Help
2003-05-22
2004-05-25
  • Ian Ippolito

    Ian Ippolito - 2003-05-22

    First of all, this is a fantastic program...well written and the user interface is very nice.  I have actually written some ASP classes that make it easier to put multiple aynHTML textboxes on a form and that detect the browser and automatically 'degrade' them to the plain old textboxes if the user is using a downlevel browser...which I'll send to you if you're at all interested.

      But here is my question...I started trying to use the aynHTML and ran into an interesting problem.  The site already uses IFRAMEs to show ads, etc, because unlike using Javascript to show ads, if the ad server is down it doesn't hang the browser while it tries to load it. 
      The problem is that aynHTML text boxes don't seem to show up when IFRAMEs are on the page.  Is this a known issue and is there a workaround (other than not using IFRAMEs)?

    Thanks in advance and keep up the great work!

    Ian Ippolito

     
    • Denis Braet

      Denis Braet - 2003-05-22

      Hello Ian,

      I just ran a test with some IFRAMEs on a page which contained the editor, and I didn't encounter problems. 

      Could you post more details about the page you're having problems with.  It'd be handy to have the full HTML source...

      Grtz,

      mauser

       
    • Ian Ippolito

      Ian Ippolito - 2003-05-23

      Mauser,

      It turns out there is more to the issue.  The ad server was down when I ran the test so I assumed it was just the IFRAME itself causing it...but it is actually when there is an IFRAME to a page that isn't responding that does it!  A good way to simulate it is the following:

      <iframe src="http://www.yahoo.comx" ></iframe>

      That should be enough for you to duplicate it, but in case not...here is the entire page (below).  I'm wondering if this is simply a limitation of this client side technology?

      Ian

      <html xmlns:AI><head>
              <?import namespace="AI" implementation="/CrossWeb/include/CustomControls/RichTextBox/Files/aiEditor.htc" />
          </head>
          <body>
          mode:3mode-cached:3
              <form method=post action="RichTextBox_SampleAction.asp" id="frmMe">
             
              <TABLE>
                  <TR>
                      <TD>

                      <AI:aiEditor id="txtMyBox1_Rich"
                          save_method="custom"
                          color="buttonface"
                          emo_get="sample/text/emotes.xml"
                          font="Arial ,Verdana , Tahoma, Times New Roman"
                          font_size="6,8,9,10,11,12,13,14,16,20,24"
                          hide_btn="link,image,word,open,mode"
                          palette="web, system"
                          path="/CrossWeb/include/CustomControls/RichTextBox/Files/"
                          width=400 height=50>
                          txtMyBox1unique stuff
                      </AI:aiEditor>
                      <script language="javascript">txtMyBox1_Rich.onsave = mCustomSave_txtMyBox1;
                          function mCustomSave_txtMyBox1( e ) {
                              frmMe.elements("txtMyBox1").value=e.content;
                          }
                      </script>
                      <input type=hidden Id="Hidden2" value="" name="txtMyBox1">
                      </TD>
                  </TR>
                  <TR>
                      <TD>
                 
                      <AI:aiEditor id="txtMyBox2_Rich"
                          save_method="custom"
                          color="buttonface"
                          emo_get="sample/text/emotes.xml"
                          font="Arial ,Verdana , Tahoma, Times New Roman"
                          font_size="6,8,9,10,11,12,13,14,16,20,24"
                          hide_btn="link,image,word,open,mode"
                          palette="web, system"
                          path="/CrossWeb/include/CustomControls/RichTextBox/Files/"
                          width=600 height=100>
                          txtMyBox2unique stuff
                      </AI:aiEditor>
                      <script language="javascript">txtMyBox2_Rich.onsave = mCustomSave_txtMyBox2;
                          function mCustomSave_txtMyBox2( e ) {
                              frmMe.elements("txtMyBox2").value=e.content;
                          }
                      </script>
                      <input type=hidden Id="Hidden2" value="" name="txtMyBox2">
                      </TD>
                  </TR>
              </TABLE>
             
                  <input type="button" value="Ok" onclick="mCustomSave();" name="cmdOk" ID="cmdOk">
      <script language="javascript">
                      //function to save all rich text boxes on screen
                      function mCustomSave(e ) {
                          txtMyBox1_Rich.save();txtMyBox2_Rich.save();

                          frmMe.submit();
                      }
      </script>
                         
             
             

              <input type=text name="txtDate" value="1/1/2003" ID="Text1">
              </form>

      <iframe src="http://www.yahoo.comx" ></iframe>
      </body>
      </html>

       
    • Denis Braet

      Denis Braet - 2003-05-26

      Hello Ian,

      I see the problem now.  It seems to be an IE bug indeed: when the IFRAME doesn't load correctly, there's no onload event generated for the window object, and the editor's initialisation makes use of that event.

      As a workaround, try calling the method load() in the last line of the init() method.  That should work out all right for you.

       
    • Laurynas

      Laurynas - 2004-05-25

      Then I add iframe in php page.

      echo'
      <iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="No" height="400" width="600" src="../../editor/index.htm">
      </iframe>
      ';

      aynHTML editor NOT WORKING

      And normal page in another directory not working also:

      <html xmlns:AI>
      <head>
          <?import namespace="AI" implementation="../../editor/aiEditor.htc" />
          <script language="javascript">
              onload = function() {
                  aiEditor.append( 'id', 1 );
                  aiEditor.append( 'author', 'John Doe' );
                  aiEditor.append( 'author', 'John Q. Public' );
                  aiEditor.onbeforeload = function( e ) {
                      this.content = '';
                  }
              }
          </script>
          <link href="../../fonts.css" rel="stylesheet" type="text/css"><link href="../../links.css" rel="stylesheet" type="text/css">
          <style>

       

Log in to post a comment.

MongoDB Logo MongoDB