Garbage
God of Mistakes...
^^ k thanks...is there a HTML parser in java
Open Source HTML Parsers in Java
HTML Parser - HTML Parser
^^ k thanks...is there a HTML parser in java
@gopi_vbboy
You can do it in Java too. Use the URL class to make the connection to the URL, pass the data.
Take the response in a String (StringBuffer) and then parse it.
gopi_vbboy said:ok
atleast tell me wat to use to do such web page automation
php or python?
create a new func and call it from main,then it will solve.Check this code out:
Now I'm getting this error "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0Code:import java.io.*; public class FileOps { public static void main(String args[]) { File file = new File(args[0]); try { BufferedReader in = new BufferedReader(new FileReader(file)); String s; s = in.readLine(); while(s!=null) { System.out.println("Read " + s); s = in.readLine(); } in.close(); } catch(FileNotFoundException e1) { System.err.println("File Not Found" + file); } catch(IOException e2) { e2.printStackTrace(); } } }
at FileOps.main(FileOps.java:13)
Java Result: 1
"
What's the solution?
<html>
<head>
<script type="text/javascript">
function timedText(){
var i=1000;
for(i=1000;i<=20000;i=i+1000){
setTimeout("document.getElementById('txt').value="+i,i);
}
}
</script>
</head>
<body>
<form>
<input type="button" value="Display timed text!" onClick="timedText()">
<input type="text" id="txt">
</form>
<p>Click on the button above. The input field will tell you when two, four, and six seconds have passed.</p>
</body>
</html>
I am a newebie in javascript, need some help in the following program!
<html>
<head>
<script type="text/javascript">
function timedText()
{
var i=1000;
for(i=1000;i<=20000;i=i+1000){
var t1=setTimeout("document.getElementById('txt').value = i",i);
}
}
</script>
</head>
<body>
<form>
<input type="button" value="Display timed text!" onClick="timedText()">
<input type="text" id="txt">
</form>
<p>Click on the button above. The input field will tell you when two, four, and six seconds have passed.</p>
</body>
</html>
This is supposed to display time past(in seconds) in a textbox but It's not working.........can someone help??
<html>
<head>
<script type="text/javascript">
function timedText()
{
var i;
for(i=1000;i<=20000;i=i+1000){
mytime.txt.value=setTimeout("document.getElementById('txt').value="+i,i);
}
}
</script>
</head>
<body>
<form name="mytime" >
<input type="button" value="Display timed text!" onClick="timedText()">
<input type="text" id="txt">
</form>
<p>Click on the button above. The input field will tell you when two, four, and six seconds have passed.</p>
</body>
</html>
the o/p im getting is 21, 41, 61, when i click...i think there is a logical error in the code. because when i am changing the value of the for loop
for(i=0;i<=20000;i=i+10000)
i am getting odd values...do check it out for that...
Thats because the setTimeout() returns the ID, which can be used for clearTimeout() function, and not the value which you want to setup.
Please check the code which I provided in above post.
Okay, it has been 2 days I have started to Learn JAVA, after having read the book, I found that I need to change the environment variable to run JAVA program In CMD.
However after changing Environment variable i found that my basic CMD commands are not functioning well, then I had to reset the environment variable.
Now I am using NETBEANS to create and run program.
Plzz help what wrong am I doing
You probably did set PATH=<something something>
Instead do set PATH=%PATH%;<something something>
Code:set PATH = %PATH%;C:\Program Files\Java\jdk1.6.0_20\bin
No, Not working
After setting it as path, when I try to use cmd commands like
ping xxx.xxx.xxx.xxx
it says
'ping' is not recognized as internal command
set PATH = %PATH%;"C:\Program Files\Java\jdk1.6.0_20\bin"
echo %PATH%
No, Not working
After setting it as path, when I try to use cmd commands like
ping xxx.xxx.xxx.xxx
it says
'ping' is not recognized as internal command