...

View Full Version : Method killing execution



cnjcombo
11-01-2004, 12:12 AM
This method is being used to sort selected values into an array from a webpage form, the form and the CGI is working fine. Whenever I use this method to sort the selected values the execution of the program pretty much stopsand I do not know why?

The method gets within the first if statement but whenever it has to jump into a second one thats when it appears to stop executing.

FYI: String array's s1,s2,s3 are instantiated global arrays but I have not declared their length.


public void sortSelects( String g, String v)
{

if ( g.charAt(0)=='1' )
{
if ( v.equals("bold") || v.equals("italics") || v.equals("underline") )
{
s1[0] = v;
System.out.println( v + "of " + g + "inserted into s1");
}
else if ( v.equals("blue") || v.equals("black") || v.equals("green") || v.equals("red") )
{
s1[1] = v;
System.out.println( v + "of " + g + "inserted into s1");
}
else if ( v.equals("right") || v.equals("left") || v.equals("center") )
{
s1[2] = v;
System.out.println( v + "of " + g + "inserted into s1");
}
}
}

vbCode [code] tags are great for retaining the formatting of your code, make sure to use them from now on. :) - antoniohawk (your oh-so-friendly moderator)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum