Skip to main content
Known Participant
July 7, 2009
Question

JS validation inside CFWindow

  • July 7, 2009
  • 1 reply
  • 963 views

I am attempting to use javascript to validate a form inside of a cfwindow.

The form is loaded from another page... I have tried putting the script on the imported page as well as the page calling the CFWindow.

My js function is formed correctly to my knowledge...checkAttend = function(){}

//main calling page//

checkAttend = function(){
      f = document.getElementById("attendForm");

     alert("test");

}

//cfwindow//

<form action="" onsubmit="return checkAttend()" method="post" id="attendForm">

    This topic has been closed for replies.

    1 reply

    Inspiring
    July 7, 2009

    You are missing a semi-colon in the onSubmit attribute of your form tag.

    whoisit28Author
    Known Participant
    July 7, 2009

    to my understanding that isn't required... probably better form though... I added it but it still doesn't work :O(

    Inspiring
    July 7, 2009

    js troubleshooting is tedious.

    Step 1 - comment out the line above the alert.  If you get the alert, there is a problem with the commented line.

    You might also want to add return false so the form doesn't submit while you are troubleshooting the js.