Javascript - run when postback


  • 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:


    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.




    Thursday, November 29, 2007 5:36 PM