Jump to content

This topic is 8078 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!

Posted

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

Posted

*******. 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.

This topic is 8078 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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