This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Software Teaming: A Mob Programming, Whole-Team Approach and have Woody Zuill and Kevin Meadows on-line!
See this thread for details.

Srividya Shiv

Ranch Hand
+ Follow
since Jul 20, 2000
Merit badge: grant badges
For More
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 Srividya Shiv

H lp. S m n st l ll th
v w ls fr m m k yb rd.
20 years ago
Hi all
I am learning regular expressions in java with sun's tutorial. I am trying to compile the example program, but I get this error:
cannot access java.util.regex.Pattern
bad class file: c:\Java1.4\lib\rt.jar(java/util/regex/Pattern.class)
class file has wrong version 48.0, should be 47.0.
Please remove or make sure it appears in the correct subdirectory of classpath.
Can someone help me out?
Thanks
srividya
20 years ago
Something like this should work.
<SCRIPT LANGUAGE="JavaScript">
<!--
function maxlength(max){
if (document.form.desc.value.length >= max) {
document.form.desc.value = document.form.desc.value.substring
(0,max);
alert (max+" MAX exceeded!");
return false;
}
}
-->
</script>
<form name="form">
<textarea name="desc" COLS="60" onkeypress="maxlength
(500)">some text....</textarea>
</form>
I have an external javascript included in my main.html page. In this javascript , I am doing a document.write. I want this content to be seen on screen but not printed. I have a style to this effect. But it doesnt work. Can someone tell me what is wrong here.
in the main.html....
<style>
@media print{
div.topmsg{ display:none;}
}
</style><body>
<script src='topmsg.js'>
</script>
in topmsg.js
var msg='something'
document.write('<div id="topmsg" style="position:absolute;visibility:hidden">'+message+'</div>');
No luck. I am getting a javascript error that myRemote.frames[1].location.href is null.
Any help please?
I have a mainpage in which i have some form elements and a submit button.On click of the button, I want to open a new window that has 2 frames. The url for the 1st frame is known, but url for 2nd depends on form input. Can someone tell me how to set the url for the 2nd frame once the window is open.
I tried this with onClick event , but doesnt help.
function setSource(newSource){
myRemote=window.open('test.html','reportWindow');
myRemote.location.href = test.html;
myRemote.frames[1].location.href=newSource;
}
Thanks
srividya
I had to use evaluate insted of eval, because otherwise I cannot post it.
20 years ago
My page looks like this(Its too lengthy,so I edited it):
<script>
function submitButton(sValuex) {
doSubmit(sValuex, 'home');
}
function doSubmit(valuex, formName) {
evaluate('var Form= document.'+formName);
evaluate('Form.mode.value = valuex');
Form.submit();
</script>

<form name="home" method ="POST">
------some code---------
<a href="javascript:submitButton(1000)"><img src="/jsp/images/btn_users.gif" border="0"></a>

<input type="hidden" name="mode" value="0">
</form>
20 years ago
Hi
I have this strange problem. I noticed this in my application :
When I submit my form, the servlet is being called many times(I checked this thru my logs). After 3 or 4 times, my session is killed and I am logged off the application. This doesnt happen always but sometimes. When I looked at some FAQs for a solution, there was a suggestion that I should not have a 'form action' and also a 'javascript submit' in the same JSP. I removed the cation attribute from form tag , but my problem hasnt been solved. Can anybody give me some idea as to why this happens and what i can do to solve it?
Thanks
srividya
20 years ago
Hi Deepa
To avoid duplicate inserts,you can keep a hidden variable in your form or in your session with some value 'true'. Then before insert, read this parameter,if true then insert.Once inserted, reset it to false.Continue your process.
Hope this helps.
srividya
Thanks! It worked!
Is there any reason why focus() would work with onBlur and not onChange? I never came across this point.
Hello all
This a simple one that is bothering me for days. I am using this code to validate a textfield
function checkCompCode(value){
sAccInfo = document.mainForm.compCode.value;
len = sAccInfo.length;
if(len<4 || len >6) {
alert("Please enter a 4 to 6 digits value for Component code");
window.document.mainForm.compCode.value='';
}
document.mainForm.compCode.focus();
return;
}
The focus() never works. Any help?
Thanks
srividya
Hi
I faced the same problem too and resolved it. If you are using any additional jars, check the location of the jars and your build file to see if they are the same.
Hope this helps
srividya
20 years ago