radhakrishna.p 29 Posting Whiz in Training

please also check the value of $result by echoing it
because for loop execution is based on this value

if the vaue of the $result variable is '0' then there is nothing to display

so please check & echo the value of $result variable also

happy coding

radhakrishna.p 29 Posting Whiz in Training

hai adikimicky,

suggestions (for better programing):

make your connect method signature as follows

public void connect(String user_name,String pass){
//  your code here
}

at line 59 pass username and password values to connect() method.so that line will be as follows

connect(userName,passWord);

then finally chage the query as follows

String str = "insert into Table1 values('"+user_name+"','"+pass+"')";

thats it

happy coding

radhakrishna.p 29 Posting Whiz in Training

please specify the problem clearly

i could find the variable name 'title' at php file,ajax and html too

where you are getting from?

at line 7 how you get the value of title? that might be the problem i think

happy coding

radhakrishna.p 29 Posting Whiz in Training

in one of the previous post

you said you are using type-4 driver

but in the coding part you got the connection object like as follows

Connection con = DriverManager.getConnection("jdbc:driver:OracleDriver:ff","SYSTEM","monika");

but if you use type_4 driver the connection string should be like as follows

Connection con = DriverManager.getConnection("jdbc:driver:thin","SYSTEM","monika");

no need of OracleDriver:ff simply remove that

and then also you got the ClassNotFoundException

for this you need to set (ojdbc.jar file and ojdbc14.jar ) files to your current classpath

i told you that thing also please hava alook at previous post so that you get the proper reason for the problem you have

happy coding

radhakrishna.p 29 Posting Whiz in Training

hai adikimicky

there is no mistakes in the program except some logical mistakes which is unknown to you

i think you are in initial stages of learning concept. no problem

please change the while loop (in the previous post) as follows

while(rs2.next())
{
String lname=rs2.getString("name");
System.out.println(lname); 
}

so that program will run as you expects

what you have done is you fixed the while loop for running 3 times only thats the reason you got 3 names in the output

all remaining things are good

check it once and let me know the status

happy coding

radhakrishna.p 29 Posting Whiz in Training

this problem comes mainly with if the rt.jar file could not be found by the application

please let me know how r u running this application?

(at command prompt or using any IDE like netbeans ,eclipse)

r u running your application windows or in unix or linux? (pls specify this also )

if you are running at Command Prompt (in windows):

please check whether the java sdk instalation path (JAVA_HOME) path has been set properly or not

guidelines :

go to mycomputer (right click on it )
-> then go to properties
-> then select 'Advanced System Settings'
-> select "Advanced" tab
-> then select "environment Variables" button
then check
under system variables go for path variable then check whether there is an entry for **(java_Instalation_path) ** or not

let me know all the above things

radhakrishna.p 29 Posting Whiz in Training

if you use the bellow statement for connecting to database (in the above given url)

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")

that says you are using type-1 driver which is provided by Microsoft ODBC for Oracle

incase, if you use the bellow statement for connecting to database

Class.forName("oracle.jdbc.driver.OracleDriver") 

that says you are using type-4 driver (ojdbc.jar and ojdbc14.jar files are needed to connect to database) which comes with Oracle10g Express Edition

note : check bin folder of oracle10g installation for those jar files

in java there are 4 ways to connect to database . the following url explains description of all the 4 ways

http://www.roseindia.net/jdbc/jdbc-driver-and-its-types.shtml

let me know if you have any doubts in my clarification

happy coding

radhakrishna.p 29 Posting Whiz in Training

pls post here any error messages if you got or explain your problem briefly

so that we are here to help you

how could we understand the else part the program is running?

radhakrishna.p 29 Posting Whiz in Training

hai toomutch,

could you tell me the reason for storing the total path of the selected file into database?

radhakrishna.p 29 Posting Whiz in Training

why don't you try like this (replace your php code with bellow code it works perfectly)

<?php

echo('This is visible, all stuff below is not. So the closing tags are not visible too.');

?>
<embed src="flash/<? echo rand(1, 5);?>.swf" type="application/x-shockwave-flash" width="320" height="240"></embed>


