Solved

Filemaker Pro Web Sharing issue

Posted on 2010-08-17
28
571 Views
Last Modified: 2012-05-10
I've set up my FMP database... Imported in my data and one of the things that gets imported in is raw html code that is sitting in my SQL servers database.

So I created a Web Viewer in Filemaker Pro and then set it as web address of...
 "data:text/html," & Inventory::Item Text

The data looks great in the Filemaker Pro program but when I open it in FireFox the web viewer just has a smaller grey outlined box.
So I figured maybe something with Firefox, so I tried for the first time to connect up to my web shared site using IE8 and I got page not found.. So I went to the local machine and tried IE and same thing, but it comes up just fine in FireFox..
Any ideas?
I also tried to find the webserver files but no luck. I do however have IIS installed on my machine running another site. But I chose a separate port for the FMP site

Thanks

Chip
0
Comment
Question by:OSXFreak
  • 15
  • 12
28 Comments
 

Author Comment

by:OSXFreak
ID: 33460376
OK I kind of know what was happening I was missing the http:// at the begining..
But now it lets me log in tot he website, but when it pops up, it starts to load, but then jumps to the frame and this shows in address bar..
data:text/html,

Any info on this part?

Chip
0
 
LVL 6

Expert Comment

by:ThomDroz
ID: 33460503
Hi Chip

I am a little confused by your example but... as your text string ("data:text/html,") is what is show
have you seen the results if you remove that??

Hope that helps

tom
0
 
LVL 8

Expert Comment

by:Tocacar
ID: 33462511
I have some web viewers that display google charts which work in all browsers (Mac & PC).  The URL components I use in the 'Set Web Viewer' script step are:

"data:text/html," & $reportcontent

The variable $reportcontent is put together earlier in the script and contains the following code:

"<html><meta http-equiv=" & Quote("Content-Type") & " content=" & Quote("text/html; charset=iso-8859-1") & "><style type=" & Quote("text/css") & ">
<!--
h1 {
      font-family: Verdana;
      font-size: 12pt;
      font-weight: normal;
      font-variant: normal;
}


p {
      font-family: Verdana;
      font-size: 10pt;
      font-weight: normal;
      font-variant: normal;

}


.footer {
         
         font-family: Verdana;
      font-size: x-small;
      font-weight: normal;
      font-variant: normal;
         text-align: right;
}


#allcontent {

width:700px;
margin-left:auto;
margin-right:auto;
      
            
}
-->
</style>

<body><div id=" & Quote ( "allcontent" ) & ">" &

Global::g_ReportName & "<hr />" &


Case (
Get ( ScriptParameter ) = "bar" ; $chart_bar  ;
Get ( ScriptParameter ) = "pie" ; $chart_pie  ;
 ) &

"<br /><br /><hr /><br /><p class=" & Quote ( "footer" ) & ">" & Get ( CurrentTimeStamp ) & "</p></div></body></html>"
0
 

Author Comment

by:OSXFreak
ID: 33464120
OK so a guess I was missing some KEY information :) oops..

I Imported the database from our SQL database for our eCommerce site. The programmers only give us select area's where we can write our own html coding,  like at the bottom of an items detail page. The name of the Column in SQL is called ItemText.

So when I imported that info in to the FMP database, and I looked at it in the FMP program it was showing my raw HTML code in that Field.

So a little googling led me to learn how to add in a website or raw html code using web viewer..
This is the code that I used, so it's puling the raw HTML code from the Item Text column in the FMP "Inventory" DB

So when I look at the Filemaker program Layout for the Form everything looks good.

BUT when I open it in FireFox (Windows) it shows it as a larger grey out lined box( the box of the web viewer),  and then a smaller grey outlined box on the inside of the web viewer box.

So I decided to try to see what happens when I use IE8 and the results are this..

I log in, it shows me a Bar (part of my layout), but then looks like it tries to load a separate page. I think it's trying to open the Web Viewer in the MAIN window rather then where I set it to open up at..

This is the CODE used in the Web viewer program..
"data:text/html," & Inventory::Item Text

In the address bar the only thing that shows when it looks like it's trying to load the web viewer is the first part.. "data:text/html,"

Thanks for helping me with this..

Chip
0
 
LVL 8

Expert Comment

by:Tocacar
ID: 33464148
Try putting the contents of Inventory::Item Text into a variable (let's say $itemtext) and include that in the URL, rather than the field.  Not sure if this will make the difference.

Now, when you say you "open it in Firefox", what exactly do you mean?
0
 

Author Comment

by:OSXFreak
ID: 33464176
Ok will try that.. now to learn how to add it to a variable LOL I'm  Such a n00b lol

Thanks
0
 

Author Comment

by:OSXFreak
ID: 33464232
As for firefox, let me try the variable part first, if it fails, I'll send you a link so you can see what it's doing :)

Chip
0
 
LVL 8

Expert Comment

by:Tocacar
ID: 33464243
Are you setting the web viewer with a script?  If not, create a script with the following steps:

