aspose file tools*
The moose likes Java in General and the fly likes calling a javascript function from java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "calling a javascript function from java" Watch "calling a javascript function from java" New topic
Author

calling a javascript function from java

sahana mithra
Ranch Hand

Joined: Oct 26, 2010
Posts: 72
Dear All,
I am facing a great problem in calling a javascript function

.java
sb.append(" <input type = 'checkbox' id ='chkBox' vallign='right' onClick='javascript:chkBox(this.selected)'> ");

.js
function chkBox(chkBox){
alert("selected" + chkBox);
}

When I click the checkbox, I dont get anything. How to make this work. Please help me
N Sahni
Ranch Hand

Joined: Jul 07, 2011
Posts: 55

Hi,
Try modifying java code as:


Thanks and Regards,
Nilesh Sahni | nsahni@infocepts.com | www.infocepts.com
 
Consider Paul's rocket mass heater.
 
subject: calling a javascript function from java