You need to sign in to do that
Don't have an account?
WesGray
S-Control User Input
I am trying to have the user input a few values in an S-Control, and then have those values passed to another S-Control for processing. I am able to use URLFOR to go from one S-Control to another, but it doesn't seem to work when used from a form submit button. For example, the following works:
<a href="{!URLFOR($SControl.Employee_Finder_Results)}">test</a>
but this doesn't:
<form name="input" action="{!URLFOR($SControl.Employee_Finder_Results)}" method="get">
Name:
<input type="text" name="user">
<input type="submit" value="Submit">
</form>
Is there some other recommended way to take user input? The parameter passing example in the Cookbook assume that you already know what the parameters you want to pass are.
<a href="{!URLFOR($SControl.Employee_Finder_Results)}">test</a>
but this doesn't:
<form name="input" action="{!URLFOR($SControl.Employee_Finder_Results)}" method="get">
Name:
<input type="text" name="user">
<input type="submit" value="Submit">
</form>
Is there some other recommended way to take user input? The parameter passing example in the Cookbook assume that you already know what the parameters you want to pass are.
"&parmAddress="+userAddress"";
<head>
<script src="/soap/ajax/9.0/connection.js"></script>
<script type="text/javascript">
function main()
{
document.write("<input type=number id=b></input>");
document.write("<input type=number id=c></input>");
function getQueryStringValue(name) {
var pairs = query.split("&");
alert(pos);
if (pos == -1) continue;
var argname = pairs[i].substring(0,pos);
alert(argname);
var value = pairs[i].substring(pos+1);
alert(value);
if (argname == name) return unescape(value);
return "";
}
document.getElementById('b').value=getQueryStringValue("parmName");
document.getElementById('c').value=getQueryStringValue("parmAddress");
}
main();
</script>
</head>
</html>
document.write("<a href='' onClick=callscontrol()> <br>Link</a>");
{
userName=document.getElementById('name').value;
userAddress=document.getElementById('address').value;
document.location="/servlet/servlet.Integration?lid=<id>&ic=1 &parmName="+userName+
"&parmAddress="+userAddress"";
}