Re: How to create hyperlink in the page already opened?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



In Line.

"Jack" <replyto@it> wrote in message news:uUj$xr8LIHA.4228@xxxxxxxxxxxxxxxxxxxxxxx
Thanks for the info.
I cannot find answer to these questions:
1.
Do I need an icon placed on IE taskbar (to do what I want to do)?
No, an icon is not mandatory, you can add an entry in the Tools dropdown menu.
However, adding an icon to the toolbar is a simple task that is done
by the installer when you install your program / BHO, and having a visible
icon is much easier for the user to see / find / click.

I use Inno Setup as my installer.

2.
Is that a requirement for BHO?
No, the answer to 1 applies.

3.
Why there is that convulsing method of creating GUIDS etc, instead of just making a simple entry into
registry?

Because that's the only way Internet Explorer will honor the additions to it's
menus and toolbar.
If you have Visual Studio installed along with your VB 5, you have a program that will create your GUID
for you
It's called GUIDGEN.EXE and lives in C:\Program Files\Microsoft Visual Studio\COMMON\Tools

4.
Creating button running a script
-------------------------------
does it apply to java script or some other script?

I "think" it could be done with javascript.
remember the old IE 5 web accessories tool?
It had functions called from the IE context menu which
were nothing more than javascript in a html file. One of them
allowed you to highlight text in a page and since I still have it / use it
so here is the script in it's entirety. It's contained in a file named highlight.htm
which lives in C:\WINDOWS\Web:
<HTML>
<script LANGUAGE="JavaScript" type="text/javascript" defer>
var parentwin = external.menuArguments;
var doc = parentwin.document;
var sel = doc.selection;
var rng = sel.createRange();
var str = new String(rng.text);
rng.execCommand("BackColor",0,"YELLOW");
</script>
</HTML>
and is called by the entry in this registry key:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt
the entry is simply: C:\WINDOWS\WEB\highlight.htm
set as the default value.

This method does not require a GUID

is it possible to make IE to run that script automatically (without clicking on that button)?

Not a script that's external to the website for the page that's being loaded.
Meaning a script that's contained on the users system
IE can only run a script that's contained or referenced within the document that's loaded,
being loaded.
Unless........ it's added as a valid addin in IEs addin list.

Something else to keep in mind, all bets are off for something like
this working in Vista.


--

Steve Easton
Microsoft MVP FrontPage
FP Cleaner
http://www.95isalive.com/fixes/fpclean.htm
Hit Me FP
http://www.95isalive.com/fixes/HitMeFP.htm



.



Relevant Pages

  • Re: javascript: icon gets lost - bookmark this page
    ... The script has nothing to do with adding an icon. ... This is> working, however, the icon defined does not show up in favorites. ... > var bookmarkurl=http://www.myurl.net> var bookmarktitle="My Homepage" ...
    (microsoft.public.frontpage.programming)
  • Re: window object
    ... Within a script, every reference to an object amounts to two ... calls from the scripting engine to the DHTML Object Model. ... var sText = document.all.div1.innerText; ...
    (comp.lang.javascript)
  • Re: Change IP related values due to WAN design change
    ... Unknown network, ... For the cost of testing a dangerous script in a big ... > recurse your text file into an array. ... > var newSettings = new NetworkSettings; ...
    (microsoft.public.windows.server.scripting)
  • Re: problem with logoff script
    ... the script engine as a process on the workstation and should execute cleanly ... var fso = new ActiveXObject; ... sho.popup('An error occured attempting to get the Operating System Type. ... // Retrieve the script application ...
    (microsoft.public.win2000.group_policy)
  • Re: Script for adding and deleting rows to a table
    ... that is one long script. ... var numRows = document.getElementById.rows.length; ... //Get Reference to cell that needs to be changed ...
    (comp.lang.javascript)