Safari shows source of html-file created by AppleScript

ok, this makes me kind of mad. I want to write some html-code out of a FileMaker Database out to a simple html-file so that I can show it to the users with the FileMaker webviewer. After some puzzeling I finally was able to find the right field and write it down to a file. It’s just simple HTML-code, nothing special.
But now Safari shows me just the source (same with the Webviewer) while Firefox (or also Dreamweaver) shows me the page. Does anyone have an explanation for this?

set myFile to (((path to home folder) as string) & "Sites:temp.html") as file specification
tell application "FileMaker Pro Advanced"
	tell database "GESAMTDATEI"
		set myText to field "HTMLBody" of last record of table "E_Mails"
	end tell
end tell

try
	open for access myFile with write permission
	set eof of myFile to 0
	write ("<html><body>" & myText & "</body></html>") to myFile
	close access myFile
end try

There is no need to write out to a file to display in FMP webview.

Add this line to the top of your html.

So a simple example is:

Cheers,

Craig

I’m probably looking too far, but how does this work without saving to a file?

The tip with data/html wasn’t the solution for me, really strange.

Edit: ehm, don’t mind, I found the solution. :smiley: