rosentjl
04-17-2003, 02:40 PM
In the HTTP Request, I want to pass a few parameters, some of which have the same name and all of which have different values.
The GET version would be:
http://localhost:8080/pass?itemIDs=1111&itemIDs=2222&itemIDs=3333
in ActionScript this may be written:
getURL("http://localhost:8080/pass?itemIDs=1111&itemIDs=2222&itemIDs=3333","
_blank", "GET");
The closest that I have come to get a valid POST is:
var aLoadVars = new LoadVars();
aLoadVars.aDifParam="aaaa";
aLoadVars.itemIDs= "1111";
aLoadVars.itemIDs= "2222";
aLoadVars.send("http://localhost:8080/pass","_blank","POST"
);
However, this will overwrite the first value of itemIDs and will result in itemIDs=2222.
Supposedly, everything can be put into the HTTP header with:
var aLoadVars = new LoadVars();
aLoadVars.addRequestHeader("itemIDs","1111","itemIDs","2222");
aLoadVars.send("http://localhost:8080/pass","_blank","POST"
);
but my Java Servlet does not read these parameters.
The HTML equivalent is:
<html>
<body>
<form method="post" name="aForm"
action="http://localhost:8080/pass">
itemIDs = <input type="text" name="itemIDs" value="1111"><br>
itemIDs = <input type="text" name="itemIDs" value="2222"><br>
itemIDs = <input type="text" name="itemIDs" value="3333"><br>
videoID = <input type="text" name="aDifParam" value="aaaa"><br>
<input type="submit" value="post this">
</form>
</body>
<html>
any ideas? :confused:
_________josh
The GET version would be:
http://localhost:8080/pass?itemIDs=1111&itemIDs=2222&itemIDs=3333
in ActionScript this may be written:
getURL("http://localhost:8080/pass?itemIDs=1111&itemIDs=2222&itemIDs=3333","
_blank", "GET");
The closest that I have come to get a valid POST is:
var aLoadVars = new LoadVars();
aLoadVars.aDifParam="aaaa";
aLoadVars.itemIDs= "1111";
aLoadVars.itemIDs= "2222";
aLoadVars.send("http://localhost:8080/pass","_blank","POST"
);
However, this will overwrite the first value of itemIDs and will result in itemIDs=2222.
Supposedly, everything can be put into the HTTP header with:
var aLoadVars = new LoadVars();
aLoadVars.addRequestHeader("itemIDs","1111","itemIDs","2222");
aLoadVars.send("http://localhost:8080/pass","_blank","POST"
);
but my Java Servlet does not read these parameters.
The HTML equivalent is:
<html>
<body>
<form method="post" name="aForm"
action="http://localhost:8080/pass">
itemIDs = <input type="text" name="itemIDs" value="1111"><br>
itemIDs = <input type="text" name="itemIDs" value="2222"><br>
itemIDs = <input type="text" name="itemIDs" value="3333"><br>
videoID = <input type="text" name="aDifParam" value="aaaa"><br>
<input type="submit" value="post this">
</form>
</body>
<html>
any ideas? :confused:
_________josh