For one, this:
require('page.php?ID=myID');
is looking for the file with a name 16 characters in length that includes a question mark (a character that isn't legal on the NTFS file system).
For another, how is PHP supposed to require() something after it has already generated the output and exited?
Instead, you'd have to have the Javascript code redirect the user to the appropriate URL, or use AJAX to dynamically alter the page's contents after making a background request to the appropriate URL.