in Education by
<!-- Search results tab --> Want to show above div. jquery script. jQuery.noConflict(); $("#searchButton").click(function (e) { e.preventDefault(); var data = []; $.ajax({ type: "GET", contentType : "application/json", url : "/search/getCourseList", data : $("#courseSearchForm").serialize(), contentType:"application/json; charset=utf-8", dataType:"json", success : function (data) { var jsobj = JSON.parse(JSON.stringify(data)); console.log(jsobj); //WHAT SHOULD I DO HERE ? alert("reached"); }, error : function(e) { alert("Failed to search...."); } }); }); I'm getting the courselist from ajax call but I'm not able to display it on same page. Jquery.load(url) will also not work as jsp file is in WEB-INF. So we can't access it through url. Div id="testingClass" is present in the same file.(courseSearchPage.jsp).I want to show this div when I click on search buttom. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I'm trying to best understand your problem, this code snippet works for me. $("#searchButton").click(function(e) { e.preventDefault(); var data = []; $.ajax({ type: "GET", contentType: "application/json", url: "http://httpbin.org/get?test=chakram", data: $("#courseSearchForm").serialize(), contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { $('#testingClass').show(); //ADD THIS LINE HERE }, error: function(e) { alert("Failed to search...."); } }); });

your div has now been shown!

Run code snippetExpand snippet

Related questions

0 votes
    Course Results (${courseResponseList.getCourses().size()}) Want to show above div. jquery script. jQuery. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    How can I get the td values with jquery? The while loops will generate a few with the same class ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    People will normally think it as a normal/regular file and your secret message will pass on without any ... for-Cyber Security:,Cyber Security-Jobs:,Cyber Security Applications...
asked Oct 31, 2021 in Education by JackTerrance
0 votes
    I found found several question's answers similar to this, I tried some of them, but no luck. May ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I found found several question's answers similar to this, I tried some of them, but no luck. May ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 8, 2022 in Education by JackTerrance
0 votes
    This is part of the component : import MyComp from '../../lib/MyComp' const Data = ( { data } ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 26, 2022 in Education by JackTerrance
0 votes
    This is part of the component : import MyComp from '../../lib/MyComp' const Data = ( { data } ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 6, 2022 in Education by JackTerrance
0 votes
    Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    i have a website that contain an iframe. www.vendeposto.com.br and i want to hide an element Im trying to do this ... the vendeposto.com.br site is this: Postos de gasolina a venda...
asked May 1, 2022 in Education by JackTerrance
0 votes
    i have a website that contain an iframe. www.vendeposto.com.br and i want to hide an element Im trying to do this ... the vendeposto.com.br site is this: Postos de gasolina a venda...
asked Apr 29, 2022 in Education by JackTerrance
0 votes
    i have a website that contain an iframe. www.vendeposto.com.br and i want to hide an element Im trying to do this ... the vendeposto.com.br site is this: Postos de gasolina a venda...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    Basically I've managed to layout my DIV elements into a circle shape but I've not managed to work ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    Basically I've managed to layout my DIV elements into a circle shape but I've not managed to work ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
...