cancel
Showing results for 
Search instead for 
Did you mean: 

Refresh IFrame

Former Member
0 Kudos

Dear NW developers,

I have a problem with an IFrame. I made two views in WebDynpro.

View one, called “DocView”, has an IFrame which shows a Word document which is stored in KM. View one has a button called “Edit Document”. This buttons starts view two, called “DocEdit”.

The DocEdit view makes it possible to edit the document (with the use of an office control) and to save the changes in KM. Saving the changes is done by the use of a “Save” button. Closing the DocEdit view is done by a “Close” button. This button fires an outbound plug to the DocView view.

The problem is that when going back from the DocEdit to DocView view the document shown in the IFrame is not updated. So the changes made in the DocEdit view are not shown in the DocView view.

Does someone know how to refresh an IFrame. So that the problem above is solved.

Thanks in advance.

Kind regards,

Marinus

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

After further searching I came on the idea to put a timer in the plug in of the DocView view. So when I go from the DocEdit view to the DocView view the plug in of the DocView enables a timer. The timer is set on 1 sec (minimum possible). When time timer fires its event I disable the timer. Because of the event fired by the timer the IFrame will refresh.

It is not the best solution ever. This because the user sees for 1 second the old KM Doc and then the updated one.

But I do not know a better solution.

Marinus

Former Member
0 Kudos

Hi Alex,

The code to get the URL of the doc is not in the init. It is in the doModify. The URL itself is put in a context attribute. This attribute is the source of the IFrame.

The KM URL doesn't change after the editing of a doc. So that stays the same.

A strange thing is. That if I do the next actions in the specific order, the document is updated:

- DocView -> Push Edit Doc Button (starts DocEdit view)

- DocEdit -> Edit doc + push Save button

- DocEdit -> Push Close button (go's back to DocView)

- DocView -> Document is not updated

- DocView -> Puch Edit Doc Button (starts DocEdit view)

- DocEdit -> Push Close button (go's back to DocView)

- DocView -> Document is updated

This behavior is very consistent so is this the key to a solution?

I really hope that you or someone else can help.

Marinus

Former Member
0 Kudos

Where did u write the code to get the URL of the doc of KM..Make sure that it is not in init.At the same time does any change happen to URL if u edit the docs?

AD