?
Solved

Error 47 Permission Denied in IE6

Posted on 2005-03-08
5
Medium Priority
?
161 Views
Last Modified: 2010-04-04
Hi

Using Delphi 2005 Pro /  Intraweb 7.2 / IE version 6.0.2900.2180 / XP Home SP2

I need to have a button on an Intraweb form that simply brings up the browser search window (i.e. emulates the CTRL-F keystrokes).  The following code brings the window up fine but when I try to execute the search I get "Error 47 Permission Denied".  I don't get the error when I just hit CTRL-F.  I presume this is some IE automation security protection but is there a work around?

  keybd_event(VK_CONTROL, 0, 0, 0);
  keybd_event(70, 0, 0, 0);
  keybd_event(70, 0, KEYEVENTF_KEYUP, 0);
  keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0);

Many Thanks

0
Comment
Question by:AndyBarrow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 13

Accepted Solution

by:
BlackTigerX earned 250 total points
ID: 13490328
...you have to remember that the code behind executes on the server, not on the client

try searching some javascript to accomplish this task on the client side (browser)
0
 

Author Comment

by:AndyBarrow
ID: 13563612
Yup makes sense.  Don't think Javascript will allow key emulation though for security reasons.
0
 

Author Comment

by:AndyBarrow
ID: 13726889
Hi

Apologies for delay.  Haven't managed to find any JS to do this because of the obvious security implications of key emulation but find it hard to beleive that a browsers search function cannot be invoked somehow!?  I will award points 'cos strictly speaking you answered my question (even though with hindsight it was a bit of a dumb one  : )

regards
Andy.
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 13733195
you can use something like this:

http://www.javascripter.net/faq/searchin.htm

<form name="f1" action=""
onSubmit="if(this.t1.value!=null && this.t1.value!='')
findString(this.t1.value);return false"
>
<input type="text" name=t1 value="" size=20>
<input type="submit" name=b1 value="Find">
</form>

<script language="JavaScript">
<!--
var TRange=null

function findString (str) {
 if (parseInt(navigator.appVersion)<4) return;
 var strFound;
 if (navigator.appName=="Netscape") {

  // NAVIGATOR-SPECIFIC CODE

  strFound=self.find(str);
  if (!strFound) {
   strFound=self.find(str,0,1)
   while (self.find(str,0,1)) continue
  }
 }
 if (navigator.appName.indexOf("Microsoft")!=-1) {

  // EXPLORER-SPECIFIC CODE

  if (TRange!=null) {
   TRange.collapse(false)
   strFound=TRange.findText(str)
   if (strFound) TRange.select()
  }
  if (TRange==null || strFound==0) {
   TRange=self.document.body.createTextRange()
   strFound=TRange.findText(str)
   if (strFound) TRange.select()
  }
 }
 if (!strFound) alert ("String '"+str+"' not found!")
}
//-->
</script>
0
 

Author Comment

by:AndyBarrow
ID: 13734199
Many thanks for that.  I'll give that a go asap.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question