2 Replies Latest reply: Dec 7, 2011 4:56 PM by xiaoftel
xiaoftel Level 1 Level 1 (0 points)

Hi,

 

I am new to webobjects and javascript. I have a AjaxUpdateLink action to change some value inside of an IFrame. I tried to put the IFrame into an AjaxUpdateContainer but seems not work.

Then I want to try

document.getElementById('iframe').contentWindow.document.getElementById('txt').v alue = 'test successful'

by put it in to

How can I trigger this or trigger the script inside WOActionResult java code.

 

Anyone can help? Many thanks


Mac OS X (10.6.5)
  • Ted Petrosky Level 4 Level 4 (1,855 points)

    can you show your code? both the html and the WOD .

     

    Ted

  • xiaoftel Level 1 Level 1 (0 points)

    Hi Ted,

     

    For the main component:

    In the html:

    <wo:AjaxUpdateContainer id = "editform">

    <webobject name = "content" />

    </wo:AjaxUpdateContainer>

     

    <webobject name = "TagHpyerLink"> </webobject>


     

    In the wod:

     

    TagHpyerLink : AjaxUpdateLink {

      string = "change this";

      action = change;

      updateContainerID = "editform";

    }

     

    content : WOIFrame {

    id = "iframe";

    pageName = "Page";

    height = "400px";

    width = "1170px";

     

    the Page component:

     

    html:

    <div><webobject name = "pagestring"></webobject></div>


    wod:

    pagestring : WOString {

              value = html;

      escapeHTML = "false";

    }

     

    I want to change the value of pagestring by AjaxUpdateLink change action but do not know how to do pass that via Iframe

     

    Thanks