B
b173
Hi, this should be fairly simple but I'm struggling with it for some
reason. I have an html form with javascript to submit the form, this
all works fine:
<html>
<head>
<title> submit form </title>
</head>
<body>
<SCRIPT lang="javascript">
<!--
function SubmitMe(theURL, theForm) {
var headendid = "5565";
theForm.action = theURL;
theForm.submit();
}
//-->
</SCRIPT>
<FORM id="SForm" name="SForm" method="get">
<input name="fsa" id="fsa" type="hidden" value="L4P" />
<input name="lda" id="lda" type="hidden" value="3O3" />
<A href="javascript: SubmitMe('headend.aspx', document.SForm)">
Go
</A></FONT><BR>
</FORM>
</body>
<html>
However, now if I try to load:
http://path/headend.aspx?fsa=L4P&lda=3O3&headendid=5565 in a browser it
fails. Also, if I try:
try {
URL url = new
URL("http://path/headend.aspx?fsa=m5p&lda=3k8&headendid="
+ "5565");
try {
URLConnection urlc = url.openConnection();
int oneChar;
InputStream is = urlc.getInputStream();
while ((oneChar=is.read()) != -1)
System.out.print((char)oneChar);
} catch (IOException e) {
System.err.println(e);
}
} catch (MalformedURLException e) {
System.err.println(e);
System.exit(1);
}
this also fails.
Now when I say that it fails, it connects etc, but sends me to a
default "you have to enter you postcode page"
What am I doing wrong? Any pointers?
brian.
reason. I have an html form with javascript to submit the form, this
all works fine:
<html>
<head>
<title> submit form </title>
</head>
<body>
<SCRIPT lang="javascript">
<!--
function SubmitMe(theURL, theForm) {
var headendid = "5565";
theForm.action = theURL;
theForm.submit();
}
//-->
</SCRIPT>
<FORM id="SForm" name="SForm" method="get">
<input name="fsa" id="fsa" type="hidden" value="L4P" />
<input name="lda" id="lda" type="hidden" value="3O3" />
<A href="javascript: SubmitMe('headend.aspx', document.SForm)">
Go
</A></FONT><BR>
</FORM>
</body>
<html>
However, now if I try to load:
http://path/headend.aspx?fsa=L4P&lda=3O3&headendid=5565 in a browser it
fails. Also, if I try:
try {
URL url = new
URL("http://path/headend.aspx?fsa=m5p&lda=3k8&headendid="
+ "5565");
try {
URLConnection urlc = url.openConnection();
int oneChar;
InputStream is = urlc.getInputStream();
while ((oneChar=is.read()) != -1)
System.out.print((char)oneChar);
} catch (IOException e) {
System.err.println(e);
}
} catch (MalformedURLException e) {
System.err.println(e);
System.exit(1);
}
this also fails.
Now when I say that it fails, it connects etc, but sends me to a
default "you have to enter you postcode page"
What am I doing wrong? Any pointers?
brian.