3 Replies Latest reply on Mar 29, 2011 10:22 AM by philmodjunk

    script help

    kurtnivy

      Title

      script help

      Post

      I am new to filemaker. But excited to be learning it. After thousands of dollars of loans for Devry university I figured I would be better off learning just one program then a little about all the microsoft stuff.

      Here's my question with background details:

      I have set my form up with two tabs. First tab is Bills and second tab is Web Site.  I would like to click on a label from Bills tab that will open a web page in the second tab(Web Site).  For example if I have a label that says AT&T on Bills tab I would like to click that label and have the web site tab open up and show the AT&T web page.  

      Better yet would be to have my monthly amount due show up in my field on the bills tab automatically. I am not sure if that can be done or allowed. If it can't I need to log into my AT&T account page and look at my amount due then put it manually into the field on my Bills tab. All with out leaving filemaker.

      Any help would be most appreciated.

      Kurt

        • 1. Re: script help
          philmodjunk

          Define a text field, URL. Set your web viewer's URL expression to just be YourTable::URL.

          Write this script:

          Set Field [YourTable::URL ; get ( ScriptParameter )]

          Now put a button on your Bills tab and select Perform Script. In the option parameter box, enter the website's URL in quotes.

          Do the same for each additional button, but change the parameter to pass the appropriate URL.

          (Note you can place all of this data in a related table and use a portal to have a completely flexible, easy to edit list of URL's for your web viewer instead of creating a series of buttons like this. Then you can just use: Set Field [YourTable::URL ; PortalTable::URLField] and not use any script parameters.)

          • 2. Re: script help
            kurtnivy

            Thank you for the reply.  I have changed the layout in between getting your answer and now.  I got rid of the tab folders. I created a new layout called web site, and I put the web viewer in that layout.  My thinking is that I can click a button and script it to 1)go to layout  (web site)  and then to a specific url from the button that was clicked. I have it going to layout but don't know how to get it to load the url from the button, I just get a blank web viewer.  More suggestion please.  

            I will look into portals also. 

            Kurt

            • 3. Re: script help
              philmodjunk

              Define an extra text field and set up the Web Viewer to refer to it for the URL.

              Then your button's script can use set field to enter the URL of the selected field into this Field the web viewer uses.