I don't know of a way to avoid specifiying the extension (.PDF, .JPG, .PNG, etc.)
Ok thanks Phil, I managed to set the URL by adding a Custom Web Address:
"http://www.dropbox.com/myprofile/appendices/" & table::pk & "/ZoneList.pdf"
It works but it's very, very slow to load compared to putting the actual link in a field for the web viewer to read from. Has anyone else experienced this delay?
If its actualy static once calculated you may want to script the update of the field instead. That may improve the speed of the load.
Ok thanks aammondd, I'll need to look into how to script something like that along with the following:
Does the following set up sound like it would work?
A Tab with several buttons along the top with a web viewer underneath
Clicking Button A would load a PDF into the web viewer
Button B a different PDF
Button C etc.
Some buttons wouldn't have a corresponding PDF for certain customers so it would need to display a custom error page or maybe the button would be greyed out maybe?
A quick follow up post to say thanks for the help with this, I added 10 buttons to a Tab with a Web viewer underneath (named it Appendices). Two of the buttons display a Google Map and the Company website. The other 8 buttons load a PDF from Dropbox.com using the following script:
Set Web Viewer [Object Name: "Appendices"; URL: "http://www.dropbox.com/myprofile/appendices/" & table::pk & "/FileName.pdf"]
It loads much quicker and works fine on FM Go too, the only snag with it is that it looks like a PDF in portrait form 'overlays' the Google Map instead of clearing the web viewer before loading the PDF. It isn't a big issue but it does look a bit untidy...
If you assign the GoTo data to a variable, you can actually achieve that without multiple web viewers or tabs. A user could click a button to change the URL in a single web viewer, just like a web browser works.
Just an idea...
Also, regardless of the extension...(throwing out some ideas as I think about this here) can you not run a loop to look for the 3 digits? I mean you know what 3 digits you are looking for when you start, just need to find them. So it seems if you made a find loop that would look for the 3 digits with extension *.jpeg, then extension *.jpg, then *.gif, then *.pdf and so on...
Just have the find look to the first 3 characters of your search criteria looking through all files with extension of JPG, if it finds nothing, then it repeats this process looking for *.PDF extensions, same search.
Follow? Not sure how this would be speed wise however, as it would have a lot of searching and thinking to do...
(What do you think Phil?)
That's what I have now although I might not have made myself clear.
I have a single web viewer named 'Appendices' and each button is scripted to load a URL into this object...
Ahh gotcha, thought you were using an individual viewer per URL. =) good deal
In theory I think my idea would work, not exactly sure how efficient it would be though if it did work...honestly
Thanks for the ideas, I got it working to an acceptable standard so think I'll stick with it for now...