Reputation: 41
I have a PHP system and basically I use a popup lay to do some processing, ie upload an image. No problems here and then on completing the insert and upload I go to a page which will call the underlying page and refresh it:
$callpage="jobsheet_build.php?id=".$_GET['id'];
echo("<script language=\"javascript\">");
echo("top.location.href = \" ").$callpage.("\";");
echo("</script>");
OK this works fine, but in the ideal world I would like to put a reference to #images in the $callpage so I end up with
$callpage="jobsheet_build.php?id=".$_GET['id']."#images";
but the javascript just hangs no matter what I do.
Any ideas would be very greatly appreciated!
Upvotes: 2
Views: 208
Reputation: 482
@Jim Have you tried to set the anchor tag like this echo("top.location.href = \" ").$callpage.("#images\";");
instead of set the anchor tag inside the variable ?
Upvotes: 2