[plt-scheme] Re: Post a HTML file

From: Daniel Yoo (dyoo at cs.wpi.edu)
Date: Wed Apr 4 14:58:58 EDT 2007

> But then, where do I have to send the code read? ? D A editor-canvas%, a 
> text%...?

Hi Laurent,

I'm looking at your original question at:


It really sounds like you want to view a HTML file from your local browser 
window.  If that's so, you might want to look at the "sendurl.ss" module 
in the "net" package.  For example:

(module test-url-viewing mzscheme
   (require (lib "sendurl.ss" "net")
            (only (lib "file.ss") normalize-path))

   ;; view-html-file: path/string -> void
   ;; Opens up a web browser window for the given filename.
   (define (view-html-file filename)
     (let ([path (normalize-path filename)])
       (send-url (string-append "file:///" (path->string path)) #t))))

To find out more about this, search for the term "URL viewing" or 
"send-url" in the Help Desk.

Best of wishes!

Posted on the users mailing list.