[Solved] jQuery not working: Processing instruction not closed

The JSP code is:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
 <%@ include file="headpl.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">



        <hr width="1" size="600" style="position:absolute; left:450px; top:250px;" />
        <div id=edit  style="position:absolute; left:100px; top:600px;">
                <p><a id="clickedit" href="">Edit personal details </a></p>

        <div id=editform style="position:absolute; left:100px; top:650px;">
            <p>First name: <input type="text" name="fname" value="<%=request.getAttribute("fname")%>" required/>
                    <p>Last name: <input type="text" name="lname" value="<%=request.getAttribute("lname")%>"/>
                        <input type="email" name="email" value="<%=request.getAttribute("email")%>"/>
                    <p>State:&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                        <input type="text" name="state" value="<%=request.getAttribute("email")%>"/>
                        <input type="submit" value="Save changes"/>

The jQuery code isn’t working. The eclipse was earlier showing an error:

Processing instruction not closed.

But I did Ctrl+A -> Backspace -> ctrl+Z

and the error was removed I don’t know how, but the error vanished.

But still the jQuery code isn’t working. I don’t see any error, but some of you would?
I know the ques is way to low but I was trying for a long time, looked other similar questions as well but nothing is working.

Enquirer: Nivedita


Solution #1:

You need to disable the default action of following the link, which is reloading the page.

$(document).ready(function () {


    $("#clickedit").click(function (e) {



Respondent: Nivedita

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy