0

I am using an external HTML resource within a C# project on VS. In order to populate web pages I am passing in areas of the resource into the c# code. However, I wish to pass in user typed inputs to other inputs. An example area is shown below:

!!!ThisIsSearchArea###
        <br>Customer Number <input type="text" name="customerNumber" id="customerNumber"><br>
        <br>Account Number  <input type="text" name="accountNumber" id="accountNumber"><br>

        <input name ="hiddenName" type="hidden" value="1" />
        <br>&nbsp<br><hr>

       <div>                  
    <a href="#" id="IntegrationSearchLink" data-action="IntegrationComponent_BC0625B6-7690-4CEA-8C42-B2C433FD5315">Search</a>
     <script type="text/javascript">
         $(document).ready(
        function () {
            $('#IntegrationContinueLink').hide();
            $('#IntegrationSearchLink').button();
            $('#IntegrationSearchLink').click(function (event) {
                $('#hidIntegrationCommand').val('SearchCustomers');
                ExecuteAction(event, $(this));
            });

        });

Now this search area is present on all my webpages and when the javascript runs a new webpage is brought up. However, when this area is used again I lose the input values of the two text inputs and they are blank. Therefore is there a way of retaining these values using javascript or some other code?

1
  • Save values in cookies and you can always retain it Commented Oct 19, 2013 at 20:13

1 Answer 1

1

Use cookies, other than that, as with any client side scripting, you can't possibly do that.

If you're using any server side language like php, you can store that value in your session variable.

$_SESSION[]
Sign up to request clarification or add additional context in comments.

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.