<?
  // remaining your code 
?>
radhakrishna.p 29 Posting Whiz in Training

i think mostly type-4 driver is best to use for connecting to databse

go through the following post (explains everything)

http://www.daniweb.com/software-development/java/threads/352336/java-connection-with-oracle-10g-express

radhakrishna.p 29 Posting Whiz in Training

the following link will be helpful when your table has no key for any any column

http://www.codeproject.com/Tips/159881/How-to-remove-duplicate-rows-in-SQL-Server-2008-wh

as pritaeas said

its very difficult to give the answer for your requirement without knowing the structure of the table

please provide the table stucture once so that we are here to help you

happy coding

radhakrishna.p 29 Posting Whiz in Training

place that script code file before the end of </body> tag

i think it may work

pls check it once and let me know the status

happy coding

radhakrishna.p 29 Posting Whiz in Training

i think query might be the problem there

$query="SELECT post,link from pagination ORDER BY id DESC LIMIY $pageLimit,".PAGE_PER_NO;

can you check the query once by manually at phpmysqladmin sql prompt?

(what i mean is copy the query here and paste and run at sql prompt)

let me know the OP?

radhakrishna.p 29 Posting Whiz in Training

replace this $my_array[$rec_count] = $fv->value ' ' $fz->value;
with the following

 $my_array[$rec_count] = $fv->value.' '.$fz->value;

in php '.' is used for concatenating operations

please check it
and let me know the status

happy coding

radhakrishna.p 29 Posting Whiz in Training

at line 15 you are creating a new array for each and every record thats giving the invalid output to you

move that declarion out side of the while loop and make changes as follows

$my_array = array();
$rec_count =0;
while (!$result->EOF) 
    {
        $fz = $result->Fields("PersonNameFirst");
        $my_array[$rec_count] = $fz->value ;
        $result->MoveNext();        
        $rec_count++;
    }
echo json_encode($my_array);  

please check it once
let me know the status

radhakrishna.p 29 Posting Whiz in Training

hai deadsolo,

i tried the solution for your requirement by using split(" +")

i dont know whether this is an exact solution for your requirement or not. because iam not considering any other issues like( perfomance isssue ... etc) to give this solution

i know this is not the correct way for what you are looking for but its giving a way for the solution

i apologies to all the experts/guys over here who are giving solutions for this problem

File f = new File("Your_data_file_location here");
BufferedReader br = new BufferedReader(new FileReader(f));
String strt = "";

while((strt = br.readLine()) != null){                

     if(strt.startsWith("BitTorrent")){

         System.out.println(strt);
         String[] str_toks = strt.split(" +");
        // for (int i = 0; i < str_toks.length; i++) {
        //            String string = str_toks[i];
        // }
         System.out.println("your desired value :"+str_toks[str_toks.length-2]);
}
}
br.close();

explanation of my code:
1.i have taken your data in a file
2. then i read the file data line by line
3. then i checks if the line starts with (BitTorrent) or not
if yes i split the line using the above regular expression

4.based on our requiement i get the value from the array of spllitted line

thats it

let me know whether this is right approach or not

i will wait for all your valuable comment's

note: i dont have much experience in java

radhakrishna.p 29 Posting Whiz in Training

let me know

is it nessasary to use regular expression concept to get your actual output?

may i suggest any alternate solution to your requirement?

isn't it good to use split() for this requirement?

radhakrishna.p 29 Posting Whiz in Training

we can add background color to div by using style property of div tag as shown bellow

<div id="your_id_value" style="background-color: grey">  
// you may give color name directly or its rgb value like (#FFCCEE)
</div>   

based on your condition you may add style property for the particular div tag

thats it

radhakrishna.p 29 Posting Whiz in Training

what i mean is to place the entire thread code in your button actionListner method

radhakrishna.p 29 Posting Whiz in Training

so then take a global variable for continuing (screen capture) the loop as folllow

public static boolean loop_status = true

and then modify your code as follows (here we are making the total process of your work in a seperate thread so that its never distrub the main thread at all)

