3,892 Posted Topics
Re: Are you sure you provided the path to JDK instead of JRE during Tomcat installation? If yes, then paste your code (JSP along with Java files) and we will see what can be done. | |
Re: And "Questions??", don't forget to use code tags the next time you post code which is preferably properly indented. | |
Re: You shouldn't use scriptlets in your JSP file. They hamper readability, maintainability and re usability. Firing SQL queries / database access from JSP code is also bad in itself. Create a simple HTML login form. Create a form bean. When the form is submitted, redirect to a controller servlet which … | |
Re: From the Ecmascript specification: [quote]The dollar sign ($) and the underscore (_) are permitted anywhere in an identifier. The dollar sign is intended for use only in mechanically generated code.[/quote] The $() function is not standard javascript and is used by most libraries to stand for the most commonly used … | |
Re: > javaAddict had the write idea Write? ;-) | |
Re: I won't allow such threads to degrade the quality of posts at Daniweb. Thread closed until someone on the mod team decides/thinks otherwise. | |
Re: You need to iterate over the array and compare each array entry against the user input. Currently, you are comparing an array object with a string, hence the error. [code] for(var i = 0, max = arr.length; i < max; ++i) { var found = false; if(arr[i] == pwd) { … | |
Re: No worries, we will be on the lookout for good things and just ignore the bad things. ;-) | |
Re: Take a look at [URL="http://www.jfree.org/jfreechart/"]JFreeChart[/URL]. | |
Re: > I have a little difficulty accessing a textbox value from a function. Your HTML markup is all broken up, make sure you validate your markup before posting it here. You are incorrectly accessing form fields. Read [URL="http://validator.w3.org/"]this [/URL]and [URL="http://www.jibbering.com/faq/faq_notes/form_access.html"]this[/URL]. > f = getElementById(formName); This is incorrect, getElementById is not … | |
Re: Though it works, it's an incorrect way of doing things.[ICODE] location[/ICODE] property of the [ICODE]window[/ICODE] object is an object, not a string. The location object in turn has an [ICODE]href[/ICODE] property of type string and hence [ICODE]location.href = "url";[/ICODE] is the correct, [ICODE]location = "url";[/ICODE] is not. | |
Re: You have got to realize that when we talk of XML, the whitespaces in your document matter and they get counted as a "#text" node. Assuming that xmlObj has the reference of the root node of the document, something like [icode]alert(xmlObj.childNodes[1].firstChild.nodeValue);[/icode] should do the trick. Here: [quote] xmlObj -> <code> … | |
Re: IE doesn't like setAttribute as already mentioned. A cross browser compatible way of setting the attributes would be to treat them as object properties and modify them directly. [code] formElement.type = "button"; /* .... */ formElement.onclick = function() { someFunction(); }[/code] | |
Re: This is because the value which you receive in the upload box is a Windows specific path. IE would obviously know how to interpret it but Mozilla won't. To make this possible, you have to convert your windows path into a file resource which can be used by all browsers … | |
Re: [QUOTE=kavithareddy;519565]Hi , can any one tell me how to disable the back button in asp.net i have done like this <script > window.onlad = "window.document.forward(1)"; </script> but no use...is there any other way to do this.[/QUOTE] Look into the function [URL="http://www.w3schools.com/htmldom/met_loc_replace.asp"]window.location.replace[/URL]. It should solve your problem. But criplling the client … | |
Re: I guess no: [quote] int MessageBox( HWND [I]hWnd[/I], LPCTSTR [I]lpText[/I], LPCTSTR [I]lpCaption[/I], UINT [I]uType[/I] ); [I]lpText[/I] [in] Pointer to a null-terminated string that contains the message to be displayed.[I] lpCaption[/I] [in] Pointer to a null-terminated string that contains the dialog box title. If this parameter is NULL, the default title … | |
Re: > Using the normal xmlHttp request, it retrieves a html document. But is there any way I could > actually handle it through some kind of DOM before actually displaying it? Make sure that the page you fetch using XHR is well formed. If that is the case, you can … | |
Re: Never ever put business / backend logic in your JSP file. It's not what it was meant for. JSP is a presentation technology. Place your logic inside Servlets / EJB's and use DAO(Data Access Objects) to access your database. Reading the official [URL="http://java.sun.com/javaee/reference/index.jsp"]J2EE tutorial[/URL] would clear up things for you. | |
Re: Yes, Moderators, Super Moderators, Admins and Donators can have custom titles. [B]PS:[/B] And oh Dani, how is it that you have a rep power of 31 by having 4 dots and I have 21 inspite of having 6 dots? | |
Re: > Have you tried this site: [url]http://www.roseindia.net/jsp/jsp.htm[/url] I wouldn't trust that site. The content seems to be substandard. Maybe you should try out the [URL="http://java.sun.com/javaee/reference/index.jsp"]official J2EE tutorial on Sun's site[/URL]. The next step in learning would be of course to grab hold of some decent titles than relying on online … ![]() | |
Re: > I am a complete novice in java. Then what you ought to do is start studying. [URL="http://java.sun.com/javaee/5/docs/firstcup/doc/toc.html"]J2EE 1.5 first cup[/URL] and [URL="http://java.sun.com/javaee/5/docs/tutorial/doc/"]J2EE tutorials[/URL] on the official Sun site should be sufficient at this point in time. > I.m using oracle 9.1,tomcat 4.1 and java 1.4.1. Why are you stuck … | |
Re: If you don't want server interaction, you can of course load the data from a local XML file and render it. | |
Re: > [ICODE]<script type="text/javascript"> getPropertyNum();</script>[/ICODE] This just means that you are executing the function [ICODE]getPropertyNum() [/ICODE]and ignoring the return value, nothing else. To make sure the value is reflected in the DOM tree, you need to either do [ICODE]document.write(getPropertyNum())[/ICODE] (not recommended) or use the HTML DOM. A few other things: [LIST] … | |
Re: > That's what I have right now, just a gibberish phrase that came out of nowhere and won't go > away: yaba yaba poi gatau. Are you by any chance surrounded by kids who have decided to get back to you? ;-) | |
Re: Something like the below should do the trick: [code] function fuzzy(pwd) { if(!pwd || pwd.constructor == String || pwd.length < 3) return(pwd); var arr = pwd.split(""); return(arr[0] + new Array(arr.length - 1).join('*') + arr[arr.length - 1]); } /* OR */ function fuzzy(pwd) { if(!pwd || pwd.constructor == String || pwd.length … | |
Re: Don't read the file character by character. Always make sure your the I/O operations performed by your program are buffered unless needed otherwise. The less the I/O calls, the better. Instead, read the entire line in a string using BufferedReader / Scanner class and perform the processing. Of the many … | |
Re: > Further, all previouse data needs to be saved, without using the database to store it. Store the data in the user session using the server side language of your choice. > I need to figure out how to make it so that, if the user skips a question This … | |
Re: Though I am not very clear as to what you mean, this snippet should give you a fair idea. If it doesn't, post your code: [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Example</title> </head> <body> <script type="text/javascript"> (function doSomething() { while(true) { … | |
Re: > Otherwise you would have to use the getElementsByName() method to get all the elements > with the name "states". Or simply [icode]document.forms[0].elements["states"].disabled = false;[/icode] which is the correct way of handling form elements. | |
Re: > when I try it in IE7, the countdown starts at 9 seconds no matter what. Works fine for me. Even though the semicolons are optional in Javscript, it's a good practice to explicitly put them to avoid some subtle bugs. A better solution would be to use setInterval. [code] … | |
Re: > var obj = eval("document.list_photo." + objId); Don't use eval. It's like using a powerhouse to light a single bulb. The same thing can be done using [icode]var obj = document.forms['list_photo'].elements[objId[/icode]. The same can be said about the other places you have used eval. Read the [URL="http://www.jibbering.com/faq/faq_notes/form_access.html"]Javascript FAQ[/URL] for more … | |
Re: > Now that has been annoying me and I have been trying to figure out a way to prevent this. Doing so wouldn't be a good idea unless it's absolutely necessary. Sure you can do it, but it won't be worth the kind of computational complexity it introduces. Long gone … | |
Re: MMORPG's FTW! BTW, the poll is broken as Multiplayer / Single Player games are not genres but playing modes. | |
Re: > Internet Exploer does not like this method for some reason Why? What made you reach that conclusion? In fact, my entire snippet for removing the selected option relies on removeChild and it works fine in IE/FF/Opera. Also a few things to keep in mind. [LIST] [*]Post the entire code … | |
Re: Look into [url=http://json.org/js.html]JSON[/url] for shipping data back and forth between your server and Javascript. It has become a de-facto standard like XML for shipping data in a platform / language agnostic manner. | |
Re: > when I open my pages using ip (and not host name) thier javascript functions and events > don't fire. You mean [url]http://xxx.xxx.xxx.xxx:8080/webapp/test.html[/url] over [url]http://hostname:8080/webapp/test.html[/url] ? > can any one help? Use firefox to run your web app and look at the error console. (Tools -> Error Console) | |
Re: The content and links of [URL="http://www.daniweb.com/forums/post513862-4.html"]this [/URL]post are good enough to get you started. | |
Re: > Or should i just create WEB-INF folder. Simply put, your application will be treated as a web application only if it has a WEB-INF (case matters) directory in it's tree structure. From the Servlet Specification: [quote]A special directory exists within the application hierarchy named “WEB-INF”. This directory contains all … | |
Re: Nothing, he was just being his usual self... ;-) Anyways, go to [URL="http://www.au.ioccc.org/years.html#2004"]this site[/URL] and read the hint files which come along with the code to get an understanding of whats going -- though if you are a beginner to intermediate programmer, it would be difficult for you make any … | |
Re: Use the [URL="http://www.walterzorn.com/tooltip/tooltip_e.htm"]wztooltip[/URL] to ease your task. If you don't want to use an external library, study his code and you can easily implement your own minimalistic tooltip framework. | |
Re: > i did uploading a file with using <input type=file> but is it possible to upload file without > using<input type=file> AFAIK, no. | |
Re: IE, of all the browsers out there seems to allow element references to be accessed by their id. This is a short hand notation not supported by any of the browsers out there. You need to make sure there are no such naming conflicts if you don't want your code … | |
Re: > var codeofheight = "<?php echo $codeofheight; ?>"; When enclosed in script tags, this is JS, not PHP. > the opossite of this code Opposite in what sense? | |
Re: > If need to type the contained ArrayLists but those can contain any type you can use > <ArrayList<ArrayList<?>> That way he would neither be able to instantiate nor insert elements into the given list. A better way would be to do something like: [code=java] public class Lists { public … | |
Re: [quote=Grunt;248320][COLOR=black]I totally agree to what [/COLOR][COLOR=black]Jerry Jongerius says: [/COLOR][/quote] I guess everyone has heard about the Promo event :cheesy: (just kidding) For anyone intrested in actually saving time while coding and to know of the best programming practices i actually recommend "The C++ programming languguage" by the inventor of C++. … | |
Re: An embedded database having a small memory footprint would be a much better option considering the host of features you get along with it. Stay away from XML and flat files for the sake of your own sanity. >I'm confused abt SQl cause there are plenty of SQL database out … | |
Re: Some links which might interest you: [URL="http://openjsan.org/"]Javascript archive network[/URL] [URL="http://javascriptlibraries.com/"]List of all Javascript libraries[/URL] |
The End.