set variable
  - double click the script step and give the variable a name starting with a $ sign, like:  $itemtext and in the empty field underneath
    select your field, or just free-type in "Inventory::Item Text"

set web viewer
  - in object name, enter something like "mywebviewer" (without the quote marks)
  - select URL and set it with "data:text/html," & $itemtext

That's all for the script - now go to your layout, enter layout mode and in the View menu, make sure there is a tick next to Object Info (if there is a small window will be showing with dimensions and some anchors on it).  Click your webview and in the Object Info window, enter "mywebviewer" (without the quotes) in the Object name field.

Now go into browse mode and run your script - what do you get?
0
 

Author Comment

by:OSXFreak
ID: 33464429
OK sorry to be difficult..  So do I create a NEW SCRIPT? By clicking on SCRIPT>Manage Scripts at the top of the screen.
Then make a New Script.. Name it $ItemText
then on the left I select Perform Script and this then puts Perform Script {<unknonw>]  

If I select specify it looks for a script.. I vicious circle I fear.. lol lol

Ok I guess I need to know what you mean by double click script. I'm using FileMaker Pro 11

Thanks and Sorry for being such a n00b :)
0
 
LVL 8

Expert Comment

by:Tocacar
ID: 33464475
I mean double click the script step.  You've got the steps right to create a new script; instead of calling the script $itemtext, call it My Web Viewer Script.  Now you should have a big white open box with a list of "script steps" on the left hand side.  In that list, find the 'Set Variable' script step (it's quite near the top, about an inch or so down) and the Set Web Viewer script step (it's very near the bottom of the list).  

Double click each script step to transport them into the big white empty box.  When they are in the white box, double click each one to set their parameters (follow the steps in my earlier post).  When you're done, close the script maker window (there's no close button, just close the window as you normally would) and opt to save the script.

To run the script, make sure you're on the layout that displays the web viewer and then select your script which now appears in the Scripts menu at the top of the screen.
0
 

Author Comment

by:OSXFreak
ID: 33464769
OK so close I can taste it..

see the attached images.. You will see that I have scripts set, but not sure what I'm missing on the webviewer part as nothign is now showing..

Thanks

Chip


scripts-settings.jpg
webviwer-info.jpg
0
 
LVL 8

Expert Comment

by:Tocacar
ID: 33464799
Did you do the bit where you go into Layout mode and make sure Object Info is ticked in the View menu, then click the webviewer and enter the exact same object name in the Object Info box as you put in the Set Web Viewer script step?
0
 
LVL 8

Expert Comment

by:Tocacar
ID: 33464812
BTW, I'm still using v10, so the Object Info bit has probably been replaced by the new Object Inspector panel.  Find a bit on there where you can give an object a name (you have to have the object selected though - in this case, make sure you've clicked the web viewer before you enter it's name)
0
 

Author Comment

by:OSXFreak
ID: 33465207
OK Tocacar,
I did a help and found that in FMP11 you have to do the below..

Naming objects
To name an object:
1.  In Layout mode, select the object or grouped object that you want to name.

For more information, see Selecting objects.
2.  Click Inspector  in the layout bar, then click Position.

3.  In the Position area, type a value for Name.

4.  Press Enter or Tab, or click outside the Inspector to apply the changes.

So I did this, and named it MyWebViewer

Closed out and came back in and selected the web viewer window and it still showed the name, so then I went back in to the WebViewer and removed the "data:text/html," & $ItemText from the web set up section of it.. I figured that needed to be done so that the script took over for that field since i named it..
But still have nothing showing up in Firefox or IE, although IE is no longer jumping to blank web page :).. when using Instant Web Publishing...
Strangely, in FMP program when in the actual program, I don't see any data in the webview box UNTIL I click on that box, then it pops in the html code.

But I think I have it set right like you suggested.. let me know if screen shots will help or even access to the website.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 8

Expert Comment

by:Tocacar
ID: 33465232
I'm going to be busy for the next couple of hours - can we pick this up again tomorrow (I'm on UK time)?  If anyone else wants to jump in and help you in the meantime, that would be great.  

I'll post again tomorrow.
0
 

Author Comment

by:OSXFreak
ID: 33465275
OK Perfect thanks for all your help I'll tinker and if I figure out what I'm doing wrong, I'll post what my findings where..

I truly appreciate it..

Chip
0
 
LVL 8

Expert Comment

by:Tocacar
ID: 33475690
Hi Chip

I'm back online.  Access to your website would be good, if that's possible.  If you're able to provide a sample of your file too, that would also be good.

Before you do, add another script step to the end of your script (after the set web viewer step) called 'Commit Record' and give it another whirl...

0
 

Author Comment

by:OSXFreak
ID: 33476963
Tocacar,
I tried the Commit Record and still nada. I assume I DO NOT put a check in the script step options..

One other thing I noticed was that if I'm in the FMP program, and click on the arrow to go to my different records, when I get to the record that should show the html code it doesn't show it UNTIL I click on the Web Viewer Box.. OR Select Scripts>MyWebScript from the menu.

As for the site it's not showing up in either IE or FireFox

How can I send you the IP info for my FMP site so you can see what I have happening?

Thanks

Chip
0
 
LVL 8

Expert Comment

by:Tocacar
ID: 33477071
If your site is available externally (i.e., outside your company firewall), just send me the link you're accessing it with.  If it isn't external, post a sample of your file and I'll put it on my server and have a look.

Re; the commit records step, click the 'Perform without dialog' just to see if it makes a difference ("with dialog" is not compatible with IWP so it should default to no dialog anyway, but it's worth a try).

It will be much easier to help you with a sample file, but I understand you might prefer not to post one.  I'm going offline again now for today (it's the time difference!), but if you do post a file I should have a reply ready for you when you log back in tomorrow.
0
 

Author Comment

by:OSXFreak
ID: 33477137
How do I get you a file.. Not worried about the file just part numbers and descriptions..
0
 
LVL 8

Expert Comment

by:Tocacar
ID: 33479013
Just logged in to see if you posted the sample file....

All you need to do is click the 'File' link (next to 'Code' and 'Image') which is underneath the box you type in to post a response and upload it.  Just upload a copy of the real file with all data removed except for a few dummy records showing data in the relevant fields (this way you protect your 'real' data).
0
 

Author Comment

by:OSXFreak
ID: 33479672
LOL ok that part I get.... The question I have is HOW do I get the FILE from FileMakerPro? lol lol lol

Thanks

Chip
0
 

Author Comment

by:OSXFreak
ID: 33480025
Tocacar

Figured it out. But could not figure out how to delete ALL data.. anyhow if you go to the record 6,7,8,9 or the one with product number of CL138KD you will see the Info in the Extended Description Currently in eCatalog. This is the HTML code..

IN my version of FMP the only way it POPs in is if I click on the webviewer, or do a run scripts.

Thanks

Chip
ContentProject-Copy.fp7
0
 

Author Comment

by:OSXFreak
ID: 33480061
on an unrelated topic, anyone ever hear of using FMP to help create HTML sites almost as a template.. I have a specified area at the bottom of our eCommerce website that allows us to drop any HTML code.

Just asking as I was originally looking to use Contribute and Dreamweaver ( I set up Template, Designers drop in pics and details in product..

Thanks
0
 
LVL 8

Accepted Solution

by:
Tocacar earned 500 total points
ID: 33483077
Hi Chip

I spent an hour and a half playing around with your file this morning and I can't get it to work.  I googled around and found that other people had problems publishing raw HTML in a webviewer viewed via IWP also.  Unfortunately, I don't have time to dig much deeper - maybe another expert can step in to help you here?

To get the webviewer to display content (when viewing directly within Filemaker) automatically, I added a script trigger to your Form View layout which runs your MyWebScript each time a record loads - see attached.  This may or may not be useful.  Obviously, I couldn't use your HTML code in the script because that's in your MySQL database which I cannot access, so you'll want to edit the 'set variable' script step to pick up the correct HTML.

Regarding using FMP to create HTML sites as a template - if you file is hosted on Filemaker Server, you can use Filemaker's PHP Site Assistant tool to automatically generate a PHP site based on your database.  This is a bit limited and clunky, but it works for simple stuff.  Alternatively, if you've got some experience with web development and PHP you can build your own PHP site from scratch using Filemaker's API for PHP (again only if you have Filemaker Server).  There are several books out there on how to do it, but I can highly recommend this one to get you up and running really quickly:  http://www.fmwebschool.com/api_book.php

Sorry I couldn't fully solve your problem.


ContentProject-Copy.fp7
0
 

Author Closing Comment

by:OSXFreak
ID: 33484297
Thanks for all your hard work... I will go purchase that book and if someone gives me any tips that work even If not from this site I will post here

Also thanks for the HTML info. Thinking were better off using contribute and dreamweaver.

One final Q..  In the file you will see that I have a picture box. In my SQL server it uses a relative link /picturecatrgory/123456.jpg

Anyway I can force it to grab the Uniate direct from webserver by adding in c:/directory1/ so it adds that to begining of the imported data and alway pulls latest picture. And any newly added images

Thanks
Chip
0
 
LVL 8

Expert Comment

by:Tocacar
ID: 33484396
Hi Chip
Thanks for the points.  Re; your final question, I didn't spot the actual question - can you clarify please and I'll see if I can help.

0
 

Author Comment

by:OSXFreak
ID: 33507217
Tocacar,

If you still have my sample DB, you will see the Picture box is pulling from the database PictureCategorirs/123456.jpg with the 123 changing for every part if unique.

In our SQl database, it has this pointing to a root folder for the website.

So I guess what I need is to have the data pulled from our SQL database which will pull the file directory of /picturecategories/123456.jpg, but I truly need it to point to c://Folder1/Folder2/picturecategories/123456.jpg

Is there a way to PULL that data from the SQL database and have it pull the picture rather then pull the actual text?

Thanks
Chip
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now