Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2008
    Posts
    3
    Rep Power
    0

    Default String and Arry Problem

    I am new very new to Java. I am trying to get the data from form and to email. Its Ok when there is a string but when array cames it became very difficuit for me to merge with string and mail it. Please check my following code

    Thanks & best regards

    Java Code:
    String phone=req.getParameter("phone2");
    String country=req.getParameter("country");
    String[] btype=req.getParameterValues("btype");
    
    msg1="<table border=0 cellpadding=4 align=center cellspacing=5 width=500>"+
         "<tr><td class=khan><font color=red>Country</font></td><td class=khan>"+country+"</td></tr>"+
         "<tr bgcolor=#EEEEEE><td class=khan><font color=red>Phone</font></td><td class=khan>"+phone+"</td></tr>";
    
    	msg2="<tr><td class=khan><font color=red>Business Type</font></td><td class=khan>";
    
    		for(i=0;i<btype.length;i++){
    			if(!btype[i].equals("")){
    			btype[i]
    			}
    		}
    
    	msg3="</td></tr>";
    
    mailmsg=msg1+msg2+msg3;

  2. #2
    DonCash's Avatar
    DonCash is offline Moderator
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    240
    Rep Power
    8

    Default

    This is JavaScript.. Not Java.
    Did this post help you? Please me! :cool:

  3. #3
    Join Date
    Mar 2008
    Posts
    3
    Rep Power
    0

    Default

    I am not seeing any post which one?

  4. #4
    DonCash's Avatar
    DonCash is offline Moderator
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    240
    Rep Power
    8

Similar Threads

  1. Problem with String Building
    By Albert in forum New To Java
    Replies: 2
    Last Post: 04-30-2012, 12:49 AM
  2. problem with using string in if condition
    By sireesha in forum New To Java
    Replies: 2
    Last Post: 11-20-2007, 10:40 PM
  3. Replies: 0
    Last Post: 11-20-2007, 04:59 PM
  4. Replies: 1
    Last Post: 08-07-2007, 07:29 AM
  5. Replies: 1
    Last Post: 08-03-2007, 10:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •