webMathematica >

MSPReturn

MSPReturn[result, content]
return the result with the specified MIME content type
MSPReturn[result, content, filename]
set the filename associated with the response
  • MSPReturn allows a page to return something that is not an HTML result.
  • The three-argument form of MSPReturn is useful when you wish to set the filename associated with the response.
This example returns a Mathematica notebook directly to the client.
This example returns an XML fragment. These techniques can be useful for making informal web services for working with technologies such as Flash or JavaScript that have convenient tools for processing XML.
The three-argument form of MSPReturn is useful when you wish to set the filename associated with the response.
In this case the client might try to use a filename of mynotebook.nb. It should also be noted that for some clients, such as Internet Explorer, setting the filename header can cause the display of two Open or Save dialog boxes.