The STOP_PROCESSIGN didn't work. Does anyone have the solution? Thanks! Greg Turner <[EMAIL PROTECTED]> wrote: >I seem to remember the solution for this is to make the button a custom >button >and in the event handler for the button, return STOP_PROCESSING; > >Greg > > > >Hussein Zeytoun wrote: > >> Hello, >> I appreciate anybody's help on this. I have code under a netdynamics >> button when clicked, the user is able to download a file (text file) the >> file downloads fine but appended to the end of the file is the html of >> the page I'm on this is the code I'm using: >> >> // Open the file to download >> fileStream = new FileInputStream (file); >> // Read the contents of the disk >> //file into an in memory byte array >> int numberOfBytes = fileStream.available (); >> byte contents [] = new byte [numberOfBytes]; >> fileStream.read (contents); >> >> // Reset any previous HTTP header that have been automatically >> // sent by NetDynamics. >> CSpHttp.reset (); >> >> // Send the MIME type that should trigger the 'Save' request in >> CSpHttp.writeContentType (outputStream, "text/octet-stream"); >> >> // Flush the header. We have to do this because we are about to >> // send raw binary data, that bypasses the standard NetDynamics >> // handling of the outptut stream (i.e., caching) >> CSpHttp.flush (outputStream); >> >> // Write out & flush the binary data to the output stream >> outputStream.write (contents); >> outputStream.flush (); >> >> Thanks very much >> >> _________________________________________________________________________ >> >> For help in using, subscribing, and unsubscribing to the discussion >> forums, please go to: http://www.netdynamics.com/support/#forums >> >> For dire need help, email: [EMAIL PROTECTED] > >-- >Greg Turner, Intelligent Software >Box 1506 [EMAIL PROTECTED] >Mill Valley, CA 94942 http://www.hooked.net/~gturner/ > >"Java - Its Not Just For Breakfast Anymore" > > _________________________________________________________________________ To unsubscribe from this mailing list please send an email to: [EMAIL PROTECTED] Please remember to use the same email address you subscribed with. For help in using, subscribing, and unsubscribing to the discussion forums, please go to: http://www.netdynamics.com/support/visitdevfor.html For dire need help, email: [EMAIL PROTECTED]
