Solved

Help calling a function

Posted on 2015-01-13
5
147 Views
Last Modified: 2015-01-14
I need to call a function from a button.

The function is:

Set QFEBridge = CreateObject("QFEBridgeTest. clsQuickBridge ")
Result = QFEBridge.CallQuick()

What it will do is (commented for now):

'Check for errors in running the Quik! Forms Engine
 If objQFE.Results.ErrorFlag Then
 strHtml = "ErrorFlag = 1"
 Else
 'Redirect to the HTML file
 'Dim objFile As QuikFormsEngine.QuikFormOutput
 'For Each objFile In arrFiles
 ' Dim strFileName As String = objFile.FullName
 ' If strFileName = "" Then
 ' strFileName = "ERROR! No forms were generated."
 ' Response.Write(strFileName)
 ' Else
 ' Response.ContentType = "text/html"
 ' Response.Redirect(strFileName)
 ' End If
 'Next

 'Write the HTML file out as a response

The image that should call the function is:

<IMG border=0 alt="Open Form" src="../../../Images/icedit.gif" width=16 height=16>

How can I add code to that image so that it calls the function which should open a page and parse some code.
0
Comment
Question by:amucinobluedot
  • 3
  • 2
5 Comments
 
LVL 32

Accepted Solution

by:
Big Monty earned 500 total points
Comment Utility
i would add a query string to the url call from the image so that its flagged a certain way, meaning it'll only run that code with a specific query string key/value:

<a href="page.asp?qbridge=y"<IMG border=0 alt="Open Form" src="../../../Images/icedit.gif" width=16 height=16></a>

Open in new window


then, on page.asp, you would do:

if Request.QueryString("qbridge") = "y" then
   Set QFEBridge = CreateObject("QFEBridgeTest. clsQuickBridge ")
   Result = QFEBridge.CallQuick()

   'Check for errors in running the Quik! Forms Engine
    If objQFE.Results.ErrorFlag Then
      strHtml = "ErrorFlag = 1"
    Else
     'Redirect to the HTML file 
     'Dim objFile As QuikFormsEngine.QuikFormOutput 
     'For Each objFile In arrFiles 
    ' Dim strFileName As String = objFile.FullName 
    ' If strFileName = "" Then 
       ' strFileName = "ERROR! No forms were generated." 
       ' Response.Write(strFileName) 
    ' Else 
       ' Response.ContentType = "text/html" 
      ' Response.Redirect(strFileName) 
    ' End If 
   'Next
end if

Open in new window

0
 

Author Comment

by:amucinobluedot
Comment Utility
page.asp has the attached code but returns an error saying that the page could not create the active X

Error Microsoft VBScript while executing error '800a01ad'

The ActiveX control could not create object: 'QFEBridgeTest. clsQuickBridge '

/bluedot/Intranet/Cases/Forms/page.asp, line 7

Any clues ?
0
 

Author Comment

by:amucinobluedot
Comment Utility
Microsoft VBScript runtime error '800a01ad'

ActiveX component can't create object: 'QFEBridgeTest. clsQuickBridge '

/bluedot/Intranet/Cases/Forms/page.asp, line 7


I tried registering the .dll but it is not registering it, I get an error that the entry point could not be found.
0
 
LVL 32

Expert Comment

by:Big Monty
Comment Utility
my guess is a permissions issue, make sure whatever account that runs the site has access to where the dll resides
0
 

Author Comment

by:amucinobluedot
Comment Utility
We fixed it last night, thanks for the help !
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now