Page 1 of 1

Having trouble with browser using # name links

PostPosted: Thu Jan 22, 2015 8:40 pm
by Enigman
I am creating a browser dialog box in my application to open with CustomWindow so I can display help information from my website. In order to make the help context sensitive, there are name links in the web pages in the format <a name="helpcontext"></a>. The links work fine if I am viewing the website in any external browser. But the internal browser object completely ignores everything in the URL after the # sign. I have tried many combinations of the check boxes on the object and nothing makes it work.

Am I missing something? Does the browser object just not support internal page links?

Thanks.

Re: Having trouble with browser using # name links

PostPosted: Thu Jan 22, 2015 11:22 pm
by HPW
Hello,

I ran into this problem some time ago when calling newlisp-help from ultraedit.
Beginning with IE7 the IE no more supports the # sign for jump targets.

As a workaround I wrote a tool that creates a temporary internet-link in the temp folder including the # and fire that instead.
http://www.newlispfanclub.alh.net/forum ... rter#p9930
Maybe you can code similar.

Regards

Re: Having trouble with browser using # name links

PostPosted: Fri Jan 23, 2015 1:03 am
by Enigman
Beginning with IE7 the IE no more supports the # sign for jump targets.

Oh for the sake of Pete. Microsoft seems determined to be the odd man out. Then every single browser except IE supports jump links. Why on earth would they do that?

As for your example, I don't have a clue what it is doing so I don't know how I would emulate it.

I tried using SendKeys to forceably scroll the browser object by sending {down}{down}{down}, but I can't seem to get it's attention. I tried moving the mouse onto the scroll bar and using ClickMouse but it seems to go whacko and scroll all the way to the bottom.

So I am open to other ideas for workarounds.

Alternatively, if anyone knows how to open an external browser in front of a screen saver, that would solve the problem. BTW, the screen saver is interactive so it will not exit if a window can be brought up in front of it. So far using InternetLink leaves the browser behind.

Thanks.

Re: Having trouble with browser using # name links

PostPosted: Fri Jan 23, 2015 8:44 am
by Wrangler
Did you focus the browser object before using sendkeys?

Re: Having trouble with browser using # name links

PostPosted: Fri Jan 23, 2015 9:00 am
by Enigman
Did you focus the browser object before using sendkeys?

Yes, I even tried programmatically mouse clicking on the browser center. I tried that because I noticed that when the Customwindow first opens if I press down arrow keys the browser does not react. But if I click the browser first and then press down keys it does react. Nothing helps. Programmatically the browser will not respond to SendKeys.

That's when I tried moving the mouse pointer to the scroll bar and clicking once below the slider. but instead of moving by one screen it goes whacko and scrolls all the way to the bottom after a single click.

Re: Having trouble with browser using # name links

PostPosted: Fri Jan 23, 2015 9:06 am
by Enigman
Wrangler,

BTW, if I click on the link to your website in your signature, I see your website but then my Kaspersky Internet security system goes nuts blocking attempts to push malware into my system from some URL with "Peoplesalmanac" in it.

You might want to look into that.

Re: Having trouble with browser using # name links

PostPosted: Fri Jan 23, 2015 9:24 am
by Wrangler
Thanks for the heads up. I have noticed a sharp decrease in visitors to highdesertsoftware.com recently. The peoplesalmanac site is also mine. It serves ads to ALL my other sites. I checked both sites at Securi:

http://sitecheck.sucuri.net/results/peoplesalmanac.info
http://sitecheck.sucuri.net/results/hig ... ftware.com

No malware found, so I have to assume that Kaspersky is coming up with false positives. I'll have to see how I go about getting delisted.

Re: Having trouble with browser using # name links

PostPosted: Thu Jan 29, 2015 3:00 pm
by fkapnist
Instead of this:

Code: Select all
<a href="#helpcontext">



Try this:

Code: Select all
<a href="javascript:location.hash ='helpcontext';">


.

Re: Having trouble with browser using # name links

PostPosted: Thu Jan 29, 2015 4:10 pm
by Enigman
I think you're describing internal links to jump down the page. My pages only have jump links targets in the format <a name="HelpContent"></a>. Then the jump takes place from the URL box by adding #HelpContent to the end of the URL. Although it would be nice to have the few internal links jump down the page, I am using Weebly for the website and I only have one way to jump internally and thats with a fully qualified URL. I cannot define links from selected paragraph text to anything like "javascript:location.hash ='helpcontext';" since Weebly will automatically change it to "http://javascript:location.hash ='helpcontext';". It's a significant shortcoming in their system just now. I could make the link using custom HTML, but then those would only be standalone links.

The real issue I need to solve is full URLS that will open the page and jump down in Internet Exploder.

Thanks.

Re: Having trouble with browser using # name links

PostPosted: Fri Jan 30, 2015 8:47 am
by dpayer
It appears that this issue is not just an IE issue but an HTML5 issue:

http://www.html-5.com/changes/deprecate ... e-tag.html

but if you look at this page, they give some alternatives to using 'anchors' (what you called jump links).