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
~123.27K People Reached
Favorite Forums
Favorite Tags
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
296
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
941
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
384
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
125
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
273
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
270
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
527
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
117
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
145
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
145
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
128
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
294
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
80
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
133
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
96
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
80
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
123
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
173
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
142
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
341
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
121
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
215