prajwala solanki

Greenhorn
+ Follow
since Jul 17, 2007
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 prajwala solanki

Is there any possible way to fix width of a specific cell(mean i want to fix width of 6th column only)...so that i can fix this problem...
means .... like width="150px"
i tried that one also....can you please run the code...and see the problem where its occuring ...because i am not so good in this alignment...with my knowledge i tried maximum possibilities...

when you click [+] link you will see the cell expansion....
Hi,
I have a problem with the wrap..
one of my <td> width is 150....but the content is like a big string without any spaces in between... so I wraped the content....but the cell width was expanding.. Here I am attaching the code just copy it and run...for your clear idea i used background colors..wrapping works fine but cell expanding??/

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
function toggleSection( secid )
{
var sectionId = document.getElementById(secid);
if (sectionId == null) return;
if (sectionId.style.display == '')
{
sectionId.style.display = 'none';
} else {
sectionId.style.display = '';
}
}
function toggleCoaCmt( cmtId )
{
toggleSection('max_' + cmtId);
toggleSection('min_' + cmtId);
}
</script>
</head>
<body>
<form id="form1">
<table width="950" border="0" cellpadding="0" cellspacing="1" >

<tr bgcolor="#E0E0E0">
<td> </td>
<td width="225" bgcolor="#E0E0E0" class="datacellhead3" style="width:225px;word-wrap:break-word" wrap>
test COA 3 (achoy2 19-Oct-2007 at 00:14:27 EDT)
<br/>
<div id="coa_rpt_cmt_6" class="comment"></div>
</td>
<td width="25" bgcolor="#E0E0E0" class="datacell">hello</td>
<td width="80" bgcolor="#E0E0E0" class="datacell">01-Dec-2008</td>
<td width="80" bgcolor="#E0E0E0" class="datacell"></td>
<td width="90" bgcolor="#E0E0E0" class="datacell">Demonstrator</td>
<td width="70" bgcolor="#E0E0E0" class="datacell">Recommended: Not Required</td>
<td width="150" bgcolor="red" class="comment" wrap>
<div id="max_Status_1" style="float:left;background-color:yellow;word-wrap:break-word;width:150px">
<a href="javascript:toggleCoaCmt('Status_1')" >[+]</a>
testing123456789012345678901234567890123456...
</div>
<div id="min_Status_1" style="float:left;display:none;background-color:yellow;word-wrap:break-word;width:150px">
<a href="javascript:toggleCoaCmt('Status_1')" >[-]</a>
testing123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 (abcd1 19-Oct-2007 at 00:17:21 EDT) test (abcd1 19-Oct-2007 at 00:14:27 EDT)
</div>
</td>
<td width="10" align="center" bgcolor="#E0E0E0" class="datacell">3</td>
<td width="50" bgcolor="#E0E0E0" class="datacell" style="word-wrap:break-word">Melbourne</td>
<td width="50" bgcolor="#E0E0E0" class="datacell">Vehicles Sales</td>
<td width="50" bgcolor="#E0E0E0" class="datacell"></td>
</tr>
<tr>
<td colspan="12" bgcolor="#E0E0E0"> </td>
</tr>
</table>
</form>
</body>
</html>
Hi,
we have around 10000 rows in the data base.
there is a selection criteria to get all the rows.
once we get the rows from database...in jsp page we are looping the resultset.Here is the issue.we displaying data in DIV tags. each row has 5 div tags.so it takes lot of time to load the page.The main purpose of using DIV tags it flip(toggle) the data ( [+] to [-]).
Is there any other way to do that....some one said innerHTML is the best way to do that..but what about this Flipping mechanism??? How can i do that?? I will provide a sample code what am using ....We are using Velocity framefork...code looks little bit different so I just modified to make you understand clearly...{i} gives value of i

<table>
<%
for(int i=0;i<10000;i++){
%>
<tr>
<td>
<div id="max_${i}"><a href="javascript:toggleCmt('${i}')">[+]</a></div>
<div id="min_${i}" style="display:none"><a href="javascript:toggleCmt('${i}')" >[-]</a></div>
<div id="prvw_${i}">Hellllloooo...</div>
<div id="fulldata_${i}" style="display:none" >Hellllloooo How are you doing!!!</div>
</td>
<td>same div tags </td>
<td>same div tags </td>
<td>same div tags </td>
<td>same div tags </td>
</tr>
<% } %>
</table>


Please give me some ideas to improve loading the page faster.
It you provide any sample code that so helpful for me...
Wow.... Its working...Thanks alot...
actually I am not good at javascript...
Thanks again..
Mine is kinda triky...
I din't find much info from the link you provided....
mine is two different tags under a div tag

Ex: <div id="text">
<a href="com"></a>
hello this text is not under <a> tag....
</div>
How to get the content or body of <div> tag from java script
ex: <div id="sel_1" >
<a href="find('sel_1')" >[-]</a>adding some addtional comments
</div>

java script :

var cmtTxId = document.getElementById('sel_1');
var text = cmtTxId.innerHTML;\\or cmtTxId.value\\

/* above expression giving me <a href="find('sel_1')" >[-]</a>adding some addtional comments*/
\\ i need only the text "adding some addtional comments"
Is there any other way to get only the text....not other inner tags
Hi I am trying to make DB2 connection but its throwing exception...Here is the code and output

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Test {

public static void main(String args[])

{
String url="jdbc:db2://localhost:50000/DWCTRLDB";
Connection con;
String query ="SELECT * FROM test.employee";
Statement stmt;
try{
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
}
catch (java.lang.ClassNotFoundException e) {
System.err.print("class not found: ");
System.err.println(e.getMessage());
}
try {

con= DriverManager.getConnection(url,"db2admin","db2admin");
System.out.println("got connection");
stmt =con.createStatement();
ResultSet result =stmt.executeQuery(query);
while (result.next()) {
String name = result.getString(1) +" "+
result.getString(2);
System.out.println(name);
}
stmt.close();
con.close();
}
catch(SQLException ex) {
System.err.print("SQLException:");
System.err.println(ex.getMessage());
ex.printStackTrace();
}

}
}

The output is:
SQLException:No suitable driver
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:559)
at java.sql.DriverManager.getConnection(DriverManager.java:189)

I am using RAD6.0. I added jdbc drivers to java build path.
db2java.zip
db2jcc.jar
db2jcc_license_cu.jar
db2jcc_license_cisuz.jar

I configured same jars,Dburl,username,password on DbVisualizer, its working fine.So i think there is no problem with url,username and password.(I am sure).