Reputation: 183
I have to add an anchor tag which when clicked reloads the current page (anchor tag contains the current url)
document.getElementById('clickhere').innerHTML='<div>Something went Wrong! <a href=""'+$(location).attr("href")+'>Click here to reload</a> </div>';
When I click on the anchor tag in chrome, the page loads fine. As per the screenshot when I hover over the link, it shows the full URL. After /private I am able to see the other part of URL.
Below screenshot when I executed the page in IE11. If I check, the part after /private is not present.
I am not able to get why the difference. I have added this code in the Jquery AJAX success section. Also tried using Javascript's document.location.href but still the same problem.
Upvotes: 0
Views: 1302
Reputation: 90
click active x control button and your script is load and you can use both line work
1- document.getElementById('clickhere').innerHTML='Something went Wrong! Click here to reload ';
2- $('#clickhere').html('Something went Wrong! Click here to reload ');
Upvotes: 0
Reputation: 131
Could you try with:
windows.location.href
document.getElementById('clickhere').innerHTML='<div>Something went Wrong! <a href="' + window.location.href + '">Click here to reload</a> </div>';
<div id='clickhere'></div>
Upvotes: 1