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
    Commented May 31, 2018 at 8:22

1 Answer 1


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


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .