Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework
this week in the
Java in General
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Liutauras Vilda
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Devaka Cooray
Paul Clapham
Saloon Keepers:
Scott Selikoff
Tim Holloway
Piet Souris
Mikalai Zaikin
Frits Walraven
Bartenders:
Stephan van Hulst
Carey Brown
Forum:
HTML Pages with CSS and JavaScript
div tag problem
Rajni Patel
Ranch Hand
Posts: 85
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have one html form
<form name="validationForm"> <table> <tr> <td>First Name:</td><td><input type ="text" name="firstName"></td> </tr> <tr> <td>Card No:</td><td><input type="cardNumber" id="cardNoText" name="cardNumber"> </td> </tr> <tr> <td><input type="submit" name="submit" value ="SUBMIT" onClick =" if (custInfo.validate.validation.validateCardNo()){ custInfo.reports.cardNoReports.getCardNoInfo(); } " ></td> </tr> <tr> <td> <div id="cardNoInfoDiv"></div> </td> </tr> </table> </form>
and
java
script
custInfo.reports = { cardNoReports:{ getCardNoInfo : function(){ var divid = document.getElementById("cardNoInfoDiv"); divid.innerHTML = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; var cardNoText = document.getElementById("cardNoText"); var cardNo = cardNoText.value; var request request = new cjs.http.HttpRequest(); request.get("./custInfo_get_cardNo_info.jsp?cardno=" + cardNo, custInfo.reports.cardNoReports.displayCardNoInfo, true); }, displayCardNoInfo: function(){ alert("displayCardNoInfo function"); var request; request = new cjs.http.HttpRequest(); request.get("./custInfo_display_cardNo_info.jsp", custInfo.reports.cardNoReports.displayCardNoInfo1, true); }, displayCardNoInfo1: function(response){ alert("displayCardNoInfo1 function"); alert("!!!!!"); var responseText; var div; responseText = response.getResponseText(); alert(responseText); var divid = document.getElementById("emailIdValidationDiv"); divid.innerHTML = "invalid dddddddd"; div = document.getElementById("cardNoInfoDiv"); div.innerHTML = responseText; } } };
when I submit page,I want to print cardNoInfoDiv tag on same page. I can not see value of cardNoInfoDiv tag.
Thanks
Eric Pascarello
author
Posts: 15385
6
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
well you are not canceling the form submission so it will be posting back.
Eric
Do Re Mi Fa So La Tiny Ad
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to pass a javascript variable on a jsp to a servlet
request.getParameter return null value
How to getParameter value
textfield.focus() problem
Ajax, Struts, and a few pesky event based issues
More...