wood burning stoves 2.0*
The moose likes JSP and the fly likes problem in using  Ajax calls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem in using  Ajax calls" Watch "problem in using  Ajax calls" New topic
Author

problem in using Ajax calls

Nagendra Batchu
Ranch Hand

Joined: Jan 23, 2008
Posts: 32
<table border="0" class="body_block">
<tr>
<td >
<table >
<tr><td >Geographical Area Code</td>
   <td > Geographical Area</td></tr>
<bean:define id="geographical" name="geographicalDetails" scope="request" type="java.util.HashMap" />
<logic:iterate id="forums" name="geographical">
<tr></tr>
<tr><td >','<bean:write name="forums" property="value"/>');"><bean:write name="forums" property="key"/></td>
<td ><bean:write name="forums" property="value"/></td></tr>
</logic:iterate>
</table>
</td>

<td > </td>
<td >
<div id="geograhicalDiv">
<table border="0" >
<tr>




<td >

<strong>Geographical Area Sales</strong>




</td>
</tr>
<tr>

<td >
<html:errors/>
<form name="Form1" method="post" action="uploadDetails.do" ID="Form1">
<table border="0" class="tabular_data">



</table>

<table border="0" >
<tr>
<td>
<div align="center">

          
<input type="submit" name="Submit" class="bButton" value="Upload" onClick="return validationCheck();">   
<input type="button" name="button1" class="bButton" value="Back" onclick="onClickBack();">
</div>
</td>
</tr>
<tr><td>





</td></tr>
</table>
<%
String count=(String)request.getAttribute("successCount");
if(count!=null){
%>
   The Total Updated Records are:<%=count %>
<%
}
%>
</form>

</td>
</tr>
<tr>
<td >Upload Guidelines :

     * File Format for Prepaid SIM - File must have following mandatory columns in same order.

               SAPInvoiceNumber,SAPInvoiceDate,Dist SAP Code,SAP Item Code,SIM Serial number,MSISDN

     * File Format for Recharge Coupon - File must have following mandatory columns in same order.

              SAPInvoiceNumber,SAP InvoiceDate,Dist SAP Code,SAP Item Code,Series From,Series To

     * Date format should be DD-MMM-YYYY i.e. 12-JUL-2009

     * File must be saved as .CSV which is comma separated file.

     * File should not have any blank record.

<blockquote> </blockquote></td>
</tr>
<!--<tr>

<!--<td height="10"> </td>
</tr>-->
</table>
</div>
</td>
</tr>
</table>


function getDetails(key,value){
alert("key---------->"+key);
alert("value---------->"+value);
document.getElementById("hiddenKey").value=key;
document.getElementById("hiddenValue").value=value;
var url = 'getGeographicalDetails.action?&ts='+new Date();
alert('After groupId ----------'+document.getElementById("hiddenKey").value);
if (window.XMLHttpRequest) {
alert("from if");
req = new XMLHttpRequest();
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
alert("from else if");
}
alert("the URL------------->"+url);
req.onreadystatechange = displaySuccess;
req.open("GET",url, true);
req.send(null);

}

function displaySuccess()
{
alert("From displaySuccess--------"+req.readyState);
if (req.readyState == 4)
{
alert("From displaySuccess--req.status------"+req.status);
if (req.status == 200) {
document.getElementById("geograhicalDiv").innerHTML=req.responseText;
var svalue=document.getElementById("geograhicalDiv").innerHTML=req.responseText;
alert("The value is ---"+ svalue);
}
}
}
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60791
    
  65

And?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

And PLEASE UseCodeTags.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in using Ajax calls
 
Similar Threads
Ajax, Struts, and a few pesky event based issues
document.forms[0].submit(); throws Invalid Argument in IE
using ajax and struts iterate tags
What happen to this Tabbed form ?
Table Allignment problem in IE 6.0