Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
120
rated 0 times [  121] [ 1]  / answers: 1 / hits: 38416  / 12 Years ago, mon, september 24, 2012, 12:00:00

I want to click on link and I want to go to the page on home page by it self



<a onclick=javascript:GoToHomePage() href=javascript:void(0)>Home page</a>


function is



function GoToHomePage()
{
window.location = 'default.aspx';
}


but i want the url of page www.testtest.com instead of www.testtest.com/default.aspx



I can't even give the absolute path like www.testtest.com as it's a portal and same page coming in few more portals.


More From » jquery

 Answers
2

following code will take you to '//www.testtest.com/'



   function GoToHomePage()
{
window.location = '/';
}

[#82936] Friday, September 21, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
miranda

Total Points: 655
Total Questions: 110
Total Answers: 121

Location: Netherlands
Member since Thu, Jul 1, 2021
3 Years ago
miranda questions
Sun, Jun 6, 21, 00:00, 3 Years ago
Tue, Mar 16, 21, 00:00, 3 Years ago
Sun, Feb 7, 21, 00:00, 3 Years ago
Mon, Jan 18, 21, 00:00, 3 Years ago
Fri, Jul 17, 20, 00:00, 4 Years ago
;