I have one swings application which when ran has a menu item which opens the HTML path from local system(Like - file:///C:/index.html )....If the file is there then it is working properly using below code
But if the path is changed to (Like - file:///C:/index.html#section1) then the real problem is occuring....In IE it is loading the same index.html but it is not loading the sub section #section1 directly. I dont know why the #section1 is not loading directly
Bbk Reddy wrote:In IE it is loading the same index.html but it is not loading the sub section #section1 directly
And if you just type that URL into IE's address bar, or copy and paste it there, does IE work differently? If your answer is no, it's the same, then that would suggest it isn't a Swing (not "swings") problem. It's always a good idea to try to identify which part of the code is causing the problem, rather than just giving up when there are multiple parts.
There's a further difference between pasting a link to an internal anchor of an HTML page/file in the browser address bar and launching the browser with the link as an argument. In the first case, IE correctly scrolls the page to the internal anchor; but in the second, it doesn't.
So, when launching the browser via Runtime#exec(...) the page will be opened, but the internal anchor will be ignored. I would consider this a bug wither in IE or the Windows shell.
There are no new questions, but there may be new answers.
Joined: Dec 06, 2010
Andrey Kozhanov wrote:Use overloaded exec function, like this: