HTTP GET request

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,191
Latest member
BuyKetoBeez

Latest Threads

Top