Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

java/cdml to create a slide show

Featured Replies

Hi Guys,

I've almost got this, but as usual a bit stumped by something.

I have a database of sets of photos, with a portal to a second database that details each image in the set.

I'm trying to generate a page to show the sets as a slide show.

I'm getting stuck on a drop down list that needs to be populated with a url and image title for each image in the set. Works fine when I manually enter the data, but I can't work out how to have it populated using filemaker.

The code that works is:

<TD bgcolor="#330099">

<DIV align="center">

<SELECT name="Oneslide" onChange="Onechange();">

<OPTION value="http://mydomain.com/105-0580_IMG.JPG" selected>Image 1</OPTION>

<OPTION value="http://mydomain.com/105-0581_IMG.JPG">Image 2</OPTION>

<OPTION value="http://mydomain.com/105-0582_IMG.JPG">Image 3</OPTION>

</SELECT>

</DIV>

</TD>

I need to have something like:

<OPTION value="[FMP-Field:Photo::URL]">[Photo::Description]</OPTION>

for each related record.

I thought it would be fairly simple, using [FMP-Portal], but they seem to be ignored because I'm inside SELECT tags.

I then though I must need to use a value list somehow, which would be fine, but I can't see how to have get the two fields.

Any ideas? I'm sure its something simple I've forgotten...

Thanks.

Sean.

PS. I have been able to work around the problem by creating a field in filemaker which contains all the "<Option>" code for the whole set (I've done this using the value list calculation functions) and then just dropped that field into the code. It works but its really inelegant, and I'd appreciate help doing this from the cdml level . Ta!

Rather than use a Java Applet, a Java Servlet, or JSP, you can use CDML like this:

<SELECT name="Oneslide" onChange="Onechange();">

[FMP-Portal:Photo]

<OPTION value="[FMP-Field:Photo::URL]">[FMP-Field:Photo::Description]</OPTION>

[/FMP-Portal]

</SELECT>

If the ValueList is not being populated maybe you are not processing the page through WebCompanion. Or, you do not have URL and Description in the Portal on your Layout!

Good Luck.

Garry

  • Author

*******. I knew it was something stupid I was doing.

I forget to name the portal. I only had [FMP-Portal]...

The stupid thing is I use the exact some code an hour before hand and did it correctly, this time I just missed it. Even though I checked it 50 times.

Anyway, all works perfectly now, and nothing but several hours wasted!

Luckily I did learn a bit in coming up with my workaround, so it wasn't a complete waste.

Thanks for your help Garry. Also thanks for a tip you gave someone else (re java i=0, i++). I needed to know that to get this working, and having never used java that post helped a great deal.

Owe you a few beers (or whatever)!

Cheers,

Sean.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.