Try this:
changeValue('<%=i%>')
javaAddict
Nearly a Senior Poster
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
Thanks for reply....
It's not working..
when i first time load my project it gives me error like i is undefined
But after giving an alert it works fine...
What do you mean giving an alert. Post the code that works
javaAddict
Nearly a Senior Poster
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
First of all describe better what do you mean by this:
after giving that alert messsage it works otherwise not.
Also, firstly does the method being called correctly?
Try this to check the above:
function changeQuantity(form,productCode,index)
{
alert("Method called");
}
Then see if the arguments are passed correctly:
function changeQuantity(form,productCode,index)
{
alert(productCode);
alert(index);
}
Then try your code with alert messages between the other commands (like debugging) to see what is wrong
javaAddict
Nearly a Senior Poster
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
Create the variable in the javaScript
and store the value in it
then use it
var z=productCode;
var y=index;
I don't believe that it will solve the problem. If this will execute correctly:
var z=productCode;
changeItemValueNew(form,z,y)
then this will also:
changeItemValueNew(form,productCode,index);
javaAddict
Nearly a Senior Poster
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
i do n't know what have you done in
changeItemValueNew(form,z,y)
method
We still don't know if the code before the call of that method is executed
javaAddict
Nearly a Senior Poster
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448