| | #1 |
| JW War Room Member Join Date: 2010 Location: Sweden & Denmark
Posts: 20
Thanks: 2
Thanked 2 Times in 1 Post
|
Hi All, I hope someone in here can help me out because I am a bit confused right now! I have searched everywhere for solutions on this issue but cant find anything... The question: I would like to show a specific "div" when and only when visitors are on the root domain etc. test.com/index.php If visitors are on any other url the "div" should be hidden. (Including test.com/index.php”?something-extra-here”) How can this be achieved in PHP/JavaScript? Any ideas? Any help is appreciated ![]() Thanks in advance! |
| | |
| |
| | #2 |
| VIP Warrior War Room Member Join Date: 2007 Location: Caldwell, Idaho, USA.
Posts: 1,967
Thanks: 1,024
Thanked 2,043 Times in 1,183 Posts
|
Check the PHP $_SERVER['REQUEST_URI'] and $_SERVER['QUERY_STRING'] superglobals.
|
|
The 2nd Amendment, 1789 - The Original Homeland Security. Gun control means never having to say, "I missed you." | |
| |
| The Following User Says Thank You to SteveJohnson For This Useful Post: |
| | #3 |
| JW War Room Member Join Date: 2010 Location: Sweden & Denmark
Posts: 20
Thanks: 2
Thanked 2 Times in 1 Post
|
Thanks that helped me in the right direction :-)
|
| | |
| |
| | #4 |
| Active Warrior Join Date: 2010
Posts: 88
Thanks: 1
Thanked 3 Times in 3 Posts
|
Yes you can use query string to hide or show any div. or use document.href in javascript |
| |
|
| Bookmarks |
| Tags |
| based, div, hide or unhide, hide/unhide div, url |
| |