3,892 Posted Topics

Member Avatar for null_guy

> Usage: java FriendClient <host> <friend_port> This means that the program expects two command line parameters; the host name / address of the person you want to chat with along with the port to which chat application will listen to on his computer. Like it has been already mentioned rightly, …

Member Avatar for null_guy
0
115
Member Avatar for steven woodman

I got one when I joined Daniweb around 2 years back, though I must admit it was more along the lines of the moderator not knowing what an infraction was meant for considering the infraction feature was newly introduced. ;-)

Member Avatar for jbennet
0
237
Member Avatar for jaepi

Maybe something like this: (untested) [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv"Script-Content-Type" content="text/javascript"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Expires" content="0"> <!-- disable caching --> <title>Example</title> <style type="text/css"> span { border: 1px solid black; background-color: #eeffee; cursor: hand; cursor: pointer; } </style> <script type="text/javascript"> // The …

Member Avatar for MidiMagic
0
436
Member Avatar for Lum1n0us

Considering that you are ready to learn, you need to look at some good tutorials posted at [URL="http://java.sun.com/javaee/reference/"]Suns' J2EE site[/URL] which has everything you need to know about JSP's and much more. They also have a sample application which will serve as a good reference. A good book like Head …

Member Avatar for Lum1n0us
0
698
Member Avatar for Thirusha

Like it has been already mentioned, use JSP's only for presenting data and not running your database code or parsing a JSON string; use servlets instead. And as far as parsing JSON using Java is concerned, there are a lot of [URL="http://www.json.org/java/index.html"]JSON/Java bindings [/URL]out there.

Member Avatar for Thirusha
0
95
Member Avatar for KimJack

You can start off by reading about Hashes in general, moving on to reading the Java source for the implementation of HashMap / HashTable and finally attempting to write your own HashMap implementation. This [URL="http://bcs.wiley.com/he-bcs/Books?action=mininav&bcsId=3663&itemId=0470105550&assetId=110292&resourceId=10137&newwindow=true"]sample data structures in Java[/URL] chapter might help.

Member Avatar for ~s.o.s~
0
95
Member Avatar for stealthmode

Considering that you already have a webspace, it's kind of silly to not use a server side language which provides you with absolute control of what you do with the submitted data (process it, validate it, mail it to yourself etc.) Plus a Javascript solution would mandate that the user …

Member Avatar for ~s.o.s~
0
88
Member Avatar for Thirusha

There is no way you can access a Javascript variable set on a page on other pages. Just pass around the JSON object to the server and persist it in the client session if you need it across pages / requests. You can even process the JSON object at the …

Member Avatar for Thirusha
0
102
Member Avatar for Gia

> This is a little function I wrote to verify form fields, all you need is an div with the id "error" to > take the output. A required addition to that script would be checking whether the element really exists and trimming the form values before comparing them with …

Member Avatar for ShawnCplus
0
147
Member Avatar for nofullstop

AFAIK, client side, browser embedded Javascript can't connect to a database. Use a server side language like PHP, Perl etc. for this purpose. Assuming the VBScript here runs on the client machine, the above code will work only on a Windows box and that too when the file Config.udl is …

Member Avatar for ~s.o.s~
0
66
Member Avatar for maydhyam

Maybe the code before the edit and after the edit are no longer same? People tend to make such mistakes and in almost all cases, it turns out to be a silly one. Use the Error Console feature of Firefox to nail the problem.

Member Avatar for ~s.o.s~
0
115
Member Avatar for nireekshan

Don't write database connectivity code in a JSP; that's not what JSP's were meant for. Push all that database logic inside a servlet. Use JSP only as a presentation technology. And BTW, have you hosted your files on the Tomcat server? What is the URL you are using to access …

Member Avatar for mr4top
0
92
Member Avatar for Venom Rush

Relying on Javascript to deliver the business functionality is dangerous to the business which you are trying to cater. If this is some school project, it doesn't matter anyways but if this is for real, you need to start rethinking your design and add a server side check for such …

Member Avatar for nav33n
0
171
Member Avatar for USUAggie

Don't use Scanner to process the input; just use it to read entire lines and process them in a separate function. That way, most of the program complexity would be abstracted in a separate function and if the delimiters or the parsing logic changes in future, all you would need …

Member Avatar for ~s.o.s~
0
126
Member Avatar for tmt000

> What I would like to do next, is to take this modified information, > associate it with a new variable and send it to the database to > replace the old information - this is done after clicking a "save" button. > (Again done with AJAX). However I'm having …

Member Avatar for ~s.o.s~
0
95
Member Avatar for Dani

Looks a bit more sophisticated than the previous one and above all, it's usable, something which Dani was not planning to do at first. ;-)

Member Avatar for MidiMagic
0
894
Member Avatar for Narue

Since the specifications were not accurate, I made some assumptions when it came to exceptions. Being a Java programmer I couldn't resist this humble solution... [code=cplusplus] #include <iostream> #include <string> #include <sstream> #include <stdexcept> using namespace std; unsigned long extract_digits (unsigned long x, size_t n, size_t i) { stringstream ss; …

Member Avatar for ivailosp
1
680
Member Avatar for ghostsquad

You can pass variable number of arguments to your function and expect it to dynamically handle them in a variety of ways. One of them would be to use the arguments property of Javascript Function object to grab hold of what was passed to your function at run-time. [code] [...] …

Member Avatar for ~s.o.s~
0
152
Member Avatar for dkwantee

Yes, one such way would be to remove the same value from the second drop down so that the user never gets to select it. Another way would be to attach a 'onchange' listener to the second drop down which disallows the selection of a value present in the first …

Member Avatar for ~s.o.s~
0
49
Member Avatar for eeeman
Member Avatar for The Dude

Wait... do I see The Dude holding a knife in his hand, bloodshot eyes and "I am gonna kill Iamthwee" written all over his face :D

Member Avatar for The Dude
0
113
Member Avatar for majestic0110

[LIST] [*]Looking after my family [*]Anime [*]Sleeping [*]Staring at the sky/ceiling [*]Punching holes in happiness [/LIST]

Member Avatar for jbennet
0
164
Member Avatar for kv79

> FIRST : Can I call ID from the other files who contain J.S. code with ID ? As long as the page which includes the script has an element with the given ID and the function using that ID is called after the entire page has been loaded. > …

Member Avatar for ~s.o.s~
0
100
Member Avatar for Traicey

Develop using Firefox. You can use a nifty feature of Firefox called the Error Console which shows you all the Javascript errors on your page (if you have any).

Member Avatar for Traicey
0
131
Member Avatar for linux

This greed is what keeps most of the forums out there alive so cribbing is kind of pointless. This world works on a 'give and take' principle.

Member Avatar for MidiMagic
0
133
Member Avatar for knight fyre
Member Avatar for knight fyre
0
127
Member Avatar for vijukumar
Member Avatar for kavithakesav
0
80
Member Avatar for RicardoDiaz

Jonhlennon312, considering that this is an international forum reaching out to help one and all, we would really appreciate if you posted in English so that everyone can benefit from your post.

Member Avatar for ~s.o.s~
0
342
Member Avatar for Estella

> what require if someone want to be a team colleague, featured poster,moderator, etc ?? Don't think a lot about it. If you are good enough, these things will anyways come to you sooner or later. Just keep helping out people and above all, have fun. :-)

Member Avatar for Jx_Man
0
159
Member Avatar for majestic0110

> I think we need more focus on the content and less on silly rating and ranking systems for > the members who post it. Believe it or not, there are people out there who actually feel like helping others if they get something in return; and things like post …

Member Avatar for majestic0110
0
117
Member Avatar for shweta797

Plus consider using [URL="http://commons.apache.org/fileupload/"]Apache Commons File Upload[/URL] package rather than doing it yourself given the kind of nifty functionality it offers.

Member Avatar for ~s.o.s~
0
131
Member Avatar for nireekshan
Re: jsp

> I want to use database MS-Access, how to connect the jsp to Ms-access, plse send code Asking for code without putting in any effort is against the forum rules. Plus avoid cross-posting. You already have got replies in you other thread. This thread is now closed.

Member Avatar for ~s.o.s~
0
127
Member Avatar for macslayer

> another odd thing, is that I do not see the form in the source when viewed by the client > browser, is this just a fact of life for dhtml Yes, because it's the Javascript object XMLHttpRequest provided by the browser at work when fetching content using Ajax. AFAIK, …

Member Avatar for Suomedia
0
357
Member Avatar for Sulley's Boo

Many many happy returns of the day my "underpaid hacker" friend... :D

Member Avatar for jbennet
0
148
Member Avatar for mattyd

Never used IE, always use FF. Personally what I feel is that IE sucks...(atleast IE6). Hell, even Avant Browser is better than IE.

Member Avatar for GrimJack
0
373
Member Avatar for Thirusha

Yes, submit the form to a servlet, perform the processing and redirect to a page whose output you would like to have in responseText attribute of the XMLHttpRequest object.

Member Avatar for ~s.o.s~
-1
84
Member Avatar for bumsfeld

Something one can wear on his hand and use it to rip out someones' intestines.

Member Avatar for bumsfeld
0
85
Member Avatar for IT Girl
Member Avatar for mccloud

Yes, start off with the excellent J2EE 1.5 tutorials available on java.sun.com which guides you through building a sample web application or get a good J2EE book and start reading.

Member Avatar for electron33
0
904
Member Avatar for euniceee

AFAIK, JFreechart can also be used to create dynamic on the fly charts. Read the documentation and the tutorials floating around the web and it shouldn't be that difficult.

Member Avatar for lookof2day
0
213
Member Avatar for JerryShaw

Please let us again not go path of discussing why and how ads are evil; this topic has been brought up and beaten to death time and time again. Maybe it's time to mark this thread as solved...

Member Avatar for Dani
0
175
Member Avatar for Ankita B

There are different ways of persisting data across multiple requests; session object being one of them. You can save the create a bean class for all logically related data and store its instance in the HttpSession. Another way would be to use hidden form fields to pass values to and …

Member Avatar for Ankita B
0
301
Member Avatar for mowen85

Have you tried outputting the value in your servlet to see what it is receiving? Form values are submitted as they are; the job of encoding and decoding is automatically performed by your browser unless you are manually submitting the form using Javascript. Also AFAIK, no database performs automatic conversion …

Member Avatar for ~s.o.s~
0
268
Member Avatar for Parsu7

> Is it necessary to declare an inner class private? No. [URL="http://java.sun.com/docs/books/tutorial/java/javaOO/innerclasses.html"]Here[/URL] is some information which you would find useful when learning about Inner Classes. EDIT: Too slow.

Member Avatar for jwenting
0
139
Member Avatar for sneekula

[QUOTE=scru;495582]Are you going to take Josh's place as grammar police? Fine. Just be aware that I don't like that dude, and will probably take it out on you.[/QUOTE] ...and you make sure you read the rules of this site before posting here. L33t speak along with threatening members with malicious …

Member Avatar for reddawg
0
1K
Member Avatar for Dani

> I'm incredibly confused by what you just said but I'll take your word for it that if I read all of > these tutorials that, by the end, I'll have a much clearer understanding You shouldn't be; the basics as well the pretty advanced stuff remains more or less …

Member Avatar for ~s.o.s~
0
110
Member Avatar for 3265002918

Where have you declared 'slopetop', 'slopebottom' and 'slopefinal'? And document.write() is evaluated as the page is being rendered. Plus Javascript is a client side technology; as soon as a page is submitted, what you get is a new page and the state maintained in Javascript variables is reset. You need …

Member Avatar for ~s.o.s~
0
99
Member Avatar for madhusamala

The action attribute of your FORM tag should point to the servlet which would be doing all the processing. The servlet path can be obtained from the web.xml and is the same as the url-pattern for that servlet. In your case it should be [icode]<form action="results">[/icode].

Member Avatar for ~s.o.s~
0
155
Member Avatar for Techboy52

There are no try...catch blocks around that switch statement of yours considering that any parseXXX method is very much capable of throwing a NumberFormatException. Plus writing parseInt(xxx) or parseDouble(xxx) in every switch case seems kind of redundant. Also a status code of '0' denotes success so your System.exit(0) should be …

Member Avatar for ~s.o.s~
0
618
Member Avatar for Ankita B

If you are talking about getting the values of a drop down list at the server side, it can be done by doing [icode]request.getParameter("nameOfSelectBox");[/icode] A better way of displaying the user list will be render it as table with the user id hyperlinked which would then take the user to …

Member Avatar for ~s.o.s~
0
78

The End.