-1

I have something like this http://raphaeljs.com/australia.html. I know how to assing OnClick function for each element. Problem is with the body of Onclick function, I can also determine what element was clicked.

function onClickHandle() {
//go to page www.mypage.com?page=selectedPage
} 

I can make the selectedPage string (specify the target page), problem is only with the action GO TO SPECIFIED PAGE.
In my web app I use html, css, php, javasript.

user1097772
  • 3,499
  • 15
  • 59
  • 95
  • @Vlad nope it's not duplicate, in the answer is probably the the solution problem but the question you'we linked is first asking for something else and second I definitely don't wanna use JQuery! The author of the answer is answering to that DIFFERENT question and also for my problem which is not mentioned in the question. So nextime you should read before flagging something! – user1097772 Feb 12 '14 at 23:27
  • I don't see how the question @Vlad linked doesn't solve your problem, you're asking how to navigate to another page. – Overv Feb 13 '14 at 00:36
  • I don't really get the part of "like this" did you refer to the url, to the webPage (html,js,css) or the actual behavior of the webpage. – Allende Feb 13 '14 at 00:53

2 Answers2

1

You can go to the selected url with:

window.location.href = "www.mypage.com?page=" + selectedPage;
zord
  • 4,538
  • 2
  • 25
  • 30
0

So it will be

window.location.replace(selectedPage);

Or let's say you're handling the onclick of each link:

function myOnClickHandler(e){

    window.location.replace(e.target.href);
    //for ie you will use e.srcElement.href

}
Allende
  • 1,480
  • 2
  • 22
  • 39