Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i want to know that i am wrking in the visual studio when i am trying to rrdirect the page locally i am not able to redirect like
JavaScript
success: function (response) {
                    var Result = response.d
                    if (Result == true) {
                      var url = 'http://www.facebook.com';
                       $(location).attr('href', url);

                    }
                    alert(Result);
                },
                error: function (result) {

                    var Result = result.d;
                    if (Result == false)
                    { alert(Result); }
                    
                }
            })

But i am trying to redirect to the page like google ,or facebook its been redirecting where is the problem
Posted
v2
Comments
Are you sure it is coming to success block?
Shubhashish_Mandal 15-Jul-13 2:15am    
what value you set as local url?
Abhimanyu vij 15-Jul-13 2:33am    
I have set http://localhost:51001/UI/RegisterUser.aspx

this value i have set
Try giving the relative URL like

RegisterUser.aspx,

if it is in the same folder. Else calculate the relative path and provide that.

1 solution

assign exact local url to url variable, u will redirect to local url
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900