We help IT Professionals succeed at work.

Force focus on activex when loaded html page

ST3VO
ST3VO asked
on
1,092 Views
Last Modified: 2013-11-18
Hi experts,

I have written an acivex control and loaded it via a html page.
The problem is that I need to click on it for it to be active.

Is there any way to Force focus on activex when loaded html page please?

Thanks

ST3VO
Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
OK...I'll give it a shot! :o)

Author

Commented:
Hmm...

This is the whole code on the html file:

I don't know javascript although I know what you mean...could you help me with the code please?




<HTML>
<H1>ActiveX TEST</H1><p>
<HR><center><P>
<OBJECT
          classid="clsid:A40AF7B5-BD46-4888-BC22-7672B7C3F41F"
          codebase="./MyActiveX.ocx#version="
          width=215
          height=140
          align=center
          hspace=0
          vspace=0
>
</OBJECT>
</HTML>

Open in new window

Author

Commented:
I have done this but it's not loading any activeX :o/

Here is the html page:

<HTML>
<head>
 <script language="javascript" src="./inc.js" />
</head>
<H1> TEST</H1><p>
<HR><center><P>
</HTML>


Here is the inc.js file:

document.writeln("<object");
document.writeln("classid="clsid:A40AF7B5-BD46-4888-BC22-7672B7C3F41F"");
document.writeln("codebase="./MyActiveX.ocx#version="");
document.writeln("width=215");
document.writeln("height=140");
document.writeln("align=center");
document.writeln("hspace=0");
document.writeln("vspace=0");
document.writeln(">");
document.writeln("</object>");

Any ideas why it doesn't work please?



Author

Commented:
Anyone please?

Author

Commented:
Never mind! Got it working now!! Thanks :o)
Sorry i was bit away pulling my matters...good to hear you solved it.

Author

Commented:
No problem...thanks for the solution! Works great! :o)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.