1

i'm new to web development and i have an issue with javascript.

On webpage 1, I have a table displayed in javascript. Each element of the table can be clicked on, and will sent you to webpage 2 displaying more information about this element.

How can i communicate the element which was clicked on webpage 1 to webpage 2? Is there a way to use &_GET and &_SORT of the php page containing my script, or is there an equivalent?

To be more precise, i'm switching between webpages through a listener:

function selectHandler(e) {
    window.location="display.php";
};

1 Answers1

1

If so necessary you can communicate them through URL hash:

//webpage 1
window.location="display.php#elem1";
//webpage 2
if (window.location.hash === '#elem1') {...}
Indra
  • 111
  • 5