I am trying to validate uid and pwd using a Visualforce page with javascript, but I'm getting an error saying the element type <apex:pageblocksection> must be terminated by the matching end-tag. What's wrong with this code?

    Function f1(Uid){
        Var u = document.getElementByid(Uid).value;
                if(u == ''){
                        alert('Please Enter User name..')

<apex:pageblocksection title="Entry section..">
    <apex:outputText Value = "Enter Uid.."></apex:outputText>
    <apex:inputText id="uid"/>
        <apex:commandbutton value="Submit" onclick="f1('{!$Component.uid}')"/>
  • 1
    Please correct the spelling </apex:from> it should be </apex:form> – Reshma May 31 '18 at 8:22

You're missing a forward slash on you closing tag, it should be:

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.