Solved

Help calling a function

Posted on 2015-01-13
5
158 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 33

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 33

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to dynamically set the form action using jQuery.

828 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