0

I have never seen this, have no idea what is going on:

<form action="/cgi-bin/Lib.exe" method=POST name="slider" ID="Form2">
<input type="text" name="user" value="" ID="Text1">
<input type="text" name="end" value="" ID="Text2">
</form>

function setval()
{   
    alert(s.getValue());
    alert(s2.getValue());
    document.slider.user.value = s.getValue();//set value of hidden text box to value of slider
    document.slider.end.value = s2.getValue();//set value of hidden text box to value of slider
    document.slider.submit();
}

When submitting form from setval(), when I change the name of the first input box from "user" to anything else, my cgi application won't except it and I get an error? I can change the name of the secons input box to anyting and it doesn't seem to have any problem? Confused. Thanks!

2
  • Where does the error occur? On the client side (i.e. in the browser) or server side (in your cgi application?) Commented Mar 25, 2009 at 18:01
  • Thanks guys, it was a cgi error. Commented Mar 25, 2009 at 22:08

2 Answers 2

1

Seems more like it's a problem with the cgi than it is with the HTML/Javascript, to me. It probably makes the assumption that a value for "user" will always be sent. Not much else I can tell you without seeing the form-processing code.

Sign up to request clarification or add additional context in comments.

Comments

1

Your CGI must be expecting an element called 'user'. You would need to check the source.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.