~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> for some reason the file doesn't start with a eof character does it?

EOF isn't a character, this is one of the reasons why the read method in Java and the getchar / fgetc function in C returns an int instead of a char [hint: since char is unsigned, there would be no way of differentiating between a valid character and an EOF being reached]. An EOF is signaled when no more bytes could be read from the underlying stream / file. EOFException , -1 and null are some of the ways used to signal an EOF in Java.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Trial and error has little place in programming; get a good book or a solid online reference (MSDN or Mozilla tutorials) and learn more about Ajax.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> I'm using ajax and can't use post method!!

Technically, you *can* use the POST method when using Ajax, there is nothing which prevents you from doing so; whether it pertains to your application/business is another question.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You have two options:
- Either come up with intelligent URL rewriting rules so that situation as mentioned above can be effortlessly handled. I am sure it can be, it just requires a bit of tact with regular expressions, that's all.
- Use the POST method when making asynchronous calls; this isn't as such recommended if you are trying to get some query results.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> here it is impossible to add variables to the url and success

Why is it impossible?

What prevents you from creating a URL of the form http://somesite.net/en/page?name=somename&age=someage ?

Anyways, if the operation involves POSTing data rather than GETting it, consider using POST requests rather than GET ones when making asynchronous calls.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> use a for loop for a known size

Not necessary; while loops can be completely avoided. A `for' loop can easily replace a `while' and `do while' looping constructs.

// while equivalent
String line = null;
for( ; (line = reader.readLine()) != null; ) {
  // process the line read
}

// do..while equivalent
boolean keepGoing = true;
for( ; keepGoing; ) {
  // do some processing
  if(reply.equals("quit")) {
    keepGoing = false;
  }
}

@carlcarman: Consider using code tags the next time you post code snippets.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> The code fails if the url does not end in a filename. So if I were to input:

You have a URL and it points to a resource; filename or not, it doesn't matter. There are multiple representations of exposing the same resource. The different representations don't matter as long as they expose the required resource; http://www.google.com/ or http://www.google.com/pages/index.html or http://www.google.com/index.html doesn't matter as long as I get the resource `index.html'.

> h t t ps://w w w.sportsbet.com.au/results/racing/Date/today

Hint: Secure resources require authentication information be supplied before you access them.

> The code fails if the url does not end in a filename.

Fails in what sense? Don't you get a response or are you unable to come up with a file name? If it is the latter, you need to come up with a better design than mapping remote resources to file names. If your final motive is scraping data from a web page, dump the file name convention and either directly process the HTTP response or come up with a better naming scheme.

> The problem you are running into is with indexing urls that are "urlrewrite"

That isn't a problem, it's just a way of exposing meaningful representations to the client. It's a technique widely used to create user and search engine friendly URL's. Plus it is the responsibility of the server to process the URL in a way previously configured …

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Post the formal problem definition as mentioned in your assignment and we might just help you with a pseudo code / class design.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You try to display something which you don't even process after declaring i.e. the local array `arr' declared in main(); hence the given result. Either pass the local variable `arr' to your class instances or write a display method which works on class members i.e. `arr' of Class1.

But come to think of it; this is possibly the one of the most ill designed class hierarchy I have ever seen; the naming conventions not being followed is yet another woe. Consider reading on some good material as mentioned in the Java forum sticky.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> I would really appreciate it if anyone could help me as i understand most of the concepts of
> java

Are you sure? The line while (operationS != 'q') && (operationS != 'Q'); is choke full of syntactic errors. Make sure you concentrate on understanding the concepts rather than just making your homework assignment *work*.

And searching the web for the problem you are facing gives you enough information to solve it yourself.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Unless you post a *complete* working code, there is no way we can *see* what's wrong on your code. If not that, then present a SSCE which explains your situation. Either that or use an IDE like Eclipse to help you in debugging your application.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>The problem is, I am not the author of the original and as such have not clue as to what
> methods the classes have and in which class.

Then how do you propose on adding additional functionality as mentioned in your first post?

Ezzaral commented: That's exactly what I was wondering. +13
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Don't create multiple threads for the same problem if you don't intend on reading the replies given in your previous threads. In this thread, you were given a thorough explanation of how arrays work; if you still don't get it then maybe this assignment is too tough for you.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> do you and narue code for a living?

Me, yes; can't say the same about Narue-chan, though the last time I heard of her, she definitely did code for a living. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I guess the same is with `IT Professionals'. ;-)