new Thread(new Runnable(){

public void run(){
   try{
        for(int x=1;;x++) 
        {
             fn= Integer.toString(x) + "filename.jpg";
             ScreenShotRobot.captureScreenShot( "folder/", "jpg", fn );
             Thread.currentThread().sleep(2000);
             if(!loop_status){ // this loops until the value of the variable changed to false
             break;
             }
        }
}catch(Exception e ){
      // handling code if any exception raises here
}

}

}).start()

whenever you want to stop the screen capturing then try make the loop_status variable value to false

pls try to make changes in your code

let me know whether this is woirking perfectly or not

happy coding

radhakrishna.p 29 Posting Whiz in Training

try the bellow code for your requirement

try {    

    capture = new Robot().createScreenCapture(screenRect);
    ImageIO.write(capture, mode, new File( uploadPath, filename));

    // this makes 2 sec sleep
    Thread.currentThread.sleep(2000);  // here 2000 means 2 sec     
}
}catch(Exception e){
     // your remaining code 
}
radhakrishna.p 29 Posting Whiz in Training

if you are looking for if the file exists or not
go with the following method available in the File Class

check it with 

if (f.exists())

let me know whether this is your requirement or not
happy coding

stultuske commented: since this is a correct answer to the question, see no reason why it should be flagged as a "Bad Post" +14
radhakrishna.p 29 Posting Whiz in Training

hai yup790 i couldnt understand properly

can you explain what your requirement is ?

so that we will hep you

radhakrishna.p 29 Posting Whiz in Training

hai Violet_82 do as bguild said in his post

it will solve your problem

i tried it and got the solution

and make this thread solved if you get your answer

happy coding

radhakrishna.p 29 Posting Whiz in Training

can you please explain your problem clearly?

radhakrishna.p 29 Posting Whiz in Training

use Math.abs() instead of abs() because there is no default abs() method in js

radhakrishna.p 29 Posting Whiz in Training

for that you have a query like count(*)....... something like this

or you can write some user_defined query to get the unique customers also

i think thats not a good way to store no.of customers in database (as of my knowledge)

radhakrishna.p 29 Posting Whiz in Training

i think its a bad idea to store no.of results in a seperate column. why because it has to modify seperately each and every customer is added to database as well as remove from the database.internally it increases no.of operation on a table

can you tell me the reason for your requirement?

so that i give the proper response to your question

radhakrishna.p 29 Posting Whiz in Training

i have a solution like as follows

  1. make your results(list1_values,list2_values ) which are coming from myfirst.php as
    follows

i mean append those two list options values any of the sign like "$" (or) "," like any other charecter as follows in myfirst.php

results = list1_values."&".list2_values;
echo results;
  1. spilt the response coming to the jquery by using the charecter(whatever you used in myfirst.php )

  2. after this you will get the result whatever you want and then place the results in different <select> tag values as you need by using jquery

i hope you understand the solution

let me know if you have any doubts in my clarification

radhakrishna.p 29 Posting Whiz in Training

i am just saying the code is very helpful for your requirement

and innerHtml is mainly used for placing values into the cell not for putting values into <input> type elements

for that <input> type elements you may repeat line no (27 to 31) whatever you have posted in your code

try it once
let me know the status

radhakrishna.p 29 Posting Whiz in Training

you have to do 2 things

1 create second frame constructor by passing first frame reference as shown bellow

JFrame1 nf=new JFrame1(first_frame_ref);

and there(i mena in second frame) you can call first frame to display whenever you want

  1. before calling second frame to display make first frame visibily as "false"

thats it

radhakrishna.p 29 Posting Whiz in Training

try the bellow url (for adding new row to the table and remove code for check box creation in that)

http://viralpatel.net/blogs/dynamically-add-remove-rows-in-html-table-using-javascript/

it gives the simple solution to your problem .

(there is no need of adding new row to <tbody> and <tbody> to <table> and <table> to <body> )

and make stylling your components as it is

radhakrishna.p 29 Posting Whiz in Training

