Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About spoonraker

  • Rank
  1. You will learn to love the ability to write plain HTML that is conditional on PHP. These examples are all very simple and when you look at them the echo statments don't seem to make the code any different, but imagine on a larger scale.What if you have an entire huge section of page that is only set to display if a PHP variable is true? would you want echo, echo, echo, echo, echo, echo, echo, echo... for a bazillion lines? Or would you rather just have<? if(something){ ?><table><tr><td><font><whatever><blah>....etc<? } ?>
  2. problem solved! thanks for all the input
  3. Ok well it turns out my script works just fine, I'm just getting strange errors with select boxes not having properties and stuff.I'm using this DynamicOptionList javascript function to handle my dynamic lists. http://www.mattkruse.com/javascript/dynamicoptionlist/When I reference a select box that I manually create and add options to, both the getIndexOfValue() and changeSelect() functions work fine, but when I pass it a select box handled by that script, it always tells me that "selectBox has no properties" even though I can see all the options on my screen.
  4. YepSo nobody knows why it's not working and/or has another way to do it?
  5. I have narrowed my problem down to the getIndexOfValue() method.If I just call changeSelection(whatever, 2), it works just fine.Thanks for any help.*update* I noticed in this line for (i = 1; i < selectBox.options.length; i++) { that I forgot the "var" in the for loop, I changed it to for (var i = 1; i < selectBox.options.length; i++) { It still doesn't work.Oh and I get zero javascript errors.
  6. I'll make this simple...this web page I'm working on is incredibly huge and complicated (I'm well over 2,000 lines of Java) and trying to post the "big picture" would just confuse the ###### out of everybody...so here is exactly what I need.I have a select box like so...<select id="filter"><option value="blah">blah</option><option value="bleh">bleh</option><option value="bluh">bluh</option></select>The ONLY data I have to work with is the "value" of the option selected, "blah", "bleh", or "bluh".So how would I use javascript to select the correct
  7. Ok, this is a little complicated so bear with me and try and understand my problem.I have a website with 3 dropdown menus. The first one is a filter, things like name, rank, etc. The second one is an operator for that filter, either =, >, or <. The third one is a list of options for a particular filter, for example if you select rank as the filter you get options like Affiliate, executive, etc.Now... in case you didn't figure this out on your own, the first dropdown is static, and the other two are dynamic based on what you chose in the first. I have absolutely no trouble generating thes
  8. First of all, this is a linux question and not in any way related to Java programming.Now, to answer your question. When you compile something with the -classpath parameter, it's not permanent. As you said, every time you type the command in you will have to type the classpath again. What we use here is "ant" which is a build tool that automates the compiling of the entire directory. Why don't you just use a batch file or something like ant? Even with our huge codebase it only takes at most 20 seconds for a complete compile.
  9. Answer given on another forum, worked great, just thought others might want this info in case they have a similar problem.Steps :1) Create a TreeMap and store values in it.2) Create a List with values from TreeMap.entrySet().3) Implement Comparator interface and apply your camparison constriants.4) Sort the list.So just do as follows:Create 1 class with name : sortValues.javaimport java.util.ArrayList;import java.util.Collections;import java.util.Iterator;import java.util.List;import java.util.TreeMap;public class sortValues{public static void main(String args[]){TreeMap hm= new TreeMap();hm.p
  10. http://www.mattkruse.com/javascript/dynamicoptionlist/
  11. the best thing I can come up with is to create a hashtable which uses a simple ascending integer list as keys, and the ID as the values, then make a vector of the data to be sorted, using the same indexes as the hash table. Copy that vector and sort it, then iterate through the sorted vector and perform a reverse lookup (pull the index) on the non-sorted vector, then use that index to reference the hashtable and finally pull out the SFIID.This will work I'm sure of it, but this can't possibly be that complicated. I know I'm not that first person that has needed to sort a map by the value rathe
  12. Now, I'm not completely stupid, I know how to just straight up sort a list of integers, but this is more complicated.What I need to do, is take a list of IDs (not the integers being sorted), iterate through that list and pull out the number associated with each ID from a MySQL database, sort the numbers, and then output a list of just the IDs, sorted by the number previously pulled out.I had this same problem before, only the data being sorted was a string. So what I did was create a hashtable. I made the String to be sorted (with the ID appended on the end) the key, and I made the ID the val
  13. spoonraker


    If it is homework, I don't mind helping, but I'm not going to just do it for him.A basic idea of what needs to be done :Create a page with the proper formWhen the form is submitted, capture the variables from the request. request.getParameter()Calculate stuff. If you can't do this part without any help, you're in over your head with this project
  • Create New...