Jump to content

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

Recommended Posts

Posted

Hi

I have a portal and some fields with popup menus inside it.

One of the popups shows the result of an inlineaction find request.

The problem is that this inline request is running for each portal row and is slowing down the machine .

I guess I need some help with Java here...

How can I store an Inline results in a variable and then use this variable in the popup menu?

The inline code is :

[FMP-InlineAction:-db=reservations.fp5,-lay=Webmain,User1_user2={fmp-currenttoken},-max=all,-find]

[FMP-Record]

<option value="[fmp-field:id]"> [Fmp-field:id] - [fmp-field:project]</option>

[/FMP-Record]

[/FMP-InlineAction]

Tnx

Posted

Hi

I tried to look for some examples on the forum, but couldnt find anything similar...

I don;t know JS very good...but still how can I insert INLINE results into JS array?

Posted

Try this:

<script>

var aDept = new Array();

i = 0;

[FMP-InlineAction: -db=employees.fp5, -lay=web, -sortfield=department, -max=all, -findall]

[FMP-Record]

aDept[i++]="[FMP-Field: department]";

[/FMP-Record]

[/FMP-InlineAction]

</script>

</head>

<body>

<form ....

....

<select name="department">

<option value="">Select a Department</option>

<script>

for (a=0; a < aDept.length; a++)

{

document.write("<option value='" + aDept[a] + "'>" + aDept[a] + "</option>");

};

</script>

</select>

....

Good Luck

Garry

This topic is 7804 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.