swilson
Posts: 84
|
Posted: 02/24/2006, 6:21 PM |
|
I want to pick up a url link parameter from a textbox on the client side before the user submits a form.
In other words, I want the user to be able to click a link on a page that will pass a url parameter from a textbox that is populated by the user, but not yet submitted. This will allow the user to use the link to look up information from another page, before completing the form at hand.
How is it possible to program changes to link parameters?
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple. |
|
|
swilson
Posts: 84
|
Posted: 03/21/2006, 8:45 AM |
|
I solved my need using a Button control. I added the following custom code to the Client On-Click event. In this case I am passing a URL parameter based upon the unsubmitted value of a list box, TypeSeller, of the SalesEvents1 form.
if (document.forms["_ctl0"].SalesEvents1TypeSeller.value == "1" ||
document.forms["_ctl0"].SalesEvents1TypeSeller.value == "2" ||
document.forms["_ctl0"].SalesEvents1TypeSeller.value == "3")
{
current_Query=window.location.search;
current_Query=current_Query.replace(/&TypeSeller([\S])+/g,"");
top.location.href='http://www.IDPCessna.com/Entities.aspx' + current_Query +'&QueryType=Sales&TypeSeller='+ document.forms["_ctl0"].SalesEvents1TypeSeller.value;
}
if (document.forms["_ctl0"].SalesEvents1TypeSeller.value == "4" ||
document.forms["_ctl0"].SalesEvents1TypeSeller.value == "5")
{
current_Query=window.location.search;
current_Query=current_Query.replace(/&TypeSeller([\S])+/g,"");
top.location.href='http://www.IDPCessna.com/AddPerson.aspx' + current_Query +'&QueryType=Sales&TypeSeller='+ document.forms["_ctl0"].SalesEvents1TypeSeller.value;
}
if (document.forms["_ctl0"].SalesEvents1TypeSeller.value == "")
{
alert("You must first select a Type Seller.");
}
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple. |
|
|
|