Win a copy of Spring Boot in Practice this week in the Spring forum!

sushant prabhu

Ranch Hand
+ Follow
since Mar 22, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sushant prabhu

Could some one post an example or give links where i can find examples showing loadbalancing in RMI
19 years ago
Hi
How can I acheive load balancing in rmi . Say i have 2 rmi server objects on 2 computers.
What i want is the client will connect to one of the server objects depending on the number of clients each of them is handling.

Regards
Sushant
19 years ago
Hi
new to JNLP & webstart .
could you guys refer a primer book or any link on the net for starting with JNLP & Webstart
19 years ago
Hi
what is the difference between an ide like JEditor,Kawa and editor like Editplus
Bye
Hi
Tell me if this is possible. Instead of creating a dsn using control panel - system - odbc
. Is it possible to create a dsn from within my java program. i dont want to create a dsn before my java program runs but from within my program

Bye
Sushant
Hi Maulin
Thanks for the reply.
regarding browser i m using ie6.0
in a field i have 2 validations to check
say 1 is a date check & another is a null value check & the user proceeds to the next field without entering in the first field then i keep getting alert boxes saying date error & null value error & i just cant do anything not even close the browser window. the only option left is to press ctrl + alt + del .
How do i overcome this drawback.
i am pasting my code here :
<html>
<head>
<script language="javascript">
function checknull(zulu)
{
if (zulu.value== "") //** Replace 'txt1' by the name of your TextBox
{
alert("This Field Cannot Be Null !!! ");
zulu.focus();
zulu.value= "";
}
}
// ********************************************************************************
function checknumber(zulu)
{
if (zulu.value != "") //** Replace 'txt2' by the name of your TextBox
{
if (isNaN(zulu.value)== true)
{
alert("Invalid Number !!!");
zulu.focus();
zulu.value="";
}
}
}
// ********************************************************************************
function checkdate(zulu)
{
var str;
var day, month, year, s1, s2;
var mod;
str= zulu.value;
day= str.substr(0,2);
month= str.substr(3,3);
year= str.substr(7,4);
s1= str.substr(2,1);
s2= str.substr(6,1);
mod= (year % 4);
//alert(s2);
if (zulu.value== "") //** Replace 'txt3' by the name of your TextBox
{
alert("Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if (isNaN(day)== true)
{
alert("Invalid Day1 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( (day.length) != 2 )
{
alert("Invalid Day2 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( ((day.length) == 2) && (day < 0 || day > 31) )
{
alert("Invalid Day3 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if (s1 != "-")
{
alert("Invalid Seperator1 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if (isNaN(month) == false)
{
alert("Invalid Month1 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( (isNaN(month) == true) && (month.length != 3) )
{
alert("Invalid Month2 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( (isNaN(month) == true) && (month.length == 3) && ((month != 'jan') && (month != 'feb') && (month != 'mar') && (month != 'apr') && (month != 'may') && (month != 'jun') && (month != 'jul') && (month != 'aug') && (month != 'sep') && (month != 'oct') && (month != 'nov') && (month != 'dec') && (month != 'JAN') && (month != 'FEB') && (month != 'MAR') && (month != 'APR') && (month != 'MAY') && (month != 'JUN') && (month != 'JUL') && (month != 'AUG') && (month != 'SEP') && (month != 'OCT') && (month != 'NOV') && (month != 'DEC') && (month !='Jan') && (month != 'Feb') && (month != 'Mar') && (month != 'Apr') && (month != 'May') && (month != 'Jun') && (month != 'Jul') && (month != 'Aug') && (month != 'Sep') && (month != 'Oct') && (month != 'Nov') && (month != 'Dec')) )
{
//alert(month.length);
alert("Invalid Month3 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( (day > 30) && ( (month= "apr") || (month= "APR") || (month= "Apr") || (month= "jun") || (month= "JUN") || (month= "Jun") || (month= "sep") || (month= "SEP") || (month= "Sep") ||(month= "nov") || (month= "NOV") || (month= "Nov")) )
{
alert("Invalid Date /n Day Cannot be Greater than 30 for the Month of " + month + " !!! /n Enter Date as DD-MMM-YYYY ");
}
else if (s2 != "-")
{
alert("Invalid Seperator2 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( isNaN(year) == true )
{
alert("Invalid Year !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( isNaN(year)== false && (year.length != 4 ) )
{
alert("Invalid Year !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( (isNaN(year)== false) && (year.length = 4 ) && ((year % 4)== 0) && ((month= "feb") || (month= "FEB")) && (day > 28) )
{
alert("Invalid Date /n Day Cannot be Greater than 28 for the Month of " + month + " in Leap Year !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( (isNaN(year)== false) && (year.length = 4 ) && ((year % 4) != 0) && ((month= "feb") || (month= "FEB")) && (day > 29) )
{
alert("Invalid Date /n Day Cannot be Greater than 29 for the Month of " + month + " !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
}
// ********************************************************************************
</script>
</head>
<body>
<form name="f1">
<table align="center" border="1" width="100%" cellspacing="1" cellpadding="1" bordercolor="black">
<tr>
<td>Null Validation:</td>
<td><input type="text" name="txt1" onblur="javascript:checknull(this);checknumber(this);" title="Null Not Allowed Here"></td>
</tr>
<tr>
<td>Number Validation:</td>
<td><input type="text" name="txt2" onblur="javascript:checknumber(this);" title="Only Numbers Allowed Here"></td>
</tr>
<tr>
<td>Date Validation:</td>
<td><input type="text" name="txt3" maxlength="11" onblur="javascript:checknull(this);checkdate(this);" title="Enter Date as: DD-MMM-YYYY"></td>
</tr>
</table>
</form>
</body>
</html>
Hi Eric
Thanks for the solution . It works fine.
But now i am facing another problem say in a field i have 2 validations to check
say 1 is a date check & another is a null value check & the user proceeds to the next field without entering in the first field then i keep getting alert boxes saying date error & null value error & i just cant do anything not even close the browser window. the only option left is to press ctrl + alt + del .
How do i overcome this drawback.
i am pasting my code here :
<html>
<head>
<script language="javascript">

function checknull(zulu)
{
if (zulu.value== "")//** Replace 'txt1' by the name of your TextBox
{
alert("This Field Cannot Be Null !!! ");
zulu.focus();
zulu.value= "";
}
}

// ********************************************************************************



function checknumber(zulu)
{
if (zulu.value != "")//** Replace 'txt2' by the name of your TextBox
{
if (isNaN(zulu.value)== true)
{
alert("Invalid Number !!!");
zulu.focus();
zulu.value="";
}
}
}

// ********************************************************************************


function checkdate(zulu)
{
var str;
var day, month, year, s1, s2;
var mod;
str= zulu.value;
day= str.substr(0,2);
month= str.substr(3,3);
year= str.substr(7,4);
s1= str.substr(2,1);
s2= str.substr(6,1);
mod= (year % 4);
//alert(s2);

if (zulu.value== "")//** Replace 'txt3' by the name of your TextBox
{
alert("Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if (isNaN(day)== true)
{
alert("Invalid Day1 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( (day.length) != 2 )
{
alert("Invalid Day2 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( ((day.length) == 2) && (day < 0 || day > 31) )
{
alert("Invalid Day3 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if (s1 != "-")
{
alert("Invalid Seperator1 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if (isNaN(month) == false)
{
alert("Invalid Month1 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( (isNaN(month) == true) && (month.length != 3) )
{
alert("Invalid Month2 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( (isNaN(month) == true) && (month.length == 3) && ((month != 'jan') && (month != 'feb') && (month != 'mar') && (month != 'apr') && (month != 'may') && (month != 'jun') && (month != 'jul') && (month != 'aug') && (month != 'sep') && (month != 'oct') && (month != 'nov') && (month != 'dec') && (month != 'JAN') && (month != 'FEB') && (month != 'MAR') && (month != 'APR') && (month != 'MAY') && (month != 'JUN') && (month != 'JUL') && (month != 'AUG') && (month != 'SEP') && (month != 'OCT') && (month != 'NOV') && (month != 'DEC') && (month !='Jan') && (month != 'Feb') && (month != 'Mar') && (month != 'Apr') && (month != 'May') && (month != 'Jun') && (month != 'Jul') && (month != 'Aug') && (month != 'Sep') && (month != 'Oct') && (month != 'Nov') && (month != 'Dec')) )
{
//alert(month.length);
alert("Invalid Month3 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( (day > 30) && ( (month= "apr") || (month= "APR") || (month= "Apr") || (month= "jun") || (month= "JUN") || (month= "Jun") || (month= "sep") || (month= "SEP") || (month= "Sep") ||(month= "nov") || (month= "NOV") || (month= "Nov")) )
{
alert("Invalid Date /n Day Cannot be Greater than 30 for the Month of " + month + " !!! /n Enter Date as DD-MMM-YYYY ");
}
else if (s2 != "-")
{
alert("Invalid Seperator2 !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( isNaN(year) == true )
{
alert("Invalid Year !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( isNaN(year)== false && (year.length != 4 ) )
{
alert("Invalid Year !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( (isNaN(year)== false) && (year.length = 4 ) && ((year % 4)== 0) && ((month= "feb") || (month= "FEB")) && (day > 28) )
{
alert("Invalid Date /n Day Cannot be Greater than 28 for the Month of " + month + " in Leap Year !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
else if ( (isNaN(year)== false) && (year.length = 4 ) && ((year % 4) != 0) && ((month= "feb") || (month= "FEB")) && (day > 29) )
{
alert("Invalid Date /n Day Cannot be Greater than 29 for the Month of " + month + " !!! /n Enter Date as DD-MMM-YYYY ");
zulu.focus();
}
}

// ********************************************************************************
</script>
</head>
<body>
<form name="f1">
<table align="center" border="1" width="100%" cellspacing="1" cellpadding="1" bordercolor="black">
<tr>
<td>Null Validation:</td>
<td><input type="text" name="txt1" onblur="javascript:checknull(this);checknumber(this);" title="Null Not Allowed Here"></td>
</tr>

<tr>
<td>Number Validation:</td>
<td><input type="text" name="txt2" onblur="javascript:checknumber(this);" title="Only Numbers Allowed Here"></td>
</tr>

<tr>
<td>Date Validation:</td>
<td><input type="text" name="txt3" maxlength="11" onblur="javascript:checknull(this);checkdate(this);" title="Enter Date as: DD-MMM-YYYY"></td>
</tr>

</table>
</form>
</body>
</html>
Hi David
A thousand apologies .
If you can see a solution to my problem do reply.
Bye
Hi guys
new to scripting. Hope u can help mi on this.
v hav a form for an inhouse reporting application.
This form takes around 100 parameters. We have to validate certain fields for checking dates, numeric values & null values.
In this scenario for field level validation wat i wil hav 2 do is 2 call this function on blur of every field & always keep on changing my java script file with different field names for all fields. Tat wuld b 2 much of coding.
Is ther a way in javascript wher v can pass the name of the field in my form to javascript function as a parameter so tat i can cari out the validation
I hav a lot of forms wher i hav 2 do the same validation.
Thanx
Sushant
Thanx
Pretty good explanation
19 years ago
Hi
new to struts
This is what i read a about struts in the forum :
The framework is just another (rather large) step towards not having to worry about developing infrastructure and being able to concentrate on the business logic and the stuff that matters to the client. Reduced time to market and all those other points that are commonly touted at this point.
If this is what struts does . How different is it from ejb. Or is it that struct functionality overlaps ejb functionality
Thanx
Sushant
19 years ago
I want to appear for my weblogic certification7.0. i read the weblogic site mentioning some mandatory courses to be taken.
is it necessary for every candidate to enroll for these courses before appearing for the exam
or can any 1 appear for the exams
thanks
Hi
new to j2me
Could someone ellaborate on the difference between a configuration (CLDC,CDC etc) & a profile(MIDP,Foundation etc)
Thanks
Sushant
19 years ago
Balaji , Thanx for the help
20 years ago