Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

web viewer frustrations 1

Status
Not open for further replies.

Tearose

IS-IT--Management
Jan 12, 2005
241
US
We recently purchased a copy of FMP 8.5, to take advantage of the wev view capabilities. I had no problem with setting up the database and web viewer, but the lack of a browser Back button is frustrating. If I click on a link on the web page for a database entry, it goes to the new page. But if there is no back link on the new page, I can't get back where I was. Switching to another entry and back doesn't reset it. Anyone know a way to get it to go back to the programmed URL once you go to another webpage?
 
This can be done but you need to create your own back button.

Create a button and bind it to the SET WEB VIEWER script step (found under the Misc category)

Then enter the name of your web viewer object and choose the GO BACK option.

-Striker
 
Thanks Striker,
That sounds pretty easy to do. I can't get to it till tomorrow, so I'll let you know then if I run into problems.
Jill
 
I tried it, but I must be missing a step, because nothing happens when I click the button. The script just has the one step:
Set Web Viewer [Object Name: Databasename::Web_Address; Action: Reset]

Do I need something else?



 
A couple things:

1. You must name the web viewer object. The ability to name objects is pretty new for Filemaker so you may have never done this before. To name an object; while in the LAYOUT MODE pull down VIEW > OBJECT INFO (a small new dialog box should appear). Now select your web viewer object. Enter a name for the object, rember the name, and tab out of that dialog box.

2. Now open your script in the SET WEB VIEWER enter the name that you gave to the object in step 1. Then assign the ACTION to GO BACK.

3. Create a button and bind it to your script.

That should do it.

-Striker
 
You're right- I'm new to naming objects. I'll try this on Monday.
 
Ah! That works beautifully! Thank you.

Now I have a related question for a different database. I'm planning to add the webviewer to this other database, and initially have all records go to the same website.
1) is there an easy way to fill in the URL field to all 5000+ records at once?

2) That URL is actually a page on the website that will have a list of links. When I click on a link, I would like to change the URL in the record to this new URL. Is there a way to do that? Obviously, I can't copy and paste, since it doesn't tell me what the URL of the link is.
 
Hello Jill,

I think I understand what you want to do and I believe that it is possible.

The first thing you need to do is create your web viewer and assign it your static web address. In this example I will use ' Doing this will mean no matter what record you're on it will come up on Filemaker's home page. You will want to ensure that the 'Allow interaction with Web Viewer content' box is checked.

Give the web viewer a name just like you did earlier. In my example I'll use 'FM_Viewer'. I assume that you have a field in your DB named something like 'URL' where you want to house the URL of pages that you visit.

Now create a script and in it place the 'Set Field' command with a syntax something like this:

Set Field [TableName::URL; GetLayoutObjectAttribute ("FM_Viewer"; "Source")]

What this does is set the field called 'URL' in the table called 'TableName' to the URL currently displayed in the object called 'FM_Viewer'.

When you run the script it should get the URL from the current page and place it into the URL field on the current record.

-Striker
 
Thanks, Striker,
That sounds easy enough. I'm really glad I can do that. Then I'll only have to search through the whole list once for each record.It will be sooo much more convenient.
Jill
 
OK, I finally got to it last night, and the first part works fine- all records open the search page I need.
But so far, nothing happens when I run the Set Field script. Could there be more to it? Does it need the "" ? I'll try again tonight and play around with it. If I can't figure it out, I'll write the exact script in here, and maybe you can debug it for me.Thanks,
Jill
 
Here's the way the script looks now:
Set Field [Rose List::URL[GetLayoutObjectAttribute ("HMF"; "Source")]]

Rose List is the database. URL is the field I want the new web page to be listed in. HMF is the object name of the web viewer.

Nothing happens when I try to use it.
Jill
 
Hi Jill,

I had to re-read this thread to try to figure out exactly what you are trying to do. When I read it for the second time the last bit of help that I offered doesn't seem to make sense to me anymore. Could you restate exactly what you are trying to do once again so I can get me head around it?

Thanks!

-Striker
 
Ok, now it's set up that the web viewer goes to a search page on a certain website. The search page has a link for most of my records. Once I go to the linked page for a record, I want to change the default webpage to the new one, just for that record. Or at least record what the webpage is into the URL field, where I think I can script a button that will take me to it.

(The original search page will also have 5000+ entries in an alphabetical list, and I don't want to have to scroll through it every time I look at a record.)

Is that clearer?
 
Do I take this lack of response to mean you still can't figure out what I want to do, or that you have not figured out how I need to script it?
Jill
 
Sorry Jill, I got tied up and haven't been back here in a while. I'll try to get to this tonight but if anyone else has the answer feel fre to chime in.

PS. I'm never offended by others jumping in.

-Striker
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top