One of the Caspio techs wrote me a small script for a search-within-search, which works quite well. However, I now only want it to show for some records, so I added a Yes/No field named "more".
I'm trying to get the if/then to work, but now it always hides my search (basically, defaulting to "no", even when I have "yes" checked).
Here is the full script (the lines in bold are what I've added as my conditional):
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
Millie
One of the Caspio techs wrote me a small script for a search-within-search, which works quite well. However, I now only want it to show for some records, so I added a Yes/No field named "more".
I'm trying to get the if/then to work, but now it always hides my search (basically, defaulting to "no", even when I have "yes" checked).
Here is the full script (the lines in bold are what I've added as my conditional):
<script>
if (document.getElementById('more').checked){
<BLOCKQUOTE>
Click <a href="http://b5.caspio.com/dp.asp?AppKey=942730000c5a08516e2a40b0a4bf&EN_ID=[@field:EN_ID]">here </a> to view related articles.
}
</script>
I also tried this, with the same result:
<script>
if ('[@field:more]'=='yes')
{
<BLOCKQUOTE>
Click <a href="http://b5.caspio.com/dp.asp?AppKey=942730000c5a08516e2a40b0a4bf&EN_ID=[@field:EN_ID]">here </a> to view related articles.
}
</script>
I don't have any experience with Javascripting. Could someone please tell me what I'm doing wrong?
: ) Millie
Link to comment
Share on other sites
3 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.