nepzap2 Posted November 15, 2011 Share Posted November 15, 2011 Dear All, I wanted to know why the following syntax does not work when targeting an anchor index.php?page=TechnologyTransferTest§ion=BTI-TN5B1#ntro Bu this one does BTI-TN5B1.php#ntro Can anyone help? Quote Link to comment https://forums.phpfreaks.com/topic/251198-anchor-issue-with-php/ Share on other sites More sharing options...
phporcaffeine Posted November 15, 2011 Share Posted November 15, 2011 index.php?page=TechnologyTransferTest§ion=BTI-TN5B1#ntro In the above, #nitro is seen as part of a key/value in the GET namespace BTI-TN5B1.php#ntro In the above, #nitro isn't part of a key/value pair in the GET namespace and then is passed to the client to interpret, which most browsers would interpret as an anchor. Quote Link to comment https://forums.phpfreaks.com/topic/251198-anchor-issue-with-php/#findComment-1288376 Share on other sites More sharing options...
nepzap2 Posted November 15, 2011 Author Share Posted November 15, 2011 Thanks for the quick reply phpORcaffine, Do you know of a way to resolve this issue? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/251198-anchor-issue-with-php/#findComment-1288380 Share on other sites More sharing options...
phporcaffeine Posted November 15, 2011 Share Posted November 15, 2011 So, I assume, what you're trying to do is target a specific spot on the page, while still passing the url variables? The easiest way, admittedly, requiring some re-engineering on your part, would be to pass the values through POST instead of GET; then you'll free up the GET namespace for whatever you want. Quote Link to comment https://forums.phpfreaks.com/topic/251198-anchor-issue-with-php/#findComment-1288381 Share on other sites More sharing options...
nepzap2 Posted November 15, 2011 Author Share Posted November 15, 2011 Yes, that is correct. I will try this approach and get back to this post with the answer. Thank you for pointing me in the right direction. Quote Link to comment https://forums.phpfreaks.com/topic/251198-anchor-issue-with-php/#findComment-1288405 Share on other sites More sharing options...
nepzap2 Posted November 15, 2011 Author Share Posted November 15, 2011 Would passing values using the POST method require using a form? Quote Link to comment https://forums.phpfreaks.com/topic/251198-anchor-issue-with-php/#findComment-1288407 Share on other sites More sharing options...
Pikachu2000 Posted November 15, 2011 Share Posted November 15, 2011 Yes. I think this is a browser-specific issue, however. Appending the # anchor to the end of the get parameters in the URL works just fine for me with Firefox. Quote Link to comment https://forums.phpfreaks.com/topic/251198-anchor-issue-with-php/#findComment-1288413 Share on other sites More sharing options...
phporcaffeine Posted November 15, 2011 Share Posted November 15, 2011 Would passing values using the POST method require using a form? Depends on what your trying to do; you can automate posts through cURL or fsock or AJAX ... etc Quote Link to comment https://forums.phpfreaks.com/topic/251198-anchor-issue-with-php/#findComment-1288440 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.