Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6853 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

Apologies - this was originally inadvertently posted in FMP8 General discussion

I was thrilled to find the Set Variable script step, and I'm trying to use it with Export Field Contents to build simple web sites - I build the contents of an html file in a calculation field then export that field for each record in a looping script. All files are created as expected.

My problem is as follows:

The exported HTML looks and loads fine in a browser window except that (for some reason) the reference to my style sheet does not work. (It does find an img tag reference.) If I paste the contents of the field into a new (BBEdit) text file and save it to the same location, the same style sheet reference does work.

I know at first glance it looks as though I've got the path to the style sheet wrong, but that idea's negated by the fact that pasting the field contents into BBEdit works.

Intriguing: If I try to open the file exported from FMP8 in DreamWeaver, I get a totally blank document, however DW is perfectly happy with the file taken through BBEdit.

Any insights/suggestions?

TIA

Edited by Guest
deleted second post
Posted

I'm having a somewhat similar problem with Export Field Contents. What I see when I open the text file in BBEdit is that it is encoded UTF-16. It works for some things. But it is not working for what I wanted to use it for, which is HTML with a lot of JavaScript intermingled. I find the same thing, that copy/paste to a file works fine. I tried xml/xsl export, that that took out the line breaks. What I ended up doing was using AppleScript and the do shell script command to create a file from the field. That works fine, and is pretty simple, though not cross-platform.

set theSites to POSIX path of (path to sites folder)

set theFile to theSites & "web page.html"

--tell application "FileMaker Pro Advanced"

copy cell "_cgHTML" of current record to exportMe

do shell script "echo -n " & quoted form of exportMe & " > " & theFile

-- -n prevents a final line feed from being added (not that it matters in this case)

--end tell

Posted

Thanks, Fenton. At least I know I'm not alone! As a totally unsatisfactory workaround I've embedded the style sheet.

I've had minimal experience with AppleScript and FMP but will give it a shot when I have the time. In this instance, platform is not an issue - this is for my use only.

Thanks again.

Posted

Further...

Having blithely uploaded my files, when I take a look at them from the server the file doesn't display properly at all. It shows two characters:

chars1.gif

immediately before the /p>

Opening the file in BBEdit using Unicode 16 encoding after a hint from Fenton shows (here at 96 point)???

chars.gif

If I open the file in BBEdit using Unicode 8 encoding I see this as the first two characters:

chars8.gif

Deleting those two chars and uploading results in:

chars8serv.gif

Now I'm getting worried.

This topic is 6853 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.