Source language: Translate to:

Having trouble with browser using # name links

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Having trouble with browser using # name links

Postby Enigman » Thu Jan 22, 2015 8:40 pm

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.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Having trouble with browser using # name links

Postby HPW » Thu Jan 22, 2015 11:22 pm

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
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Having trouble with browser using # name links

Postby Enigman » Fri Jan 23, 2015 1:03 am

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.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Having trouble with browser using # name links

Postby Wrangler » Fri Jan 23, 2015 8:44 am

Did you focus the browser object before using sendkeys?
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1506
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: Having trouble with browser using # name links

Postby Enigman » Fri Jan 23, 2015 9:00 am

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.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Having trouble with browser using # name links

Postby Enigman » Fri Jan 23, 2015 9:06 am

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.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Having trouble with browser using # name links

Postby Wrangler » Fri Jan 23, 2015 9:24 am

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.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1506
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: Having trouble with browser using # name links

Postby fkapnist » Thu Jan 29, 2015 3:00 pm

Instead of this:

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



Try this:

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


.
User avatar
fkapnist
 
Posts: 348
Joined: Mon Nov 17, 2014 4:24 pm
Location: Greece

Re: Having trouble with browser using # name links

Postby Enigman » Thu Jan 29, 2015 4:10 pm

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.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Having trouble with browser using # name links

Postby dpayer » Fri Jan 30, 2015 8:47 am

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).
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1382
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest