0

I am passing some parameters from one page to another through session ,problem what I am facing is each parameters is getting reflected in the URL,which I think is not a correct way. So I want to remove all the parameters from the URL,while navigating to other page.

Please suggest me some way to archive so.

This is the URL what I am getting http://localhost:58736/index.html#bankedit//10000422%20%20%20%20%20%20%20%20%20%20%20%20?PayeeId=4&BankName=State%20Bank%20%20

Code what I am using to navigate is:

cellTemplate: function (container, options) {$('<a/>').addClass('hyperlink')
                      .text('Edit |')
                      .on('click', function () {
                          var Edit;
                          Demo.app.navigate("bankedit/?AccountNumber=" + options.data.AccountNumber + "&PayeeId=" + options.data.PayeeId + "&BankName=" + options.data.BankName );  
                          sessionStorage.setItem('AccountNumber', options.data.AccountNumber);
                          sessionStorage.setItem('PayeeId', options.data.PayeeId);
                          sessionStorage.setItem('BankName', options.data.BankName);
                          sessionStorage.setItem('Type', "Edit");
                      })
                      .appendTo(container);
                  $('<a/>').addClass('hyperlink')
                      .text(' Delete')
                      .on('click', function () {
                          options.component.removeRow(options.rowIndex);
                      })
                      .appendTo(container);
              }

And for retrieval of parameter values:

sessionStorage.getItem("BankName"), 

in bankedit.js page

vishal
  • 55
  • 6
  • You need to change the form method from `get` to `post` – Derek Pollard Jan 06 '16 at 06:21
  • As others mentioned , you need to set the form method to `post` instead of `get` – Saeid Khaleghi Jan 06 '16 at 06:22
  • You are adding your 'query' parameters to the URL. Instead, send it as a 'POST' request with your query parameters as the data payload. Please check the code surrounding the given code to find the GET/POST configuration change. – Sarath Chandra Jan 06 '16 at 06:23
  • Hi! thanx for the quick response but still I am not able to resolve the issue ,So I have added my entire code for better understanding. Please go through it once – vishal Jan 08 '16 at 10:28

1 Answers1

0

One approach would be, right after navigation, to find the parameters in the url that you want to remove (after using/saving them), remove those parts, and then redirect to the reduced url: window.location = reducedUrl.

Community
  • 1
  • 1
guysigner
  • 2,822
  • 1
  • 19
  • 23
  • Hi! thanx for the quick response but still I am not able to resolve the issue ,So I have added my entire code for better understanding. Please go through it once – vishal Jan 08 '16 at 10:28