PDA

View Full Version : Please Help Me!!!


kfai
08-13-2002, 01:25 PM
hi..please help me..
I have 3 items (item A, item B and item C).next to each item is a textbox which allows users to type in a number.and there is a submit button below them. for example, if the user put 1 in the item A textbox, 3 in the item B textbox and 2 in the item C textbox. then click submit. it will link to another new window. the result will be shown like item A will be placed on the top, item C will be in the middle and item B below.
please help me....i really need your help...thanks!

mordred
08-13-2002, 02:08 PM
This is a very bad topic title you've chosen. It breaks rule #1 in the MUST-READ thread at the top of this forum, which indicates that you either did not read it good enough or just didn't give a damn about it. Please do read it and abide to those rules, that'll make helping you easier.

To stay on topic, you could mess around with this code:

page1:

<form name="itemList" action="page2.html" target="win">
A <input type="text" name="a"><br />
B <input type="text" name="b"><br />
C <input type="text" name="c"><br />
<input type="submit">
</form>


page2:

<script>
function parseGetVars() {
var getVars = location.search.substring(1).split("&");
var returnVars = new Array();

for(var i=0; i < getVars.length; i++) {
var newVar = getVars[i].split("=");
returnVars[unescape(newVar[1])] = unescape(newVar[0]);
}

return returnVars;
}

var myList= parseGetVars();

for (var i = 1; i < myList.length; i++) {
document.write(myList[i] + "<br />");
}
</script>


See if this helps you along.

kfai
08-13-2002, 02:31 PM
thanks for your help, mordred.
:)