trying to figure out what happens in ongenerate eventI am trying to generate an outputfile and also save a dcr on 'ongenerate' eventIssue here: unable to figure out why I get two alerts. Any suggestion why I get it or am I missing anything.[html]IWEventRegistry.addFormHandler("onGenerate", fnGenerate);function fnGenerate(){alert("Generate");fnFillIn();IWPageGeneration.setOutputFile("tst.html");}function fnFillIn(){IWDatacapture.getItem("/rootcontainername/itemname").setValue("Value to be set");}[/html]
Please post your complete code. Do you get two alerts even when you save before Generating?
I get two alerts when ongenerate event but not on Save this is because in Ongenrate function I am trying to set the value of a DCT item so it going through the function and setting me the value which is resulting in the change of the DCR and its modification date so it is trying to save it first and coming through and giving me second alert and generating the page. when I comment the setvalue line in the function I get only one alert .. when ongenerate this is because there is no modification in the DCR.My question is how can I avoid the second alert, any suggestions.