I still wonder how many of the regular posters here code for a living; but maybe that's a question which demands its own thread.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Your HTML document is not valid; it lacks a DOCTYPE. Also your question isn't very clear here. What kind of an help do you need since except for a few problems it pretty much looks OK. As for the formula, you would be the best person to come up with it. Here is a cleaner valid version of the same code. Just plug-in your formula calculation part and it should go well.

<!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>Grade Calc</title>
    <meta name="generator" content="Vim">
    <meta name="author" content="sos">
    <script type="text/javascript">
      function getLetterGrade(totalGrade) {
        var letterGrade = "F";
        if (totalGrade >= 90)
          letterGrade = "A";
        else if (totalGrade < 90 && totalGrade >= 80)
          letterGrade = "B";
        else if (totalGrade < 80 && totalGrade >= 70)
          letterGrade = "C";
        else if (totalGrade < 70 && totalGrade >= 60)
          letterGrade = "D";
        return(letterGrade);
      }

      function gradeCalc() {
        var gradeOut = "";

        var gradecp = document.gradeform.cp1.value;
        var gradecp2 = document.gradeform.cp2.value;
        var gradecp3 = document.gradeform.cp3.value;
        var gradecp4 = document.gradeform.cp4.value;
        var gradecp5 = document.gradeform.cp5.value;
        var gradecp6 = document.gradeform.cp6.value;
        var gradecp7 = document.gradeform.cp7.value;
        var gradeLabs = document.gradeform.labs1.value;
        var gradeLabs2 = document.gradeform.labs2.value;
        var gradeLabs3 = document.gradeform.labs3.value;
        var gradeLabs4 = document.gradeform.labs4.value;
        var gradeLabs5 = document.gradeform.labs5.value;
        var gradeLabs6 = document.gradeform.labs6.value;
        var gradetests = document.gradeform.tests1.value;
        var gradetests2 = document.gradeform.tests2.value;
        var gradeFinal = document.gradeform.final.value;
        var gradeEC = document.gradeform.ec.value;

        var totalGrade = 56 /* some formula */;

        var cp = 'some cp', lab = 'some-lab',
            exams = 'some-exams', credit = 'some-credit'

              gradeOut = "...adding …
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Read the above post; if it's still unclear, it's time for you to go back to your class notes / tutorials.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Post a compilable piece of code; what you posted isn't even remotely a valid Java program.

In Java, multi-dimensional arrays are represented as array of array. This allows you to ignore the second dimension when defining a two dimensional array. Generically speaking, this concept allows you to ignore all the dimensions except the first one. Also in case of a two dimensional array, the first slot of your array will hold a reference to another array and so on.

A simple example:

public class ArrayTest {

  public static void main(final String[] args) {
    arrayTest();
  }

  private static void arrayTest() {

    int[][] arrTwo = new int[3][];
    for(int i = arrTwo.length - 1; i >= 0; --i) {
      // arrTwo[i] is null since we ignored the second dimension
      // when declaring arrTwo
      System.out.println("arrTwo[" + i + "] -> " + arrTwo[i]);
    }
    System.out.println("\n\n");

    // When an array is defined, its slots hold the default value for the
    // type for which it is defined. Hence in case of an int array it
    // would be 0 while in the case of a String array it would be `null'.
    
    int[][] arrOne = new int[3][3];
    for(int i = arrOne.length - 1; i >= 0; --i) {
      // arrOne[i] is an array having length 3
      int[] tmp = arrOne[i];
      System.out.println("arrOne[" + i + "] -> " + tmp);
      for(int j = tmp.length - 1; j >= 0; --j) {
        System.out.println("arrOne[" + i + "][" + j + "] -> " + tmp[j]); …
jasimp commented: nice example +9
javaAddict commented: good explanation +4
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Bad terminology yet again.

> Yes, I am very sorry for mixing static fields and members.

Members of a class include fields, methods and nested classes and interfaces. So the statement, *mixing static fields and members* doesn't make much sense.

> Fields execute once and only once when the first object of the type is created

Fields don't *execute*, they are initialized. Static fields are initialized when the class is first loaded / initialized.

> otherwise if a program executed all static fields of all objects at compile time it would not
> be a very good thing X_X

At compile time, the `compile time constant expressions' are evaluated irrespective of whether the LHS is a static field or not. The Java Language Specification has rules laid down for what exactly are `compile time constant expressions'.

public class Test {

  private static double d = Math.PI;  // compile time constant expression

  private static Test me = new Test(); // not a compile time constant expression

}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You should have posted the entire scenario in the first post instead of posting in parts. You must have messed up with the java.policy because of which you are getting a null SecurityManager from the System. Either restore the file from a backup or re-install the JDK to fix this problem.

If you want to create your own security policy, either override the SecurityManager class to roll in your own implementation or create your own customized java.policy file for your application. Google for these topics and look at the FAQ topic at the top of this forum.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

A lot of complicated terminology being thrown around here but a few points:

> A static member of a class is a shared location in memory between objects of that class.

Don't mix concepts and implementation details when explaining. From the JLS:

If a field is declared static, there exists exactly one incarnation of the field, no matter how many instances (possibly zero) of the class may eventually be created. A static field, sometimes called a class variable, is incarnated when the class is initialized

> static values are resolved at compile time, before objects are created.

A compile time constant expression when assigned to a static field[or not] is evaluated at compile time; a static field is incarnated when the class is initialized. There is no *static value*.

> Notice that in main of a different class file, I didn't need to create an object of MyClass in
> order to access sharedInt - the address of the reference-variable sharedInt is resolved at
> Compile Time and all MyClass objects have access to it.

`sharedInt' is a variable of Primitive Type and not Reference Type.

> If q is not a static member, then although each C class object has q, they have their own
> individual address for their reference variable and therefore

Each instance created has its own set of the state/member variables. There is no *individual address for their reference variables*.

> to access q …

Alex Edwards commented: Thanks for pointing that out @_@ +4
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You need to provide a default constructor for the `Circle' class. Also, since `main' method is `static', you can't access instance variables inside it. It wouldn't make sense to access something which pertains to the state of a `Circle' inside a method which can be invoked without a `Circle' instance. Also consider using Math.PI instead of rolling in your own unless you have a good reason to do so.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> And it worked. Although the file saved in my file system has extension .gif ??

The file name doesn't matter; its content does. I could have very well named it 'image.exe' and it still wouldn't have mattered. Maybe you overlooked the declaration File saveFile = new File("SemiTransparentSquare.gif"); in which the file name is pretty much a constant.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Consider using code tags to post your code next time. Read the FAQ's.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> Please suggest me a solution to solve this problem.

A simple google search would have solved it for you; please consider searching the web/forum archives before posting a query. Anyways, read this and this.

> If there is any other way to handle this scenario please suggest me the better way.

Two ways come to mind: Either use the executeBatch functionality provided by the JDBC API or push those five queries into a stored procedure which, when blows up brings down the entire transaction.

> And you're real problem, at least IMHO, is using the JDBC-ODBC in Tomcat.

I don't think he is using a bridge type driver given the package name com.microsoft.jdbc.* and [Microsoft][SQLServer 2000 Driver for JDBC] .

> The bridge is not threaded and Servlets/JSPs are.

I really don't see how this is different from the way threading is handled in Java I/O classes which do make native calls; the threading is most probably handled in the Java implementation of JdbcOdbc. Some real problems with ODBC implementations are invoking third party native code, installation required on the client machine, debugging nightmares etc. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> I am not sure, why the method is returning null! Any idea?

Strange. AFAIK, System.getSecurityManager returns null when there is no SecurityManager for that given application i.e. no security context exists.

BTW, which version of Java are you using? Which OS? Does it have multiple user accounts? When booting up your OS are you asked to authenticate yourself?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> is throwing Exception (not SecurityException). Hence, something is going wrong with the
> code.

Then you need to let us know which exception is that along with the *complete* stack trace as it is since it is kind of difficult to reproduce the exact environment/settings you have at your place.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> Am I Missing any thing here? Any suggestions are appreciated.

The fix suggested by Masijade should work out for you; but just for the record, the way you are using SecurityManager in your code doesn't seem to be right.

The security manager needs to be aware of the environment / context to which it needs to apply security checks. By calling the SecurityManager constructor, you just create a new SecurityManager instance, not a security manager which is context aware. Use the System.getSecurityManager() to grab an instance of environment aware SecurityManager.

// unstested
import java.io.File;

public class SecurityTest {

  public static void main(final String args[]) {
    doSecurityTest();
  }

  private static void doSecurityTest() {
    SecurityManager sm = System.getSecurityManager();
    File roots[] = File.listRoots();
    for(int i = roots.length - 1; i >= 0; --i) {
      String root = roots[i].toString();
      try {
        sm.checkRead(root);
        System.out.println("I have read access to " + root);
      } catch(SecurityException se) {
        System.out.println("I don't have read access to " + root);
      }      
    }
  }

}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> Is there a better way? There are actually many more than three subclasses that need the
> special handling, so that's a long if-else if-else statement.

Just create an interface Collidable which exposes a contract of the form Outcome collide(Collidable c) . Make classes implement this interface and implement the logic accordingly, which, based on the source and target colliding objects would determine the outcome of the collision. No need for any run-time type checks, the run-time method invocation based on the actual object in consideration will be automatically taken care of.

> You could use a State Machine, or State Pattern based on how many times an object has been
> encountered, or the State of an object can depend on the type of object it encounters...

KISS ;-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> ok so if i mark this as solved , will this be enough for you to stop?

If you feel you have got your answer, please do so.

One of the tricks I normally suggest to people looking for project ideas is to head over to some open source project repository [sourceforge, freshmeat] and browse projects of any alternative language you would be interested in learning or have worked with in the past. Porting projects is more fun that you can imagine and you end up with having a copy of the source code just in case you are stuck with the implementation.

Another trick would be to observe the things around you which you use on a daily basis. Ever used Eclipses' code formatting, how about creating one for Java. Don't like your download manager, how about creating your own customized one?

I am pretty sure that with these you might never need to ask anyone about project ideas anymore.

On a final note, please remember that when you post a thread, the people replying to it invest their valuable time when trying to help you out. Your replies might just make the difference in having a healthy debate and a flame war.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I guess this is because your last two Readers end up using the same underlying stream to read from the source; here file . Because of this, when the third BufferedReader finishes, the end of stream has already being reached for the file and further reading obviously returns null .

Either create a new instance of the FileInputStream for each Reader or reset the stream marker as soon as you are done reading once.

A few observations though:
• You need not make Readers/Writers instance variables since they logically don't form the `state' of your SpellChecker; plus its always better to declare variables at the point of use and persisting BuferedReader serves no purpose here. The same is the case with `i' and `j'; they form a part of your implementation and need not be made instance variables.
• Creating a File instance the way you have done is also *bad*.
• Your code does not close all the open resources.
• Even though this looks like a prototype, try to organize your thoughts and implementation rather than dumping them together.
• When pasting code, make sure you convert tabs to spaces since the rendering of tags is not consistent across implementations. [your editor might render a tab as 2 spaces while this message board might use 8 spaces].

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Are you sure you are saving the user preferences i.e. the position of the dragged images, the newly manipulated size etc.? Does this card making activity involve making multiple HTTP requests to the sever or is it a client side activity i.e. no page reloads? If yes, then you can save the user preferences in Javascript variables and use the same settings when displaying the finished product. If you are making multiple requests, storing the preferences in the server session or in cookies would be more like it.

Since you are already done with the product, saving the image/text locations and their new dimensions shouldn't be that tough.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

IMO, the thread being on the first page has got nothing to do with its solved status; it depends on time the threads were `touched'. And BTW, the thread still isn't marked as solved by any moderator because there were no follow ups from the Original Poster[OP].

Members can contribute to the forum when solved threads are concerned. If you feel that a thread has been solved, you can report the same by using the `Flag Bad Post' link so it can be marked as solved by the moderator in case the OP is unaware of the `Mark As Solved' feature or forgets about it.

Danarchy commented: Gave me some new knowledge and pointed out my error. +5
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Declare a variable 'test' outside the loop and inside the loop append the value of the selected option along with a '|' to `test'. Try it. Did you get the desired result? If no, then why? What seems to be missing here? What do you think needs to be done to make it work the way you expect?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Haven't you received enough replies here? Please refrain from double posting or at least let us know you have posted somewhere else so that multiple people don't end up wasting their time for coming up with the solution of a same problem.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> Anyway ... for educational purposes it's good to know, where IE stores reference to this
> Button1

Not sure if I understand this correctly, but there is no reference stored, only the default action executed when the RETURN key is pressed inside the INPUT field which is submitting the form. Same happens when you have a text field along with a SUBMIT button.

>I try to fit my current working W3C standards project to IE standards.

Tough luck I guess. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yes, there does seem to be some weird mumbo jumbo going on there. It seems that pressing the RETURN key causes the button to be pressed and hence the x=0&y=0 values in the querystring. One solution I can think here is to enclose the entire thing in a FORM tag (the way it actually should be; form elements like text fields ought to go inside a FORM tag). This makes sure you don't fire off fake onclick when a return key is pressed in the text field.

I guess a better solution here would be to try to approach the problem from a different perspective and to use normal IMG tags with an onclick attribute rather than using an INPUT tag with type image . Maybe using some simple Javascript library like DOM assist for dynamically adding elements and event handling would simplify your task a lot.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Why are you encoding textual data? Base64 is primarily meant to encode binary data.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

This sure is a weird problem; without looking at the code, it would be kind of difficult to arrive at a solution. BTW, how are you attaching event listeners to your components? Are you using attachEvent / addEventListener or the plain old way of attaching events?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

1. People seem to think that there is a cold war going on between Adobe's Flash, Microsoft's Silverlight, and JavaScript. With all the new JavaScript Libraries coming out like DOJO, JQuery, Mootools and others; JavaScript is becoming pretty powerful and animations are becoming easier. So my first question is.. How come there are not any JavaScript animation Studios? Like Flash and Silverlight.

Not sure what exactly you mean by Javascript *studios* but there are many noticeable differences between Javascript and Flash. Flash is an entire development platform in the sense that it comes packaged with a language to drive the processing (Actionscript) along with the nice ability to drag and drop and many other niceties. Javascript is just a programming language and creating complex animations requires a good mathematical know how and is definitely more difficult, time consuming when compared to Javascript. Now think about it, if you were asked to create a simple user driven animation on a web page, which would be your first choice?

2. Is it JavaScript that is displayed differently in every browser? or is it the CSS? because when I play with JQuery, certain animations will look different depending on which browser I'm using. I have Google Chrome, IE6, and FireFox.

Different browsers have different rendering engines, for e.g. Firefox uses Gecko, Chrome uses Webkit etc. Hence if a same piece of code looks different of different browsers, it is because of the difference in rendering capabilities, Javascript has got nothing to …

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Note to all: For *gawd's* sake, live and let live. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Thought it would be easier if we all chipped in and helped you out but it would beat the actual purpose of learning things.

If you are still in the stages of developing your programs in a text editor, litter your program with log statements at appropriate places and find the point wherein the program starts behaving in an unexpected manner. If using an IDE like Eclipse, debug your application and inspect the variables at run time. Guesswork should not be the approach here...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Take a look at the generated source code, try to analyze it and you would know the answer to all your questions.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

i don't understand how byte stream could read images. does it need help of applets or else.

Since you seem to be thoroughly confused here, I will just post a minimalistic non-working snippet and allow you to fill the gaps. Anything more and I might be forced to give up my Moderator title for breaking the rules. :-)

try {
      URL url = new URL(SAMPLE_URL);
      // 'in' and 'out' declaration goes here
      try {
        byte buf[] = new byte[4 * 1024];  // 4kb buffer
        int read = -1;
        in = url.openStream();
        // create a new File 'f' which the output stream will write to.
        // Create it at a location of your choice with name as that of the image
        out = new FileOutputStream(f);
        while((read = in.read(buf)) != -1) {
          out.write(buf, 0, read);
        }
        out.flush();
      } finally {
        if(in != null)  in.close();
        if(out != null) out.close();
      }
    } catch(IOException ioe) {
      ioe.printStackTrace();
    }
Alex Edwards commented: =P +3
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Though this approach leads to compact code, it's not really necessary since it performs a lot of voodoo like image encoding under the hood. Plus, you can be rest assured that the ImageIO approach will always be slower than pulling raw bytes over the wire and directly writing them to disk.

If performance is not a concern, the ImageIO approach seems good enough.

sciwizeh commented: true engough +1
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It simply means that an element with an ID having the value contained in the variable 'f' at that point in time doesn't exist. Try alerting the value of 'f' inside the loop and search for an element with that ID in your markup. Like I said in my previous post, the way you are generating your markup holds the key to the problem.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Instead of specifying an URI to a HTML page, specify a image URL, something like http://www.google.co.in/logos/closing_ceremonies.gif ; use a byte oriented stream for reading data instead of using a text oriented one like BufferedReader.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

What does the Firefox Error Console say? Post a complete snippet which doesn't work so that we can try it in our browsers rather than posting chunks.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Are you sure you want to dynamically generate those fields? If you run your code in Firefox, what do you see in the Error Console? Post a non-working example of what actually you intend to do.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Without any exception messages / stack traces or logs it would be difficult for us to help you out.