none
Javascript - run when postback

    Question

  • Hi,

    I use the BDC modal dialog (from SharePoint) in my InfoPath form (in Forms Services). I use javascript to display it (after button click) and use parameters from him (I added this script to bform.js in SharePoint). I use this script to use functionality for my button:

    ...

    window.attachEvent(new Function("myFunction();"));

    ...

     

    Method is similar as there:  http://glorix.blogspot.com/2007/11/want-infopath-forms-with-custom-lookup.html

     

    This works good, but when I have postback of my page (for example when I call other web service), the button is reloaded and it stopped working, because I have attach my event to load of page. So I must refresh page (then button works again).

     

    How can I run my function after postback? Must I add call of this function somewhere? How exactly calling of web services and receiving from web services works in IP Forms Services? (I mean which javascript functions are called, or what is running when I do postback).

     

    Thank you very much.

    John.

     

     

    Thursday, November 29, 2007 5:36 PM