How access external java script function
I need to acess external java script function.
how to include js file in struts can u write plsWhat makes you think that this is the right place for Struts support?
Similar Messages
-
How to call java script function from JSP ?
how to call java script function from JSP ?
i have function created by java script lets say x and i want to call this function from jsp scriplet tag which is at the same page ..thanks
-
Calling Java Script Function from Applet
How can I call the Java Script method from Applet. This should work both on IE and NN running on both Windows NT and solaris. I know it is possible to call the function in Java script using JSObject. But I don't have JSObject at run time. Please let me know how to call Java Script function from applet without using JSObject.
For Java <-> JavaScript communication in Netscape / Mozilla see:
http://devedge.netscape.com/library/manuals/2000/javascript/1.5/guide/lc.html#1014290
http://devedge.netscape.com/library/manuals/2000/javascript/1.5/guide/lc.html#1008480 -
How to get the value retruned by java script function into my jsp page
Hai all,
I had a particular java script function which returns a date.
function getDate() {
var sDate;
// This code executes when the user clicks on a day in the calendar.
if ("TD" == event.srcElement.tagName)
// Test whether day is valid.
if ("" != event.srcElement.innerText)
//alert(event.srcElement.innerText);
sDate = document.all.year.value + "-" + document.all.month.value + "-" + event.srcElement.innerText;
document.all.ret.value = sDate;
var mahi=window.open("configurexml.jsp?xyz=document.all.ret.value")
return sDate;}
Now i want to display this particular date in my jsp page. can anyone tell me the correct approach or a sample code to diaplay this date in my jsp page.
<%@ page language="java"
import="javax.xml.parsers.*,java.io.*,org.w3c.dom.*"%><%@ page import="java.util.*" %>
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> <head> <title>Configuring Xml File</title>
<SCRIPT LANGUAGE="JavaScript" SRC="xyz.js"> </SCRIPT>
body bgcolor="#d0d0d0" onClick= "return getDate()" >
<form name="f1">
<b>20 october 2006 </b>
Here where i am printing the date i had to get the value from the js function. how to do that. plz help me....Are you talking about server-side java code (servlets/jsp) or client side (applet)? Given we are in the JSP forum I'll assume we're talking server side.
If so, you are making a common but fundamental mistake. JavaScript executes on the client, not on the server. If you want client data on the server it has to get there somehow. The simplest way to do this in JSP land is via HTTP. So... have your JavaScript code call a JSP (or servlet) and pass the value you want as a URL parameter. Of course this will also change the browser location, so if you don't want this to happen use a frame or iframe to capture your HTTP request.
For example:
Javascript....
function someFunction() {
return 1;
var value = someFunction();
location.href="somejsp.jsp?value=" + value; -
How to access a JAVA Script variable in JSP Code
How to access a JAVA Script variable in JSP Code. I have been unable todo this.
Plz Suggest a way.
Thanks
Soumyatry to do this code
String s=request.getParameter("javascriptvariablename"); -
How to call the java method in java script function in a portal application
Hi Friends,
I am developing one application where i need to fetch the data from KM content and displaying it on the screen in regular interval. I wrote one method in JSPdynpage for fetching data from KM content now I need to call that java method in java script function.
java method(IComponentRequest request)
//Coode for fetching the KM content
function()
<b>//Need to call the java method</b>
setTimeout(function, 5000);//setting the time interval for this function
<<htmlb display code>>
If anybody can help me in calling the java method in java script function that will be very helpful for me.
Thanks in advance,
Sandeep BonamHi,
Pls see if the following links could help.
http://www.rgagnon.com/javadetails/java-0170.html
http://www-128.ibm.com/developerworks/library/wa-resc/?dwzone=web
Regards -
How to write Java Scripts in Apex
Hi All,
Can any on tell me how to write Java Scripts in Apex.
Thanks in Advance,
MukundIf you want to link your custom JavaScripts to an Apex page, you have several options:
1. Add an HTML Region on Page 0 (Script will be written to every page) called something like "JavaScript & CSS". In this region add your Script to the region source like this:
<script language="JavaScript">
function hell ()
alert ("Hello World");
</script>
2. Add a similar region to the page you are working on (can only be accessed on this page)
3. Create an external JavaScript file and either load it into the WORKSPACE or into the images (/i/) directory on the server. You can then link the JS into you page via modifying the Page Template.
Hope that makes sense. Let me know if you want any further help with option 3.
Duncs -
How to use java script in jsf?
my requirement is
i have to pass the id of the component to the java script function .that component is inside data table.
how to solve this problem?following code is the generated html code.
see it is generating duplicate ids : check it
this is the id repeating 3 times "helper:table1:table14:0:command5"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<script>
function showHideNavigation(item) {
var temp = document.getElementById("plexIndex");
taskImg = document.getElementById(item.id.substring(0, item.id.lastIndexOf(':')) + ':image'+item.id.substring(item.id.length-1));
taskDiv = document.getElementById(item.id.substring(0, item.id.lastIndexOf(':')) + ':child_div'+item.id.substring(item.id.length-1));
if (taskDiv.style.display == "block" ) {
taskDiv.rendered = "true";
taskDiv.style.display = "none";
taskImg.src = "../images/arrow_collapsed.gif";
} else {
taskDiv.style.display = "block";
taskDiv.rendered = "false";
taskImg.src = "../images/arrow_expanded.gif";
</script>
<head>
</head>
<form id="helper" method="post" action="/datatabledemo-app/pages/WLMHome.faces" enctype="application/x-www-form-urlencoded">
<div id="helper:div0" style="margin-left:0.3em;">
<a id="helper:command0" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><img id="helper:image0" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" />plexes</a>
</div>
<div id="helper:child_div0" style="display : none">
<table id="helper:table1" width="100%">
<tbody>
<tr>
<td><span id="plexIndex" title="helper:table1:0:column1"></span><div id="helper:table1:0:div2" style="margin-left:0.9em;"><a id="helper:table1:0:command1" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><img id="helper:table1:0:image1" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" /><span id="helper:table1:0:t1">plex1</span></a></div><div id="helper:table1:0:child_div1" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><div id="helper:table1:0:div4" style="margin-left:2.1em;"><a id="helper:table1:0:command2" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><img id="helper:table1:0:image2" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" />attributes</a></div><div id="helper:table1:0:child_div2" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><table id="helper:table1:table12" width="100%">
<thead>
<tr>
<th scope="col"><span id="helper:table1:table12:text2" style="margin-left:2.4em;">Attribute Name</span></th>
<th scope="col"><span style="margin-left:2.1em;">Attribute Value</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span style="margin-left:3.0em;">session_scale_1</span></td>
<td><span style="margin-left:3.0em;">1.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">session_scale_2</span></td>
<td><span style="margin-left:3.0em;">2.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">load_scale_1</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">load_scale_2</span></td>
<td><span style="margin-left:3.0em;">1.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">load_limit</span></td>
<td><span style="margin-left:3.0em;">600.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">connection_scale</span></td>
<td><span style="margin-left:3.0em;">1.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_limit_1</span></td>
<td><span style="margin-left:3.0em;">5</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_limit_2</span></td>
<td><span style="margin-left:3.0em;">10</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_adjustment</span></td>
<td><span style="margin-left:3.0em;">0.10</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_scale_1</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_scale_2</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">known_adjustment</span></td>
<td><span style="margin-left:3.0em;">0.05</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">known_scale_1</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">known_scale_2</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">normalise_scale</span></td>
<td><span style="margin-left:3.0em;">0.00833</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">equal_delta</span></td>
<td><span style="margin-left:3.0em;">0.0001</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">health_adjustment_1</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">health_adjustment_2</span></td>
<td><span style="margin-left:3.0em;">10.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">health_adjustment_3</span></td>
<td><span style="margin-left:3.0em;">100.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">health_adjustment_4</span></td>
<td><span style="margin-left:3.0em;">1000.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">health_adjustment_5</span></td>
<td><span style="margin-left:3.0em;">10000.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">health_timeout</span></td>
<td><span style="margin-left:3.0em;">120.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">score_limit</span></td>
<td><span style="margin-left:3.0em;">5000.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">retry_limit</span></td>
<td><span style="margin-left:3.0em;">2</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">reselection_limit</span></td>
<td><span style="margin-left:3.0em;">2</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">wcm_resend_timeout</span></td>
<td><span style="margin-left:3.0em;">1.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">wcm_retry_timeout</span></td>
<td><span style="margin-left:3.0em;">10.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">wcm_retry_limit_1</span></td>
<td><span style="margin-left:3.0em;">5</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">wcm_retry_limit_2</span></td>
<td><span style="margin-left:3.0em;">1</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">wcm_fail_timeout</span></td>
<td><span style="margin-left:3.0em;">600.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">autoinstall_load</span></td>
<td><span style="margin-left:3.0em;">3.0</span></td>
</tr>
</tbody>
</table>
</div><div id="helper:table1:0:div6" style="margin-left:2.1em;"><a id="helper:table1:0:command3" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><img id="helper:table1:0:image3" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" />groups</a></div><div id="helper:table1:0:child_div3" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><table id="helper:table1:table13" width="100%">
<thead>
<tr><th colspan="1" scope="colgroup">Group Value</th></tr>
</thead>
<tbody>
<tr>
<td><span style="margin-left:3.0em;">type1</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">type2</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">type3</span></td>
</tr>
</tbody>
</table>
</div><div id="helper:table1:0:div8" style="margin-left:2.1em;"><a id="helper:table1:0:command4" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><img id="helper:table1:0:image4" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" />programs</a></div><div id="helper:table1:0:child_div4" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><table id="helper:table1:table14" width="100%">
<tbody>
<tr>
<td><div id="helper:table1:table14:0:div10" style="margin-left:2.7em;"><a id="helper:table1:table14:0:command5" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><span id="program" title="helper:table1:table14:0:command5"></span><img id="helper:table1:table14:0:image5" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" /><span id="helper:table1:table14:0:t2">called1</span></a></div><div id="helper:table1:table14:0:child_div5" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><table id="helper:table1:table14:table141" width="100%">
<thead>
<tr>
<th scope="col"><span style="margin-left:2.4em;">Attribute Name</span></th>
<th scope="col"><span style="margin-left:2.1em;">Attribute Value</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="program" title="helper:table1:table14:table141:0:coloumn41"></span><span style="margin-left:3.0em;">load</span></td>
<td><span style="margin-left:3.0em;">0.25</span></td>
</tr>
<tr>
<td><span id="program" title="helper:table1:table14:table141:1:coloumn41"></span><span style="margin-left:3.0em;">dynamic</span></td>
<td><span style="margin-left:3.0em;">yes</span></td>
</tr>
</tbody>
</table>
</div></td>
</tr>
<tr>
<td><div id="helper:table1:table14:1:div10" style="margin-left:2.7em;"><a id="helper:table1:table14:1:command5" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><span id="program" title="helper:table1:table14:1:command5"></span><img id="helper:table1:table14:1:image5" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" /><span id="helper:table1:table14:1:t2">called2</span></a></div><div id="helper:table1:table14:1:child_div5" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><table id="helper:table1:table14:table141" width="100%">
<thead>
<tr>
<th scope="col"><span style="margin-left:2.4em;">Attribute Name</span></th>
<th scope="col"><span style="margin-left:2.1em;">Attribute Value</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="program" title="helper:table1:table14:table141:0:coloumn41"></span><span style="margin-left:3.0em;">load</span></td>
<td><span style="margin-left:3.0em;">0.25</span></td>
</tr>
<tr>
<td><span id="program" title="helper:table1:table14:table141:1:coloumn41"></span><span style="margin-left:3.0em;">dynamic</span></td>
<td><span style="margin-left:3.0em;">yes</span></td>
</tr>
</tbody>
</table>
</div></td>
</tr>
<tr>
<td><div id="helper:table1:table14:2:div10" style="margin-left:2.7em;"><a id="helper:table1:table14:2:command5" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><span id="program" title="helper:table1:table14:2:command5"></span><img id="helper:table1:table14:2:image5" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" /><span id="helper:table1:table14:2:t2">called3</span></a></div><div id="helper:table1:table14:2:child_div5" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><table id="helper:table1:table14:table141" width="100%">
<thead>
<tr>
<th scope="col"><span style="margin-left:2.4em;">Attribute Name</span></th>
<th scope="col"><span style="margin-left:2.1em;">Attribute Value</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="program" title="helper:table1:table14:table141:0:coloumn41"></span><span style="margin-left:3.0em;">load</span></td>
<td><span style="margin-left:3.0em;">0.25</span></td>
</tr>
<tr>
<td><span id="program" title="helper:table1:table14:table141:1:coloumn41"></span><span style="margin-left:3.0em;">dynamic</span></td>
<td><span style="margin-left:3.0em;">yes</span></td>
</tr>
</tbody>
</table>
</div></td>
</tr>
</tbody>
</table>
</div><div id="helper:table1:0:div12" style="margin-left:2.1em;"><a id="helper:table1:0:command6" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><img id="helper:table1:0:image6" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" />transactions</a></div><div id="helper:table1:0:child_div6" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><table id="helper:table1:table15" width="100%">
<tbody>
<tr>
<td><span style="margin-left:3.0em;">TRN1</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">TRN2</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">TRN3</span></td>
</tr>
</tbody>
</table>
</div><div id="helper:table1:0:div14" style="margin-left:2.1em;"><a id="helper:table1:0:command7" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><img id="helper:table1:0:image7" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" />nodes</a></div><div id="helper:table1:0:child_div7" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><table id="helper:table1:table151" width="100%">
<tbody>
<tr>
<td><span style="margin-left:3.0em;">argon.in.ibm.com</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">alina.in.ibm.com</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">ampere.in.ibm.com</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">txdt32.in.ibm.com</span></td>
</tr>
</tbody>
</table>
</div></div></td>
</tr>
<tr>
<td><span id="plexIndex" title="helper:table1:1:column1"></span><div id="helper:table1:1:div2" style="margin-left:0.9em;"><a id="helper:table1:1:command1" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><img id="helper:table1:1:image1" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" /><span id="helper:table1:1:t1">plex2</span></a></div><div id="helper:table1:1:child_div1" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><div id="helper:table1:1:div4" style="margin-left:2.1em;"><a id="helper:table1:1:command2" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><img id="helper:table1:1:image2" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" />attributes</a></div><div id="helper:table1:1:child_div2" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><table id="helper:table1:table12" width="100%">
<thead>
<tr>
<th scope="col"><span id="helper:table1:table12:text2" style="margin-left:2.4em;">Attribute Name</span></th>
<th scope="col"><span style="margin-left:2.1em;">Attribute Value</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span style="margin-left:3.0em;">session_scale_1</span></td>
<td><span style="margin-left:3.0em;">1.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">session_scale_2</span></td>
<td><span style="margin-left:3.0em;">2.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">load_scale_1</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">load_scale_2</span></td>
<td><span style="margin-left:3.0em;">1.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">load_limit</span></td>
<td><span style="margin-left:3.0em;">600.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">connection_scale</span></td>
<td><span style="margin-left:3.0em;">1.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_limit_1</span></td>
<td><span style="margin-left:3.0em;">5</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_limit_2</span></td>
<td><span style="margin-left:3.0em;">10</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_adjustment</span></td>
<td><span style="margin-left:3.0em;">0.10</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_scale_1</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_scale_2</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">known_adjustment</span></td>
<td><span style="margin-left:3.0em;">0.05</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">known_scale_1</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">known_scale_2</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">normalise_scale</span></td>
<td><span style="margin-left:3.0em;">0.00833</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">equal_delta</span></td>
<td><span style="margin-left:3.0em;">0.0001</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">health_adjustment_1</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">health_adjustment_2</span></td>
<td><span style="margin-left:3.0em;">10.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">health_adjustment_3</span></td>
<td><span style="margin-left:3.0em;">100.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">health_adjustment_4</span></td>
<td><span style="margin-left:3.0em;">1000.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">health_adjustment_5</span></td>
<td><span style="margin-left:3.0em;">10000.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">health_timeout</span></td>
<td><span style="margin-left:3.0em;">120.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">score_limit</span></td>
<td><span style="margin-left:3.0em;">5000.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">retry_limit</span></td>
<td><span style="margin-left:3.0em;">2</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">reselection_limit</span></td>
<td><span style="margin-left:3.0em;">2</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">wcm_resend_timeout</span></td>
<td><span style="margin-left:3.0em;">1.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">wcm_retry_timeout</span></td>
<td><span style="margin-left:3.0em;">10.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">wcm_retry_limit_1</span></td>
<td><span style="margin-left:3.0em;">5</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">wcm_retry_limit_2</span></td>
<td><span style="margin-left:3.0em;">1</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">wcm_fail_timeout</span></td>
<td><span style="margin-left:3.0em;">600.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">autoinstall_load</span></td>
<td><span style="margin-left:3.0em;">3.0</span></td>
</tr>
</tbody>
</table>
</div><div id="helper:table1:1:div6" style="margin-left:2.1em;"><a id="helper:table1:1:command3" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><img id="helper:table1:1:image3" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" />groups</a></div><div id="helper:table1:1:child_div3" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><table id="helper:table1:table13" width="100%">
<thead>
<tr><th colspan="1" scope="colgroup">Group Value</th></tr>
</thead>
<tbody>
<tr>
<td><span style="margin-left:3.0em;">type1</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">type2</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">type3</span></td>
</tr>
</tbody>
</table>
</div><div id="helper:table1:1:div8" style="margin-left:2.1em;"><a id="helper:table1:1:command4" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><img id="helper:table1:1:image4" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" />programs</a></div><div id="helper:table1:1:child_div4" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><table id="helper:table1:table14" width="100%">
<tbody>
<tr>
<td><div id="helper:table1:table14:0:div10" style="margin-left:2.7em;"><a id="helper:table1:table14:0:command5" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><span id="program" title="helper:table1:table14:0:command5"></span><img id="helper:table1:table14:0:image5" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" /><span id="helper:table1:table14:0:t2">called1</span></a></div><div id="helper:table1:table14:0:child_div5" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><table id="helper:table1:table14:table141" width="100%">
<thead>
<tr>
<th scope="col"><span style="margin-left:2.4em;">Attribute Name</span></th>
<th scope="col"><span style="margin-left:2.1em;">Attribute Value</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="program" title="helper:table1:table14:table141:0:coloumn41"></span><span style="margin-left:3.0em;">load</span></td>
<td><span style="margin-left:3.0em;">0.25</span></td>
</tr>
<tr>
<td><span id="program" title="helper:table1:table14:table141:1:coloumn41"></span><span style="margin-left:3.0em;">dynamic</span></td>
<td><span style="margin-left:3.0em;">yes</span></td>
</tr>
</tbody>
</table>
</div></td>
</tr>
<tr>
<td><div id="helper:table1:table14:1:div10" style="margin-left:2.7em;"><a id="helper:table1:table14:1:command5" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><span id="program" title="helper:table1:table14:1:command5"></span><img id="helper:table1:table14:1:image5" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" /><span id="helper:table1:table14:1:t2">called2</span></a></div><div id="helper:table1:table14:1:child_div5" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><table id="helper:table1:table14:table141" width="100%">
<thead>
<tr>
<th scope="col"><span style="margin-left:2.4em;">Attribute Name</span></th>
<th scope="col"><span style="margin-left:2.1em;">Attribute Value</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="program" title="helper:table1:table14:table141:0:coloumn41"></span><span style="margin-left:3.0em;">load</span></td>
<td><span style="margin-left:3.0em;">0.25</span></td>
</tr>
<tr>
<td><span id="program" title="helper:table1:table14:table141:1:coloumn41"></span><span style="margin-left:3.0em;">dynamic</span></td>
<td><span style="margin-left:3.0em;">yes</span></td>
</tr>
</tbody>
</table>
</div></td>
</tr>
<tr>
<td><div id="helper:table1:table14:2:div10" style="margin-left:2.7em;"><a id="helper:table1:table14:2:command5" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><span id="program" title="helper:table1:table14:2:command5"></span><img id="helper:table1:table14:2:image5" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" /><span id="helper:table1:table14:2:t2">called3</span></a></div><div id="helper:table1:table14:2:child_div5" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><table id="helper:table1:table14:table141" width="100%">
<thead>
<tr>
<th scope="col"><span style="margin-left:2.4em;">Attribute Name</span></th>
<th scope="col"><span style="margin-left:2.1em;">Attribute Value</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span id="program" title="helper:table1:table14:table141:0:coloumn41"></span><span style="margin-left:3.0em;">load</span></td>
<td><span style="margin-left:3.0em;">0.25</span></td>
</tr>
<tr>
<td><span id="program" title="helper:table1:table14:table141:1:coloumn41"></span><span style="margin-left:3.0em;">dynamic</span></td>
<td><span style="margin-left:3.0em;">yes</span></td>
</tr>
</tbody>
</table>
</div></td>
</tr>
</tbody>
</table>
</div><div id="helper:table1:1:div12" style="margin-left:2.1em;"><a id="helper:table1:1:command6" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><img id="helper:table1:1:image6" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" />transactions</a></div><div id="helper:table1:1:child_div6" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><table id="helper:table1:table15" width="100%">
<tbody>
<tr>
<td><span style="margin-left:3.0em;">TRN1</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">TRN2</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">TRN3</span></td>
</tr>
</tbody>
</table>
</div><div id="helper:table1:1:div14" style="margin-left:2.1em;"><a id="helper:table1:1:command7" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><img id="helper:table1:1:image7" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" />nodes</a></div><div id="helper:table1:1:child_div7" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><table id="helper:table1:table151" width="100%">
<tbody>
<tr>
<td><span style="margin-left:3.0em;">argon.in.ibm.com</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">alina.in.ibm.com</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">ampere.in.ibm.com</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">txdt32.in.ibm.com</span></td>
</tr>
</tbody>
</table>
</div></div></td>
</tr>
<tr>
<td><span id="plexIndex" title="helper:table1:2:column1"></span><div id="helper:table1:2:div2" style="margin-left:0.9em;"><a id="helper:table1:2:command1" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><img id="helper:table1:2:image1" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" /><span id="helper:table1:2:t1">plex3</span></a></div><div id="helper:table1:2:child_div1" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><div id="helper:table1:2:div4" style="margin-left:2.1em;"><a id="helper:table1:2:command2" href="#" onclick="javascript:showHideNavigation(this)" style="color: rgb(0, 0, 0); text-decoration: none; display : block;"><img id="helper:table1:2:image2" src="../images/arrow_collapsed.gif" alt="Expand / Collapse" style="border : 0;" />attributes</a></div><div id="helper:table1:2:child_div2" style="color: rgb(0, 0, 0); text-decoration: none; display : block"><table id="helper:table1:table12" width="100%">
<thead>
<tr>
<th scope="col"><span id="helper:table1:table12:text2" style="margin-left:2.4em;">Attribute Name</span></th>
<th scope="col"><span style="margin-left:2.1em;">Attribute Value</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><span style="margin-left:3.0em;">session_scale_1</span></td>
<td><span style="margin-left:3.0em;">1.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">session_scale_2</span></td>
<td><span style="margin-left:3.0em;">2.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">load_scale_1</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">load_scale_2</span></td>
<td><span style="margin-left:3.0em;">1.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">load_limit</span></td>
<td><span style="margin-left:3.0em;">600.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">connection_scale</span></td>
<td><span style="margin-left:3.0em;">1.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_limit_1</span></td>
<td><span style="margin-left:3.0em;">5</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_limit_2</span></td>
<td><span style="margin-left:3.0em;">10</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_adjustment</span></td>
<td><span style="margin-left:3.0em;">0.10</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_scale_1</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">same_scale_2</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">known_adjustment</span></td>
<td><span style="margin-left:3.0em;">0.05</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">known_scale_1</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">known_scale_2</span></td>
<td><span style="margin-left:3.0em;">0.0</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">normalise_scale</span></td>
<td><span style="margin-left:3.0em;">0.00833</span></td>
</tr>
<tr>
<td><span style="margin-left:3.0em;">equal_delta</span></td>
<td><span style="margin-left:3.0em;">0.0 -
Calling Java function from java script function
Hello,
I have a jsp in which on button click i am calling a java script function. now there is some data that i want to insert in a table on click of the same button. But in order to do that i need to write java code. but if i write java code inside the script function that is called on button click it doesnt work. what i understand is that i need to make a java function inside the jsp & call that from the script function. can someone tell me how to do that ?
this is the code i have written
function sendMail(iCount2)
var eMailAddresses = "";
var studRegId = "";
for (var i=0; i <iCount2; i++)
if(document.getElementById("chk" + i).checked)
eMailAddresses = eMailAddresses+document.frmQueryBuilder.hdnEmail.value+",";
studRegId = document.frmQueryBuilder.studRegId[i].value;
<% if(regTemp != "")
MakeConnection mc1 = new MakeConnection();
con1 = mc1.DBConnection();
String temp = "1";
System.out.println("inside the if loop for regTemp");
String query1 = "insert into studcompreg (studregid,compid) values(?,?)";
stmt1 = con1.prepareStatement(query1);
stmt1.setString(1,regTemp);
stmt1.setString(2,temp);
/*stmt1.setString(3,temp);
stmt1.setString(4,"01-jan-2005");*/
rsinst = stmt1.executeQuery();
%>
win = window.open('BackupMail.jsp?eMailAddresses='+eMailAddresses);<%@ page import = "Utils.*" %>
<%@ page import = "java.sql.*" %>
<%@ page import = "java.lang.String.*"%>
<%@ page import = "java.text.*" %>
<%@ page import = "java.util.*"%>
<%
String insertValues[] = new String[10];
String regTemp = "";
java.sql.Connection con1 = null;
java.sql.ResultSet rs1 = null;
java.sql.PreparedStatement stmt1 = null;
java.sql.Statement stmtinst = null;
java.sql.ResultSet rsinst = null;
java.sql.Connection con = null;
java.sql.PreparedStatement stmt = null;
java.sql.ResultSet rs = null;
%>
<HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="stylesheet" href="style.css" type="text/css">
<script language = "javascript">
/*Client side validations go here*/
function submitForm()
document.frmQueryBuilder.submit();
function selectAll(iCount2)
for (var i=0; i <iCount2; i++)
document.getElementById("chk" + i).checked = true;
function deselectAll(iCount2)
for (var i=0; i <iCount2; i++)
document.getElementById("chk" + i).checked = false;
function sendMail(iCount2)
var eMailAddresses = "";
var studRegId = "";
for (var i=0; i <iCount2; i++)
if(document.getElementById("chk" + i).checked)
eMailAddresses = eMailAddresses+document.frmQueryBuilder.hdnEmail.value+",";
studRegId = document.frmQueryBuilder.studRegId[i].value;
document.frmQueryBuilder.temp.value ="newOne";
document.frmQueryBuilder.submit();
win = window.open('BackupMail.jsp?eMailAddresses='+eMailAddresses);
</script>
</head>
<BODY>
<%
int MaxCount = 15;
int iCount1 = 0;
int iCount2 = 0;
int iCount3 = 0;
String query = "";
String eMailAddresses = "";
StringBuffer sbMail = new StringBuffer();
//String strValue[] = new String [MaxCount];
//try
String strCriteria [] = new String [10];
String strCondition [] = new String [10];
String strValue1 [] = new String [10];
String strCombo [] = new String [10];
for (iCount3 = 0; iCount3 < 10; iCount3 ++ )
strCriteria[iCount3] = "";
strCondition[iCount3] = "";
strValue1[iCount3] = "";
strCombo[iCount3] = "";
if (request.getParameter ("txtAction") != null)
//String nothing = request.getParameter("chk"+iCount2);
//System.out.println("Value of checkbox : " +nothing);
String strQuery[] = new String [MaxCount];
StringBuffer sb = new StringBuffer();
String AccessQuery = "";
String strTmpQuery = "";
String strTmpRefType[] = new String [4];
int QueryLen = 0;
int ModifyLen = 0;
int QueryLenNew = 0;
String strTmpRefType1 = "";
String strTmpRefType2 = "";
String strTmpRefType3 = "";
String strTmpRefType4 = "";
strQuery[0] = "SELECT STUDREGID, NAME,STUDID,PROGRAM,BRANCH,CPI,EMAIL FROM STUDREGDTLS WHERE";
sb.append(strQuery[0]);
for (iCount3 = 1; iCount3 < 11; iCount3 ++)
iCount1++;
strCriteria[iCount3 - 1] = request.getParameter("criteria" + iCount1);
strCondition[iCount3 - 1] = request.getParameter("condition" + iCount1);
strValue1[iCount3 - 1] = request.getParameter("value" + iCount1);
strCombo[iCount3 - 1] = request.getParameter("combo" + iCount1);
System.out.println("Loop"+iCount3);
if (!request.getParameter("criteria" + iCount1).equals("null"))
System.out.println("Started getting parameters");
strTmpRefType1 = request.getParameter("criteria" + iCount1);
if (request.getParameter("condition" + iCount1).equals("ANYWHERE"))
System.out.println("Entered anywhere if of Anywhere");
strTmpRefType2 = "LIKE";
else if (request.getParameter("condition" + iCount1).equals("STARTSWITH"))
strTmpRefType2 = "LIKE";
else
System.out.println("Anywhere & Startswith not selected");
strTmpRefType2 = request.getParameter("condition" + iCount1);
if (request.getParameter("condition" + iCount1).equals("ANYWHERE"))
strTmpRefType3 = "\'" + "%" request.getParameter("value" iCount1)+ "%" + "\'";
else if (request.getParameter("condition" + iCount1).equals("STARTSWITH"))
strTmpRefType3 = "\'" request.getParameter("value" iCount1)+ "%" +"\'";
else if (request.getParameter("condition" + iCount1).equals("="))
strTmpRefType3 = "\'" + request.getParameter("value" + iCount1)+ "\'";
System.out.println(strTmpRefType3);
else
strTmpRefType3 = request.getParameter("value" + iCount1);
strTmpRefType4 = request.getParameter("combo" + iCount1);
System.out.println("Value of strTmpRefType2" +strTmpRefType2);
strQuery[iCount3] = " upper(" strTmpRefType1 ") " strTmpRefType2 " upper(" strTmpRefType3 ") " strTmpRefType4 "";
System.out.println("Making Qyery"+iCount3);
sb.append(strQuery[iCount3]);
if (request.getParameter ("txtAction") != null)
MakeConnection mc = new MakeConnection();
con = mc.DBConnection();
QueryLen = sb.length();
ModifyLen = strTmpRefType4.length();
QueryLenNew = (QueryLen - ModifyLen);
sb.delete(QueryLenNew, QueryLen);
AccessQuery = sb.toString();
System.out.println(AccessQuery);
stmt = con.prepareStatement (AccessQuery);
rs = stmt.executeQuery();
%>
<table width="563" >
<tr><td><DIV CLASS="windowtitle">Student Search</DIV></td></tr>
<tr><td><DIV CLASS="udGroupBoxHdrDiv">Enter Search Criteria</DIV></td></tr>
<tr><td CLASS="bgcol">
<FORM name=frmQueryBuilder METHOD='POST'>
<INPUT TYPE=hidden Name='txtAction' value='S'>
<table >
<%
for(iCount1 = 1; iCount1 < 11; iCount1++)
System.out.println (strCriteria[iCount1-1]);
if(iCount1 == 9)
%> <TR valign=top>
<%
else
%> <TR>
<%
%>
<TD width="47"><LABEL CLASS="assoctext">Criteria </LABEL></td><td width="150">
<SELECT NAME='<%="criteria" + iCount1%>' size="1">
<OPTION VALUE='null'>- - - - - - - - - - - - - - - - -</OPTION>
<OPTION VALUE='AGE' <%=strCriteria[iCount1-1].equals("AGE")?"selected":""%>>AGE</OPTION>
<OPTION VALUE='BRANCH' <%=strCriteria[iCount1-1].equals("BRANCH")?"selected":""%>>BRANCH</OPTION>
<OPTION VALUE='CPI' <%=strCriteria[iCount1-1].equals("CPI")?"selected":""%>>CPI</OPTION>
<OPTION VALUE='DEPARTMENT' <%=strCriteria[iCount1-1].equals("DEPARTMENT")?"selected":""%>>DEPARTMENT</OPTION>
<OPTION VALUE='DREAMCOMP' <%=strCriteria[iCount1-1].equals("DREAMCOMP")?"selected":""%>>DREAM COMPANY</OPTION>
<OPTION VALUE='PROGRAM' <%=strCriteria[iCount1-1].equals("PROGRAM")?"selected":""%>>PROGRAM</OPTION>
<OPTION VALUE='SKILLSET' <%=strCriteria[iCount1-1].equals("SKILLSET")?"selected":""%>>SKILL SET</OPTION>
<OPTION VALUE='WORKEX' <%=strCriteria[iCount1-1].equals("WORKEX")?"selected":""%>>WORK EX</OPTION>
</SELECT>
</TD>
<TD width="88">
<SELECT NAME='<%="condition" + iCount1%>'>
<OPTION VALUE='<=' <%=strCondition[iCount1-1].equals("<=")?"selected":""%>><=</OPTION>
<OPTION VALUE='>=' <%=strCondition[iCount1-1].equals(">=")?"selected":""%>>>=</OPTION>
<OPTION VALUE='=' <%=strCondition[iCount1-1].equals("=")?"selected":""%>>EXACT MATCH</OPTION>
<OPTION VALUE='ANYWHERE' <%=strCondition[iCount1-1].equals("ANYWHERE")?"selected":""%>>ANYWHERE</OPTION>
<OPTION VALUE='STARTSWITH' <%=strCondition[iCount1-1].equals("STARTSWITH")?"selected":""%>>STARTS WITH</OPTION>
</SELECT>
</TD><TD width="38"><LABEL CLASS="assoctext">Value </LABEL></TD>
<TD width="186"><INPUT NAME=<%="value" + iCount1%> value='<%=strValue1[iCount1-1]%>' size="20" >
</TD>
<TD width="187"><SELECT NAME='<%="combo" + iCount1%>'>
<OPTION VALUE='AND' <%=strCombo[iCount1-1].equals("AND")?"selected":""%>>AND</OPTION>
<OPTION VALUE='OR' <%=strCombo[iCount1-1].equals("OR")?"selected":""%>>OR</OPTION>
</SELECT>
</TD>
</TR>
<%
%>
</table>
</td></tr>
<tr><td align=center>
<BR>
<INPUT CLASS="butstyle" type="button" id="cmdSave" enableAlways = "0" value="Submit" onclick="return submitForm();" >
</td></tr>
</table>
<table width="698">
<tr><td colspan = 6><DIV CLASS="udGroupBoxHdrDiv">Students Matching the Required Crieria</DIV></td></tr>
<TR>
<TD CLASS="tblhdr" width="50"></TD><TD CLASS="tblhdr" width="155">Student Name</TD> <TD CLASS="tblhdr" width="150">Student
Id</TD><TD CLASS="tblhdr" width="150">Program</TD><TD CLASS="tblhdr" width="150">Branch</TD><TD CLASS="tblhdr" width="62">CPI</TD>
</TR>
<% int i = 0;
if (request.getParameter ("txtAction") != null)
while( rs.next())
%>
<% System.out.println("Entered Output Loop"+ rs.getString("Name"));
System.out.println("Entered Output Loop.........."+ rs.getString("Email"));
sbMail.append(rs.getString("Email")).append(",");
regTemp = rs.getString("STUDREGID");
i++;
System.out.println("student reg id........."+regTemp);
System.out.println("value of i........."+i);
%>
<TR CLASS="bgcol">
<TD width="25"><INPUT TYPE="checkbox" NAME='<%="chk" + iCount2%>' id='<%="chk" + iCount2%>' VALUE=""></TD>
<TD width="155"><INPUT NAME=txtName size=20 value='<%=rs.getString("NAME")%>'></TD>
<TD width="150"><INPUT NAME=txtStudId size=20 value='<%=rs.getString("STUDID")%>'></TD>
<TD width="150"><INPUT NAME=txtProgram size=20 value='<%=rs.getString("PROGRAM")%>'></TD>
<TD width="150"><INPUT NAME=txtBranch size=20 value='<%=rs.getString("BRANCH")%>'></TD>
<TD width="62"><INPUT NAME=txtCpi size=4 value='<%=rs.getString("CPI")%>'></TD>
</TR>
<INPUT type="hidden" NAME=hdnEmail value='<%=rs.getString("Email")%>'>
<INPUT type = "hidden" NAME = studRegId value = '<%=rs.getString("studRegId")%>'>
<INPUT type ="hidden" NAME =temp value ="">
<%
iCount2++;
eMailAddresses = sbMail.toString();
if (con != null)
con.close();
//catch( Exception e)
System.out.println ("ERROR " + e);
if (con != null)
con.close();
%>
</table>
<table width="698" align=center>
<tr><td>
<BR>
<INPUT CLASS="butstyle" valign=top type="button" id="cmdSave" enableAlways = "0" value="Select All" onclick="return selectAll(<%=iCount2%>)" >
</td>
<td>
<BR>
<INPUT CLASS="butstyle" valign=top type="button" id="cmdSave" enableAlways = "0" value="Deselect All" onclick="return deselectAll(<%=iCount2%>)" >
</td>
<td>
<BR>
<INPUT CLASS="butstyle" valign=top type="button" id="cmdSave" enableAlways = "0" value="Send Mail" onclick="sendMail(<%=iCount2%>)" >
</td>
</tr>
</table>
</FORM>
</BODY>
</HTML>
<% System.out.println("value inside hidden var temp"+request.getParameter("temp"));
if((request.getParameter("temp") != null) && (request.getParameter("temp").equals("newOne")))
//if(regTemp != null)
MakeConnection mc1 = new MakeConnection();
con1 = mc1.DBConnection();
String temp = "1";
System.out.println("inside the if loop for regTemp");
String query1 = "insert into studcompreg (studregid,compid) values(?,?)";
stmt1 = con1.prepareStatement(query1);
stmt1.setString(1,regTemp);
stmt1.setString(2,temp);
/*stmt1.setString(3,temp);
stmt1.setString(4,"01-jan-2005");*/
rsinst = stmt1.executeQuery();
%> -
Getting error in calling Java Script function in HTMLB page
Hi
I am having a button in HTMLB page which calls the Java Script function for click event.I have included the Java Script in the script folder of the application.
I am calling the function present in JS like this,
<SCRIPT src="portalsdc.js"></SCRIPT>
function buttonClick() {
someFunc()
<hbj:button
onClientClick="JavaScript:buttonClick();"
disabled="false"
design="STANDARD"
/>
The Error i am getting in calling someFunc()is "Object Expected " ..
Any suggestion how to make it work.
Thanks in advance
SaravananHi,
My code in page is
<%@ taglib uri="tagLib" prefix="hbj" %>
<hbj:content id="myContext" >
<hbj:page title="Epcf iView" >
<SCRIPT src="portalsdc.js"></SCRIPT>
<script language="JavaScript">
function buttonClick() {
someFunc()
</script>
<hbj:form>
<hbj:button
id="sendEvent"
text="Send event"
width="125px"
tooltip="This button raises an event ..."
onClientClick="JavaScript:buttonClick();"
disabled="false"
design="STANDARD"
/>
</hbj:form>
</hbj:page>
</hbj:content>
The code in Java script portalsdc.js is :
function someFunc()
alert ("HI");
Even i have set and tried jsObjectNeeded = TRUE for button.
Thanks and Regards,
Saravanan -
Trying to access the java script files via jar file in WEB SERVER
hi all,
I am trying to access the java script files via jar file ,which is present in Apache webserver in order to minimise the number of hits to app server.some thing like cache ...
in jsp the code goes like this...
<script type="text/javascript" archive="http://localhost:14000/dojo.jar!" src="dojo.jar/parser.js" " ></script>{code}
But i am not able to access the js file which is put in jar file present in the webserver.Hi,
You can use DWR (Direct Web remoting) for that. It is easy AJAX for java. ou can directly call the java script function from java class and also java class from javaScripts..
Regards,
Hardik -
How to Include JAVA script code in SAP BI7 web Reporting?
How to Include JAVA script code in SAP BI7 web Reporting?
In nw2004s there is a new web item called "Script" web item which lets you add javascript code. When you add javascript code in this web item, you don't need the opening and closing <script> tags...
Hope it Helps
Chetan
@CP.. -
How to enable java script in my Firefox browser? help its urgent.
how to enable java script in my Firefox browser? help its urgent.
go to '''about:config''' and search for '''javascript.enabled''' change its value to '''true'''
*[http://kb.mozillazine.org/About:config about:config] -
How to enable java script in firefox
how to enable java script in firefox
See:
*[[JavaScript]]
Also make sure that an extension isn't causing problems.
* [[Troubleshooting extensions and themes]] -
How to build JAVA script in CMD
How to build JAVA script in CMD command prompt?
I think it's build.all but it's not working plz helpTo build a Java class file (ie compile it) you need to call the Java compiler javac. There is software around to make this easier:
- ANT a make like tool but with XML files usually called build.xml
- Maven a more convention driven approach for much complexer systems
- IDEs like JDeveloper, Netbeans, Eclipse, you name it.
--olaf
Maybe you are looking for
-
Hai, As Iam using Loop in a Loop iam getting time out dump . in my internal table itab3 has unique objnr values. for each objnr i have different status in itab_jcds. each status column has diff status. now i need to concatenate the status depending
-
How do I download music from my external hard drive to itunes
How do I download music from my external hard drive to itunes
-
Compose email with formatting, receiver doesn't see it correctly?
Hi, When I compose an email with mail.app and paste images into the text in strategic places, the receiver (using Windows or gmail as email viewer) doesn't see the email formatted correctly. That is, the images are just included as attachments, not a
-
Messages opens multiple windows when selecting it from notifications
I notice that when I click on a new arrival message (iMessage) from notifications popup it will open 4 seperate windows and I can't reply until I close out 3 of the windows. Anyone else seeing this?
-
I can't get the track matte to work throughtout the duration. It starts fine in the beginning and after 3 secs, it drops the track matte even though it is set for 22 secs, giving me a completely mosaic video afterwards. I have tried shortening the du