vanan saravanan

Ranch Hand
+ Follow
since Jun 02, 2006
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 vanan saravanan

If i use CSS can i still navigate without the top header reloading everytime..
Hi, I'm trying to design a website. What i did was to design a flash header. The navigation for the website is on the flash header and on a different frame. My problem is that i cant seem to align both frames properly. Is there a easier way to go about this problem.

The width of both tables in each individual frame is 100%. So that it expands based on user resolution. However the tables on the top and bottom don't align.


Please view my website here.
http://www.studio6.com.sg/index2.html
The problem is i cant change the following code as i'm using it for having multiple submit buttons on one form. Please advice on how i can run the validation script based on this. Thank you..

input name="b1" type="button" value="Submit Without Preview"
<ON CLICK ="this.form.action< <='fastsaveregistrationdetails.jsp';this.form.submit()"<
I'm trying to validate some fields in my form but cant get it to work. I think its because of the submit button code. Could someone please help identify the problem.

<script language="JavaScript"<
function validate_form ( )
{
if ( document.leaveform.dc1.value == "" )
{
alert ( "Please select start date" );
valid = false;
return valid;

}
}


<input name="b1" type="button" value="Submit Without Preview"
<ON CLICK ="this.form.action< ='fastsaveregistrationdetails.jsp';this.form.submit()"<
Thank you Ulf Dittmer. Works perfectly now.
I'm trying to come up with a password change function. This is how it should work

1 textfield : enter new passowrd
2 textfield : enter same password

If the value from both the textfield match, then update the database. I do know how to do the updating and retriving part. Need help on how to compare both textfields and to provide a pop up if they dont match.
16 years ago
I'm trying to redirect my user based on the value in the database but somehow my code doesnt seem to work. Even if the value of Status is "Pending" in the database it goes to

response.sendRedirect("deletestudentlist.jsp"); instead of

response.sendRedirect("viewstudentlist.jsp");

The problem i presume is in (status1 == "Pending") but not sure what is wrong. Please do help. Thank you.



rst1 = stm1.executeQuery("select Status from appraisal");
String status1 ="";
while(rst1.next()){
status1 = rst1.getString("Status") ;

}

if(status1 == "Pending"){
response.sendRedirect("viewstudentlist.jsp");
} else{
response.sendRedirect("deletestudentlist.jsp");
}
Managed to solve the problem, Will post back again if i face any difficulties
Ok managed to solve the problem. Did all the steps accordingly.

Until fill report. "The compiled report design was successfully filled with data."

Then the last step, export report. It gives me an error saying

The requested resource (/webapp/servlets/pdf) is not available.

Why is that so.
Ok managed to figure out how to use the ant tool. I have done until "ant prepare"

When i try running the jsp file i get the following error. Why is it so..

C rogram FilesApache Tomcat 4.0workStandalonelocalhost_webappjspcompile$jsp.java:3: Package net.sf.jasperreports.engine not found in import.
import net.sf.jasperreports.engine.*;
^

C rogram FilesApache Tomcat 4.0workStandalonelocalhost_webappjspcompile$jsp.java:4: Class net.sf.jasperreports.engine.util.JRProperties not found in import.
import net.sf.jasperreports.engine.util.JRProperties;
I downloaded jasperreports-1.2.7-project. Trying out the webapp sample. It required me to download an "ant" tool. Then i did this step

"Once you have ANT installed, launch "ant -p" from the command line in this directory
to learn more about what tasks you could run to build and test the sample."

clean
javac
prepare
viewDesign
viewDesignxml
war

No other instructions were given after this. How do i carry on..
Hi i'm a newbie trying to learn something. I downloaded ireport and have designed my report. It connects to the database and retrives the value with no problems. When i build the report i'm able to see it as a Pdf and it works.

My question is how do i link this to a jsp page. Lets say when i click a button the pdf report appears. The only file i seem to have in the folder is classic.jrxml Thank you for your help...
Managed to solve the problem.

String userID= (String) session.getAttribute("userID");
String query1 = "SELECT (A.Leave - sum(B.Duration)) AS BALANCE_LEAVE FROM users A, leave B WHERE A.userID=B.userID AND A.userID = '" + userID + "'";
rst1 = stm1.executeQuery(query1);


A.Leave and leave B should not be the same. I changed my table name to leavetest B and it worked.


Thank you
Thank you for your help Jeanne Boyarsky but i'm unsure how to carry out what you said. I'm using mysql5 and tomcat 4. Is there anything wrong in the sql syntax.
I have the following code but cant seem to trace where the error is coming from. Thank you for your help.

String userID= (String) session.getAttribute("userID");
String query1 = "SELECT (A.Leave - sum(B.Duration)) AS BALANCE_LEAVE FROM users A, leave B WHERE A.userID=B.userID AND A.userID = '" + userID + "'";
rst1 = stm1.executeQuery(query1);


The error is
javax.servlet.ServletException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'leave B WHERE A.userID=B.userID AND A.userID = 'staff'' at line 1