Solved

Help calling a function

Posted on 2015-01-13
5
153 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
ID: 40546685
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
ID: 40548183
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
ID: 40548192
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
ID: 40548902
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
ID: 40548923
We fixed it last night, thanks for the help !
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 …
Read about why website design really matters in today's demanding market.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

932 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

9 Experts available now in Live!

Get 1:1 Help Now