custom tnWeb pages

I have a slightly modified version of the ViewDocContents.dsp page where I am adding a button that invokes another service. The code for the button is fairly simple

[SIZE=2]


<input onclick=“javascript:%invoke XXXX_CustomerService.tnweb.configFlow:sendToWMTest%”; type=“submit” value=“SendToTest” name=“sizeButton” class=“smallbutton”>

Problem is the page invokes the service every time the page is loaded. It does not invoke it when the button is pressed (onClick)

Any ideas ? sendDocOther TN page because the data is in raw EDI format.
[/size]

You should reread the docs on creating .dsp pages and on how to submit forms to IS. The tags (such as %invoke…%) supported within .dsp pages are executed on the server, not the client. They are not Javascript. So the use of onclick and javascript to try to invoke an IS service will not work.

Review how ViewDocContents.dsp (and other TNWeb pages) work and follow those as examples.

Thanks for the help…When reviewing the docs I realized the sendDoc DSP page was the way to go (rather than the button). I am able to get a XML document over to the other TN but how would I send a EDI format document ? I reviewd the documentation for the wmEDI package and found nothing relating to the tnWeb.

The name of the field containing the EDI string needs to be edidata. TN receive will process that field properly as EDI if it is present in the pipeline. Review WmEDIforTN\pub\submitEDI.html for an example.