Jump to content
  • 0

Hide/display List Items On Html Confirmation Page


Case
 Share

Question

After submitting registration data on a Caspio URL submission form, an HTML confirmation page lists the information entered by the registrant in a <ul></ul> format. I need to selectively display or hide one or more of the <li></li> tags based on the value in the "type" field in the HTML form. My Script code is as follows but it does not work. Can you help me correct this?

 

<!DOCTYPE html>
<html>
<head>


<script>
function hide() {
 var Ascend = document.getElementById("Ascd");
 var   t = document.getElementById ("InsertRecordtype").value;
    
 if( t==="a" || t === "af") 
{
 Ascend.style.display= 'block' ; }
else {
 Ascend.style.display= 'none'; }
      }
</script>


</head>
<body onload = "hide()">
 
The element i'm trying to hide/display is shown below:
<li id="Ascd">Attending Ascend Dinner, Tue Sep 15, 7:00PM: [@AscendDinName]</li>
 
Case
Link to comment
Share on other sites

1 answer 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.

Guest
Answer this question...

×   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...
 Share

×
×
  • Create New...