i think there is no way to do like that ( w.r.t div's point of view)

and i got your solution from here

http://help.dottoro.com/ljcvtcaw.php

please refer this site for more code about the requirement if possible

radhakrishna.p 29 Posting Whiz in Training

we can achieve this by using "contenteditable" property and the following java script code

<div contenteditable="true" onclick="document.execCommand('selectAll',false,null)">

Place  your text here 

</div>

you can add your styles to this div as usual

let me know if you have any problem

Resentful commented: Awesome solution! +1
radhakrishna.p 29 Posting Whiz in Training

yes veedeoo try with that

radhakrishna.p 29 Posting Whiz in Training

hai amiyar,
you said it works for one id and not working for other id

i think thats not correct

check your database details with the second product id by manualy if it shows or not

so that i can give proper answer for your question

but the logic is correct for one id and it works for 100 id's too

radhakrishna.p 29 Posting Whiz in Training

hai amiyar

there is no mistake in your code but you are appending the product_id to varia ble j thats it after the first line of while loop look at once there

 $j .= $rs['prod_id'];

thats the reason you are getting 526527 instead of 526 and 527.

i think you got the point

go ahead by changing your code

radhakrishna.p 29 Posting Whiz in Training

remove line 6

and place

 echo "<td colspan=2>".$row['name'].",".$row['price']."</td>"

instead of what you have written at line 5

check it once by making those changes

let me know the status and make this thread solved if you get the exact answer

radhakrishna.p 29 Posting Whiz in Training

providing values to drop down list use like as follows

  <?
     // php code that gets data for drop down list
  ?>

    <option value= "<? dropdown data?> "> <? dropdown data?>  </option>  

  <?
     // remaining code

  ?>

instead of
print("<option value=\"$idCat\">$cat</option>");

and check your answer by replacing this way
and let me know the status of your code

radhakrishna.p 29 Posting Whiz in Training

can you post error details what you are getting so far while running this function?

so that we try to slove your problem

radhakrishna.p 29 Posting Whiz in Training

i think you have to implement one more listner for your class

that is ItemListner

to read events from JComboBoxes instead of adding ActionListioner to those components

check it once by implementing ItemListner to those components

and keep line no 205 to 293 with in ItemListener related methods this is causing the some exceptions
to invoke ClearFeilds() method in the given class

radhakrishna.p 29 Posting Whiz in Training

can you show how you get the json data to your page?

i think thats doing the major part of your problem

check once whether you getting json data in synchronization mode or not

radhakrishna.p 29 Posting Whiz in Training

check list for your problem
1. did you put any package statements in your java file?
2. are compiling and running on the same directory ?

please check those two conditions (these two are the basic cause of your problem)

radhakrishna.p 29 Posting Whiz in Training

use onmouseout instead of onfocusout

it may works for you

radhakrishna.p 29 Posting Whiz in Training

are you asking for storing the file to a new path or its original path?

i am getiing little bit confusion on your question

pls clarify me so that i will help you soon

radhakrishna.p 29 Posting Whiz in Training

instead of line15 at userpage.php
try to plcae the following code

<script type="text/javascript"> setTimeout(your_function_name,3000) </script>

and let me know the status after modifying the code

and also there will be some synchronization problem with the code which is relating (at line 6 ) to the json data

please first you try to replace code then we will sort out the answer

radhakrishna.p 29 Posting Whiz in Training

can you place your html code here? (if no one object in this forum)
so that i will answer your question very soon.

radhakrishna.p 29 Posting Whiz in Training

i think getSelectedItem() mothos not available in the ItemEvent Class

if you can replace getItem() method instead of that i think that error can be removed

try it once........

i don't know whether that is your actual requirement or not

please check it once

radhakrishna.p 29 Posting Whiz in Training

this is method description of next() in Scanner class :
String next()
Finds and returns the next complete token from this scanner and returns it as a string; a token is usually ended by whitespace such as a blank or line break. If not token exists, **NoSuchElementException ** is thrown.

i think the format of the datatable may be not in the proper way...
please check it once and reply the answer .. so that we will find another solution for your problem if this is not a solutionn.......
and can you tell me the data format of the users table which are storedi the text file?
regards
radha krihsna