I have a web form that uses virtual fields to generate a search (passing parameters to results to separate datapage that appears on the same web page). Part of it is a listbox that cascades from a dropdown menu. I want to allow multi-select in the listbox, and have tried to use the JavaScript solution from Caspio: viewforum.php?f=14
The listbox field name is "Virtual3," and this is the code I'm trying -- I got the field name from looking at the source code of the direct URL to the datapage:
<SCRIPT LANGUAGE="JavaScript">
var fieldName = "InsertRecordcbParamVirtual3";
var x=document.getElementsByName(fieldName);
x[0].multiple=true;
</SCRIPT>
"cbParamVirtual3" is listed as the field name, but the ID is different, and it changes every time I refresh the page. I've seen it a couple ways, i.e. "cbParamVirtual3_92BE1C377," "cbParamVirtual3_334E1C41A," etc.
I'm guessing this is a result of the cascade. However, even if I make this just a regular listbox, using the above code, it's not working.
Is there any way to make this work -- in particular, with the cascading option?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
mdupras
Hi all --
I have a web form that uses virtual fields to generate a search (passing parameters to results to separate datapage that appears on the same web page). Part of it is a listbox that cascades from a dropdown menu. I want to allow multi-select in the listbox, and have tried to use the JavaScript solution from Caspio: viewforum.php?f=14
The listbox field name is "Virtual3," and this is the code I'm trying -- I got the field name from looking at the source code of the direct URL to the datapage:
"cbParamVirtual3" is listed as the field name, but the ID is different, and it changes every time I refresh the page. I've seen it a couple ways, i.e. "cbParamVirtual3_92BE1C377," "cbParamVirtual3_334E1C41A," etc.
I'm guessing this is a result of the cascade. However, even if I make this just a regular listbox, using the above code, it's not working.
Is there any way to make this work -- in particular, with the cascading option?
Thanks!
-- Mike
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.