Jump to content

Recommended Posts

Hello.

I have entered the following script and on the 3rd data field, the value doesn't show! 
Also, would like to hide any of the fields if no value with script.

Any help is appreciated...
 

<span  style="color: #A1A1A1;
    font-size: 12px;
    font-family: Arial, sans-serif;
    font-style: normal;
    font-weight: normal;">21+</span>

<span id="icon[@field:age]"></span>
<script>

if ("[@field:age]" == "No"){
document.getElementById('icon[@field:age]').innerHTML="<img width='15px' src='http://someapp.com/nk/icons/yellowflag.png'/>";
} else if ("[@field:age]" == "Yes"){
document.getElementById('icon[@field:age]').innerHTML="<img width='15px' src='http://assets.goplaypool.com/files/theme/appcas/check_01.png'/>";

</script>

<span  style="color: #A1A1A1;
    font-size: 12px;
    font-family: Arial, sans-serif;
    font-style: normal;
    font-weight: normal;">Tournaments</span>

<span id="icon[@field:tourneys]"></span>
<script>

if ("[@field:tourneys]" == "No"){
document.getElementById('icon[@field:tourneys]').innerHTML="<img width='15px' src='http://someapp.com/nk/icons/yellowflag.png'/>";
} else if ("[@field:tourneys]" == "Yes"){
document.getElementById('icon[@field:tourneys]').innerHTML="<img width='15px' src='http://assets.goplaypool.com/files/theme/appcas/check_01.png'/>";

</script>

<span  style="color: #A1A1A1;
    font-size: 12px;
    font-family: Arial, sans-serif;
    font-style: normal;
    font-weight: normal;">Tournaments</span>

<span id="icon[@field:tourneys]"></span>
<script>

if ("[@field:tourneys]" == "No"){
document.getElementById('icon[@field:tourneys]').innerHTML="<img width='15px' src='http://someapp.com/nk/icons/yellowflag.png'/>";
} else if ("[@field:tourneys]" == "Yes"){
document.getElementById('icon[@field:tourneys]').innerHTML="<img width='15px' src='http://assets.goplaypool.com/files/theme/appcas/check_01.png'/>";

</script>

Capture.PNG

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...