I have created a dyanmic button in Java script with the following code:
var pathname = window.location.pathname;
var html = '<div id="gmSomeID"><form action="https://apples.com/active/index?u='+pathname+'"><input id="tapButton" type="submit" value="TAP" /></form></div>'
That should pass direct someone to the link mentioned above with pathname appended.
When I paste this URL in myself manually this works. However, each time I click this link, the URL is truncated to just:
https://apples.com/active/index?
For reference:
- Original URL: https://apples.com/class/1/info
- Pathname: /class/1/info
Why would JavaScript / Browser be truncating a link like this?