srinu reddyreddy

Greenhorn
+ Follow
since Jan 05, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by srinu reddyreddy




i am writing the following logic to iterate through the value nodes,
but it is throwing exception,pls suggest me
error is here:






it is giving the following error
Error: setting a property that has only a getter
Source File: http://localhost:8080/example/edit.jsp
Line: 80

i am writing the following logic to iterate through the value nodes,
but it is throwing exception,pls suggest me
error is here:
it is giving the following error
Error: setting a property that has only a getter
Source File: http://localhost:8080/example/edit.jsp
Line: 80
I am unable to insert code as it is pls. help me
there is no space in onClick
try this
<INPUT TYPE="button" VALUE="Click Here"
on Click="add(a)">
onchage event is not firing,pls. go through the code and suggest me and tell me how to pass arguements to the function[CODE]

if (navigator.appName == "Microsoft Internet Explorer")
{
list1.attachEvent("onchange",this.populate);
}
else
{
// The folllowing line is throwing an error list1.addEventListener("change",this.populate,true);
}
//list1.onchange=function(populate);

populate:function() {
alert("in populate");

var d=document.getElementById('or2');
//sel.options[sel.options.length] = new Option("text","value");
//d.style.display=" ";
// if(!d){return;}
d.options.length=0;
//cur=ePItems[sel.options[sel.selectedIndex].value];
//if(!cur){return;}
//d.options.length=cur.length;
for(var i=0; i<myOpts.options.length;i++)
{ //loop through the array
d.options[d.options.length] = new Option(myOpts.options[i].text,myOpts.options[i].value); //set the values
}
i don't understand the following code, how to convert axaxresponse to JSON response ,pls. help me and what is myXMLHttp ,how to get myXMLHttp.

var myOpts = eval"'" + myXMLHttp.responseText + "'"); //the JSON response
pls. look into this code and suggest me,how to write a function which dynamically changes the content of multiple list box when we select different options sigle list box

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/core-rt"; prefix="c-rt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Generic View JSP Page</title>
<script src="prototype.js"></script>
<script src="rico.js"></script>
<script>

ProcessEditRequest = Class.create();
ProcessEditRequest.prototype = {
initialize: function() {
//alert("init called");
},
ajaxUpdate: function(ajaxResponse) {
alert("ajaxResponse.size"+ajaxResponse.childNodes.length);
var root1= ajaxResponse.childNodes[0];
alert("ajaxResponse.parameters"+root1.childNodes.length);
var root2= root1.childNodes[0];
alert("ajaxResponse.parameter"+root2.childNodes.length);
var root3= root2.childNodes[0];
alert("ajaxResponse.key-values"+root3.childNodes.length);
[SIZE="4"][SIZE="6"]var oTable = document.createElement("table");
oTable.border="1";
var trH = document.createElement("tr");

var thH1 = document.createElement("th");
var textNthH1=document.createTextNode("keys");
thH1.appendChild(textNthH1);
trH.appendChild(thH1);

var thH2=document.createElement("th");
var textNthH2=document.createTextNode("values");
thH2.appendChild(textNthH2);
trH.appendChild(thH2);
var trB = document.createElement("tr");

var tdB1 = document.createElement("td");
var list1=document.createElement("select");
list1.name="or";
list1.id="or" ;
//list1.o="populate(this)";
tdB1.appendChild(list1);
trB.appendChild(tdB1);
//var textNtdB1 = document.createTextNode(sWhat);
//tdB1.appendChild(textNtdB1);
//trB.appendChild(tdB1);

var tdB2 = document.createElement("td");
var list2=document.createElement("select");
list2.name="or2";
list2.id="or2" ;
list2.multiple=true;
//list2.onchange="populate(this)";
tdB2.appendChild(list2);
trB.appendChild(tdB2);

//var textNtdB2 = document.createTextNode(sWho);
//tdB2.appendChild(textNtdB2);
//trB.appendChild(tdB2);



oTable.appendChild(trH);
oTable.appendChild(trB);
for(var i = 0 ; i < root2.childNodes.length ; i++){

var currentChild1=root2.childNodes[i];
var currentChild=currentChild1.childNodes[0];
sKey=currentChild.firstChild.nodeValue;
alert("sKet"+sKey);
currentChild = currentChild.nextSibling;
sValue1 = currentChild.firstChild.nodeValue;

currentChild = currentChild.nextSibling;
sValue2 = currentChild.firstChild.nodeValue;

var opt1 = document.createElement("option");
opt1.value=sKey;
var textOP1 = document.createTextNode(sKey);
opt1.appendChild(textOP1);
list1.appendChild(opt1);

var opt2 = document.createElement("option");
opt2.value=sValue1;
var textOP2 = document.createTextNode(sValue1);
opt2.appendChild(textOP2);
list2.style.display="none";
list2.appendChild(opt2);

var opt3 = document.createElement("option");
opt3.value=sValue2;
var textOP3 = document.createTextNode(sValue2);
opt3.appendChild(textOP3);

list2.appendChild(opt3);


}
var divTable = document.getElementById("editDiv");
divTable.appendChild(oTable);
//alert(ajaxResponse.getAttribute("id"));
//alert(ajaxResponse.childNodes[0].nodeName);
//alert(ajaxResponse.childNodes[0].childNodes[1].nodeValue);
//alert(ajaxResponse.childNodes[0].childNodes[1].attributes.length);
//alert(ajaxResponse.childNodes[0].childNodes[1].nodeName);

//var myxml = ajaxResponse.firstChild.xml;
//alert(myxml);
//document.getElementById("editBox").value=myxml;
//document.getElementById("editDiv").innerHTML=myxml;
}
};
[/SIZE][/SIZE]
</script>
</head>
<body>
<div id="editDiv" >
</div>
<script>

sendAJAXRequest();

function sendAJAXRequest() {

ajaxEngine.registerRequest( 'ProcessEditRequest', 'http://localhost:8080/example/editSer');
this.ProcessEditRequest= new ProcessEditRequest();
//alert("1 called");
ajaxEngine.registerAjaxObject('ProcessEditRequest', ProcessEditRequest);
// alert("Sending AJAX request...");
ajaxEngine.sendRequest('ProcessEditRequest');
// alert("AJAX Request sent successfully");
}


</script>
</body>
</html>
regards
srinu
Hi
how to configure the eclipse, so that if i click on the method call it should go to the definition of the method
it is saying that project is not in the build path, how to put the project in the build path.
can you send me the link to develop a sample struts application in
13 years ago