Guest User

Untitled

a guest
Jan 18th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.44 KB | None | 0 0
  1. <asp:UpdatePanel ID="asypnl" runat="server">
  2. <ContentTemplate>
  3. <asp:Wizard />
  4. <StartNavigationTemplate>
  5. </StartNavigationTemplate>
  6. <FinishNavigationTemplate>
  7. </FinishNavigationTemplate>
  8. <WizardSteps>
  9. <asp:WizardStep ID="WizardStep1" runat="server">
  10. <asp:Panel runat="server" ID="pnlGiftInfo">
  11. <td>
  12. <asp:DropDownList ID="DropDownPayment" runat="server">
  13. <asp:ListItem Selected="True" Value="0">Gift</asp:ListItem>
  14. <asp:ListItem Value="1">Pledge</asp:ListItem>
  15. </asp:DropDownList>
  16. </td>
  17. </asp:Panel>
  18. </asp:WizardStep>
  19. </WizardSteps>
  20. <asp:Panel runat="server" ID="pnlOutput">
  21. <%-- Content comes from the database OutputHtml Colunm--%>
  22. </asp:Panel>
  23. </ContentTemplate>
  24. </asp:UpdatePanel>
  25.  
  26. <p>Thank you for your <span id "ddlGift">gift</span><span id "ddlPayment">payment</span> of
  27. {Amount} to the {Comm}
  28. <script type="text/javascript" language="javascript">
  29. var p = document.getElementById("DropDownPayment");
  30. var eledropdownPayment = p.options[p.selectedIndex].value;
  31. var ddlGift = document.getElementById("ddlGift");
  32. var ddlPayment = document.getElementById("ddlPayment");
  33. if (eledropdownPayment == "0") {
  34. ddlGift.style.display = "block";
  35. ddlPayment.style.display = "none";
  36. } else {
  37. ddlGift.style.display = "none";
  38. ddlPayment.style.display = "block";
  39. }
  40. </script>
  41.  
  42. setTimeout(function() {
  43. var p = document.getElementById("DropDownPayment");
  44. var eledropdownPayment = p.options[p.selectedIndex].value;
  45. var ddlGift = document.getElementById("Gift");
  46. var ddlPayment = document.getElementById("ddlSelectionPledge");
  47. if (eledropdownPayment == "0")
  48. {
  49. ddlGift.style.display = "block";
  50. ddlPayment.style.display = "none";
  51. }
  52. else
  53. {
  54. ddlGift.style.display = "none";
  55. ddlPayment.style.display = "block";
  56. }
  57. }, 300); //delay execution by 300 miliseconds
Add Comment
Please, Sign In to add comment