0

I am writing a code in javascript (in .aspx page) which will insert values in database using jquery ajax code through webservice and then it will perform redirect operation, but it does not perform redirection .. please tell me if i am doing something wrong in my code ... here is my code ..

   <script type="text/javascript">

   function xyz()
   {
         $.ajax({
         type: "POST"
         url: "WebService.asmx/InsertRediretTime"
   });

   window.location='....location...';

   }
   </script>

2 Answers 2

1

Have you tried window.location.href instead?

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

Comments

0
 <script type="text/javascript">

   function xyz()
   {
         $.ajax({
         type: "POST"
         url: "WebService.asmx/InsertRediretTime"
   });

   window.location='....location...';
   return false;
   }
   </script>

try this

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.