Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
95% Quality Score
Upvotes Received
21
Posts with Upvotes
20
Upvoting Members
16
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
4 Commented Posts
0 Endorsements
Ranked #390
~124.40K People Reached
Favorite Forums
Favorite Tags

129 Posted Topics

Member Avatar for stayfierce

setting the font to the text field should work. Also to center align the text use textfield.setHorizontalAlignment(JTextField.CENTER); Following code might help you, [CODE] import java.awt.Color; import java.awt.Font; import java.awt.*; import java.awt.font.*; import java.io.*; import javax.swing.*; public class TextFieldExample{ public static void main(String[] args) { JFrame frame = new JFrame(); frame.setLayout(null); …

Member Avatar for julianksb
0
53K
Member Avatar for beanboy

There is no way to get the values of the unchecked checkboxes because when a HTML form is submitted the values of checked checkboxes are sent to the server. One workaround would be use hidden input fields for storing all the values [CODE] <input type="hidden" name="chkboxvalues" value="<%=rs2.getString("description") %>"/> [/CODE] and …

Member Avatar for vk
0
4K
Member Avatar for fielding

To use jquery first download the jquery-1.4.1.js file from the link at [url]http://docs.jquery.com/Downloading_jQuery#Current_Release[/url] Copy it in your webapp folder and use it in the <head> section of the web page as [CODE] <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="jquery-1.4.1.js"></script> [/CODE] Now if you an select element with id "seltest" as, [CODE] <SELECT ID="seltest" …

Member Avatar for ololol
0
3K
Member Avatar for danale

Instead of directly writing the DocumentContainer.innerHTML into the document of the new window, append the style sheet info to the text. Suppose there is 'testStyle' in 'test.css' that is applied to the <div> tag then try this [CODE] var strHtml = "<html>\n<head>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"test.css\">\n</head><body><div style=\"testStyle\">\n" + DocumentContainer.innerHTML + …

Member Avatar for tnjnorbert
0
10K
Member Avatar for rahul8590

You can use SWT to open the browser and render the HTML from memory like given in the example at [url]http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet136.java?view=co[/url] You can find more helpful browser related SWT snippets at [url]http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet136.java?view=co[/url]

Member Avatar for invadev
0
301
Member Avatar for jhonilson

There are many overloaded runReportToPdf() methods for the JasperRunManager object including the one without connection. Go through the JasperRunManager APIs for more details

Member Avatar for Amunantha
0
958
Member Avatar for softDeveloper

The line [CODE] <input type="hidden" name="varname" value="calledFunction();" />[/CODE] does not assign the value returned from the javascript function to 'varname' but assign the value 'calledFunction();'. Hence you are getting the function name in your jsp. You will have to assign the value to 'varname' at the onclick event of the …

Member Avatar for softDeveloper
0
1K
Member Avatar for rukshilag

In the opened popup window you can read the values of the parent window like, [CODE] window.opener.formname.elemname.value; [/CODE] and then display this value on the pop up page

Member Avatar for dean8710
0
386
Member Avatar for prashanth18

One way can be that you can check if the div that is added dynamically exists or not by getElementById() funtion and than add or remove it. Hope the sample code below helps you, [CODE] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <SCRIPT LANGUAGE="JavaScript"> …

Member Avatar for Taywin
0
128
Member Avatar for Moderns

The problem is with the line [CODE] dv.attachEvent("onmouseclick",function(){element_event_onmouseclick();}); [/CODE] because both IE and FF attach events differently via javascript. For solution to this, first check the browser type. A simple though not very powerful way can be [CODE] //detecting the browser version var bname = navigator.appName; var isIE = false; …

Member Avatar for momonq1990
0
2K
Member Avatar for drummershuff

There are couple of issues with the array manipulations that you are doing. 1] In Museum.java you are reading the input file with the loop, [CODE] for(int w = 0; w < WEEK-1; w++) { for(int d = 0; d < DAY-1; d++) { for(int h = 0; h < …

Member Avatar for parry_kulk
0
279
Member Avatar for coderick
Re: jstl

I think the error is because of missing taglib entries in WEB-INF/web.xml file. First verfiy that you have also copied the jakarta-taglibs-standard-1.0.6\tld folder into the WEB-INF Now in web.xml file add the following entries, [code=XML]<taglib> <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri> <taglib-location>/WEB-INF/tld/c.tld</taglib-location> </taglib>[/code]

Member Avatar for peter_budo
0
272
Member Avatar for jeffrey o

At line 43 you are using the for statement as [CODE] for(int j=0;j<serverdata2.length;j++) [/CODE] but the variable 'serverdata2' is set to null at line 22. This is causing the NullPointerException

Member Avatar for parry_kulk
0
531
Member Avatar for zeplin

In the code inputs[i].onkeyup = function() { ................. } you assign a function for that handles keyup event. It does the multiplication there. You can add your logic to calculate the grand total there.

Member Avatar for parry_kulk
0
123
Member Avatar for xiiopao

If the image is stored as blob binary data you cannot display it is using simply the c:out tag. You need to create a servlet which streams the image from the server and call it in img tag as something like <img src="/getImage?petid=${row.petid}" /> Now in the servlet 1. Read …

Member Avatar for parry_kulk
0
148
Member Avatar for harshit99

You will require a scheduler like 'quartz' for this purpose. You can find it at [url]http://www.quartz-scheduler.org[/url] along with the related documentation of its usage in a servlet container etc.

Member Avatar for saduf
0
147
Member Avatar for ello

Opera does not fire the onunload() event when a page is refreshed. I dont think there could be any solution to this as of now

Member Avatar for ello
0
129
Member Avatar for lewilaloupe

Alternatively you can also use this javascript to get all the input elements having name matching a particular regular expression and process on it [CODE] <script language="JavaScript"> <!-- //set the array filter function if it is not present if (!Array.prototype.filter) { Array.prototype.filter = function(fun /*, thisp*/) { var len = …

Member Avatar for parry_kulk
0
2K
Member Avatar for chepelucho

Implicit objects are only visible within the system generated _jspService() method. They are not visible within methods you define yourself in declarations. So you are getting errors with out.write and/Or out.println. We have to pass them to our own method if we wish to use them locally in those functions. …

Member Avatar for parry_kulk
0
296
Member Avatar for Nitin Daphale

Since you are entering value with a preceding 0, the parseInt(<value>) function takes it as an octal number. Use the parseInt(<value>, <radix>) function instead with radix set to 10 for decimal numbers as shown below, [CODE] var perOfEasyQues = parseInt(document.getElementById("<%=txb_EasyQuesPerc.ClientID%>").value, 10); [/CODE]

Member Avatar for Nitin Daphale
0
81
Member Avatar for azegurb

Try setting the attributes for table as border="0" cellpadding="0" cellspacing="0" This will remove all the borders from the table Then make appropriate changes to above CSS and apply them to rows and columns of the table to give the desired effect

Member Avatar for azegurb
0
136
Member Avatar for tyson.crouch

There are two select boxes with the name="menu" in the above code snippet. Hence the javascript code at line 3 above, [CODE] if (document.frm.menu.value == "other") { [/CODE] is not working as expected. You can either change the name of the second select box or change the javascript code to …

Member Avatar for parry_kulk
0
97
Member Avatar for Sorcher

you can use javascript onclick event to set the text to blank. e.g [CODE] .... <input type="text" name="description" value="Description" onclick="this.value='';"> .... [/CODE]

Member Avatar for Sorcher
0
83
Member Avatar for valdrian_miran

Write a javascript function which will accept the above xml as a parameter and than parse the xml using jquery. [CODE] function parseItemXML(itemXML){ $(itemXML).find('item').each(function(){//For each item element in the xml var showDateTxt = $(this).find('showDate').text(); //get the date var showDate = $.datepicker.parseDate( "mm/dd/yy", showDateTxt); //parse the date using the datapicker jquery …

Member Avatar for parry_kulk
0
125
Member Avatar for softswing

ini4j is a good library to work on ini files. You can use following code sample to add a value in the existing ini file, [CODE] //New Ini instance Ini ini = new Ini(); //Load the ini file File file = new File("test.ini"); ini.load(new FileReader(file)); //adds a new value ini.add("Section", …

Member Avatar for parry_kulk
0
176
Member Avatar for khaled_jawaher

Seems like you have copy-pasted the code in line 5 in date.jsp. [CODE] <jsp:useBean id=“my” scope="request" class=“hi”> [/CODE] If you look properly you will see that the double quotes for attributes 'id' and 'class' are not normal double quotes. Try using normal double quotes as shown in the code given …

Member Avatar for khaled_jawaher
-1
1K
Member Avatar for crazycat503

If you look at the code properly you will notice that at the following block of code,[CODE] else if(reqact=="add"){//add sent atitle="Add"; newlink="Action(" + locid + ",'cancel')"; } [/CODE] The value of atitle is set to 'Add' instead of 'Cancel'. Hence you fell that it is not working :-)

Member Avatar for Taywin
0
145
Member Avatar for arthurav

It seems that the entries are deleted because the form is submitted to the server even after you click cancel on the confirm box. One of the reason for this could be that the delete button could be of the type submit e.g. <input type="submit" name="Delete"> make the type of …

Member Avatar for almostbob
0
350
Member Avatar for newuser17

One thing you must always remember while dealing JSP or any server side scripting is that the server side code is executed first at the server than the resulted HTML is sent to the browser. So in the code snippet given above all the java code between <%= %>, and …

Member Avatar for parry_kulk
0
125
Member Avatar for thinstaafl

First in the code posted above there are syntax errors at line 29. Since you are assiging a string to a variable and that string has single quotes you have to escape them correctly as follows, [CODE] newdiv.innerHTML = '<br>Please copy and paste additional information here<input type='textarea' id='mytext''+i+'')>'; [/CODE] Now …

Member Avatar for sana3366
0
217
Member Avatar for tuse

The exception "java.lang.NoClassDefFoundError: org/apache/naming/resources/Resource" indicates that tomcat cannot find the above class anywhere in the classpath. In tomcat5.5 this class is in the file 'naming-resources.jar'. See if this file is present at the location <tomcat5.5>\common\lib I think due to some reason tomcat might not have installed properly. Try installing it …

Member Avatar for peter_budo
0
152
Member Avatar for newtoajax

What you are doing in the servlet is that you are setting the 'tagValue' as an attribute in the request and than forwarding the request. But for AJAX requests all you have to do is just send the 'tagValue' on the response output stream You should do something like this …

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for Stefano Mtangoo

First you missed the double quotes for page attribute. The line should be [CODE] <jsp:include page="<%=thePage%>" flush="true"></jsp:include> [/CODE] Also you can only use relative urls for the page attribute. As per the docs, The relative URL looks like a pathname--it cannot contain a protocol name, port number, or domain name. …

Member Avatar for Stefano Mtangoo
0
198
Member Avatar for agr8lemon

Try [CODE] newDisplay = ""; [/CODE] instead of [CODE] newDisplay = "block"; [/CODE] What it will do is that it will try to remove any style applied and try to set it to the elements inherent values and as a result should work in both FF and IE. Hope this …

Member Avatar for parry_kulk
0
2K
Member Avatar for KcNaveen

Yes it is possible to make the radio button disabled using javascript but the problem will be that the radio button's value wont be submitted to server if it is disabled. You will have to use some hidden fields to pass the value to the server

Member Avatar for KcNaveen
0
100
Member Avatar for letheredge

The code is fine. It seems that the EL is not evaluating in the webserver. The reasons for these may be, 1] Your web.xml should does not have reference to web-app_2_4.xsd schema or higher e.g. [CODE] <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> [/CODE] 2] You might have disabled the EL …

Member Avatar for ~s.o.s~
0
352
Member Avatar for technopup

Looking at the code snippet posted by you, I dont think you need to append 'a' as you are already passing parameters like 'a19', 'a20'.....etc in the Toggle() function. Only thing is that pass them as a string as shown in eg below [CODE] ... <input type="radio" name="abc" onClick="Toggle('a18');" value="a18"> …

Member Avatar for technopup
0
95
Member Avatar for agent7

It seems to be the problem with the line [CODE] Connection conn = DriverManager.getConnection("jdbc:postgresql://localhost:8080/Employee", "rtz_jhay","kudeta7"); [/CODE] You are trying to connect the d/b on port 8080. This port is generally used by web-servers. Try to find the port on which you can connect to postgresql. The default is 5432 Hope …

Member Avatar for parry_kulk
0
560
Member Avatar for ben05

Using <jsp:include> will help you to include the jsp with combo-box within another jsp dynamically at runtime.

Member Avatar for parry_kulk
0
108
Member Avatar for JimBoCol

As per what my understanding of the problem goes, setting the attribute 'target' wont help because the form is not submitting any form. You are just changing location in the navigate() javascript function. You can achieve what you want by changing the line [CODE] document.location.href=go; [/CODE] in the navigate() javascript …

Member Avatar for JimBoCol
0
105
Member Avatar for niths

You can use an extra parameter in your showUser() javascript function and pass the type of operation as the second parameter, e.g. Change the function as, [CODE] .... function showUser(str, op){ .... [/CODE] Modify all call to showUser as [CODE] <input type="button" name="edit" value="Assign" id="edit" style="background-color:#A7C942; color:#ffffff; font-size: 1.2em;" onclick="showUser(this.value, …

Member Avatar for niths
0
119
Member Avatar for technopup

One way that I can think of is that instead of passing this.value in the onchange event of the select box you can pass the object this itself as follows, [CODE] <select name="**the name is dynamically got from database**" onChange="div_It(this);"> [/CODE] And than in the div_It() function you can use …

Member Avatar for technopup
0
149
Member Avatar for kdmuk10

System.out.println (newTi + newCh + newGi); Will not give you the desired result. Java do not have any inline function that will evaluate a expression. You will have to write the method to evaluate. You can do like check the value of 'newCh' and perform the operation on the two …

Member Avatar for kdmuk10
0
167
Member Avatar for PeterKerk

You can check the classpath set by executing the command echo %CLASSPATH% on the command window. It displays the classpath set on your system. If the classpath variable is not properly set Also try setting the classpath variable in, Control Panel -> System ->Adavanced tab -> Environment Variable -> System …

Member Avatar for parry_kulk
0
609
Member Avatar for madkat3

To prevent a form from submitting, the validating function must be called from the onsubmit event of the <form> tag and this function should than return true or false. e.g You will need to use something like the code given below [CODE] <form method="post" action="send.php" onsubmit="return sendform()"> [/CODE] Now if …

Member Avatar for madkat3
0
11K
Member Avatar for eshwarz

From the code snippet posted, I think that the issue is with missing ending ')' at the line 35 [CODE] var parameters = 'comment='+escape(encodeURI(document.getElementById('comment_box').value)) +'&phototiding='+escape(encodeURI(document.getElementById('phototiding').value)) +'&picname='+escape((encodeURI(document.getElementById('picname').value)); [/CODE] This is causing Javascript errors and that might be the cause of the issue The line should be [CODE] var parameters = 'comment='+escape(encodeURI(document.getElementById('comment_box').value)) …

Member Avatar for parry_kulk
0
102
Member Avatar for hypernova

A very nice tutorial on JavaWorld at the link given below will solve all your queries regarding use of JNDI in a standalone application [url]http://www.javaworld.com/javaworld/jw-04-2002/jw-0419-jndi.html?page=1[/url] Hope this was helpful.

Member Avatar for parry_kulk
0
123
Member Avatar for ravi25a

Your table schema is SID NUMBER(9) SNAME VARCHAR2(8) SADD VARCHAR2(16) but in the delete query is delete from student_info where stu_id=? Given the above schema, I think it should be as follows, delete from student_info where sid=?

Member Avatar for parry_kulk
0
197
Member Avatar for intes77

Formatter lets you pass an Appendable object. This is a interface that defines append methods so that the formatter can store its results in a text collector such as a stream object. Formatter formatter = new Formatter(); creates a formatter and the destination of the formatted output is a StringBuilder …

Member Avatar for intes77
0
151
Member Avatar for IsaB

The error is that "BufferedReader cannot be resolved to a type". It is caused because you have not imported the corresponding libraries. Import the libraries in JSP as <@page import="java.io.BufferedReader"> ... and so on Also the file can be placed anywhere on the server if you are using absolute filepaths. …

Member Avatar for parry_kulk
0
565

The End.