Links to Aware IM operations

Contains tips for configurators working with Aware IM
Post Reply
technopak
Posts: 287
Joined: Thu Dec 04, 2008 2:16 pm

Links to Aware IM operations

Post by technopak »

Bloomin heck, I'm getting weary trying to get Links to Aware IM operations to work as they should.

I have a link in a HTML cell of a form which is coded as follows -

<a href="javascript::AwareApp.runQuery('MyQuery','main')">Test Link</a>

It just doesn't work.

I also have a link in an image coded as follows -

<a href="javascript::AwareApp.showPerspective('TestPerspective')"><img src="Logo.gif" width="150" height="109" /></a>

And guess what, it doesn't work either. The links show up as links in the application, but any amount of clicking them won't cause the embedded function to trigger.

Can someone please comment on what I'm doing wrong ?

I've followed the rather sparse instructions in Appendix D of the User Guide, and have tested quite a bit, specifically referring to the posts here http://www.awareim.com/forum/viewtopic. ... javascript, and to be honest I'm getting a bit tired of things not working as described in the Guide.

I could well be doing something wrong, but it seems to me that the links simply aren't working.

I'd be really glad of some pointers.

Peter
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Peter,

I have not used the features in Appendix D, but if you want to accomplish these via a Process, you could use the custom button described at:

http://www.awareim.com/forum/viewtopic.php?t=3005
Tom - V8.8 build 3137 - MySql / PostGres
pbrad
Posts: 781
Joined: Mon Jul 17, 2006 11:03 pm
Location: Ontario, Canada

Post by pbrad »

Hi,

I played around with this a little bit with inconsistent results depending on whether you called the query into your Main tab or into a new_tab. Also, it works inconsistently depending whether you are calling the form from a process or just editing an object.

The following two lines of code work in different scenarios above:

<a href="javascript:AwareApp.runQuery('query','new_tab')" >Query</a>
<a href="javascript:AwareApp.startProcess('runquery','Main')" >Query from process</a>

The first line calls the query directly and the second line calls a process with displays the query. The second approach seems to be more bulletproof but still doesn't work in both scenarios(form origin and target window)

If you play around with my examples you hopefully will find something that works for you. Try changing the target between new_tab and Main and try creating a process to edit the form vs editing it from and object search query results.

(Unless Support have any words of wisdom)

cheers,
Pete
technopak
Posts: 287
Joined: Thu Dec 04, 2008 2:16 pm

Post by technopak »

Thanks again Tom and Pete for the support.

What I'm really trying to do is call the various Aware operations which make up my application from HTML pages.

My reading of the user Guide indicates that this should be quite easy to achieve. Unfortunately, I have been unable to get my system to operate as the Guide says it should.

This is both disappointing and frustrating.

Has anyone managed to get links from a HTML page to initialise Aware processes, or achieve any of the functionality of Appendix D operations ?

Peter
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Can you try this:

<a href="#" onclick="AwareApp.startProcess('runquery','main'); return false;" >Query from process</a>

Note about the "new_tab" option - it won't work if you do not have already some tabs on the screen. There must be at least one existing.
Aware IM Support Team
pbrad
Posts: 781
Joined: Mon Jul 17, 2006 11:03 pm
Location: Ontario, Canada

Post by pbrad »

Hi,

Bear in mind that I don't have an issue with this, I am just trying to help out.

My findings are that <a href="javascript:AwareApp.startProcess('runquery','main')" >Query from process</a> runs identically to <a href="#" onclick="AwareApp.startProcess('runquery','main'); return false;" >Query from process2</a>

and

<a href="javascript:AwareApp.runQuery('RegUsers','main')" >Query</a> runs identically to <a href="#" onclick="AwareApp.runQuery('RegUsers','main')" >Query2</a>

They all work properly if the html cell is in a form that is called from outside a process. If the form is called from inside a process the 'Query' code opens up the query behind the form which is in an ajax layer whereas the 'Query from process' replaces the form with the query.

So, all said, it seems to all work properly to me. Peter, I also tried creating an html page and importing it into the main panel of the visual perspective and it worked properly also. I suspect that you just had an error in your syntax somewhere(it is easy to do this, I did too). Try copying and pasting the exact syntax above and once you replace your query name or process name you shouldn't have any issues.

Pete
technopak
Posts: 287
Joined: Thu Dec 04, 2008 2:16 pm

Post by technopak »

Hi support, Pete and Tom,

Thanks for the comments.

Remember, I am trying to link to the Aware operations from a HTML page in a content panel, so some of the suggestions aren't exactly what I'm after.

However, the link to a process which runs a query works just fine from within an Aware-generated form, but the same link does nothing when triggered from my HTML content panel.

Curiously, when I hold the mouse over the link in the HTML panel, the target shows up as the HTML page itself, and not the AwareApp function.

I'm beginning to wonder has this got to do with the way I am importing the HTML content as mentioned here http://www.awareim.com/forum/viewtopic.php?t=3094.

Further suggestions much appreciated.

Peter
pbrad
Posts: 781
Joined: Mon Jul 17, 2006 11:03 pm
Location: Ontario, Canada

Post by pbrad »

Hi,

Basic troubleshooting methodology is to eliminate all other possible causes of your problem. I was successful in importing an html file which had a link calling a process and I can't see why it wouldn't work for you.

If you suspect that your html file may be the cause of the problem, just create a simple html file in notepad that contains nothing other than the link and import it. Have you tried naming the specific tab that your html file is presented in as the target of the link?

Pete
technopak
Posts: 287
Joined: Thu Dec 04, 2008 2:16 pm

Post by technopak »

Hi Pete,

Looks like I'll have to do some troubleshooting for certain.

I'll follow your suggestion and post back again later,

Peter
technopak
Posts: 287
Joined: Thu Dec 04, 2008 2:16 pm

Post by technopak »

Hi all,

I've followed Pete's suggestion and created a simple HTML page with just three lines in it as follows -

<body background="Green Background.jpg">

<a href="#" onclick="AwareApp.startProcess('CreateEmail','main'); return false;" ><IMG src="Logo.gif" width=150 height=109 border=0></a>

<a href="javascript:AwareApp.startProcess('CreateEmail','main')" >Query from process</a>
<BR>
<BR>

<a href="javascript:AwareApp.showPerspective('Test')" >Change Perspective</a>

In a standard browser, the HTML page displays correctly - background and links.

When I import the HTML into a panel, the application displays the HTML links in the content panel, and the links work as expected. This is a big improvement :-)

However, the page background doesn't show at all. The various links are displayed on a plain white background. If I could get the background to display, I'd almost be where I want to be with this.

I did read something somewhere about the difficulty using a background tag in a content panel. Something to do with Aware ignoring the tag because it would affect the entire page, not just the content panel.

So the question now is - can a background image be used in a content panel's HTML ?

Thanks for the help so far,

Peter
pbrad
Posts: 781
Joined: Mon Jul 17, 2006 11:03 pm
Location: Ontario, Canada

Post by pbrad »

Hi,

Instead of entering the image as a page background, add a table to the page with 100% width and height and enter the image as the background of the table and I think that you will find that it will work.

Cheers,
Pete
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Pete is right. BODY and STYLE tags are NOT SUPPORTED in the custom HTML.
Aware IM Support Team
technopak
Posts: 287
Joined: Thu Dec 04, 2008 2:16 pm

Post by technopak »

Thank you gentlemen !

Pete's suggestion works perfectly.

And the import function seems to like the simple HTML rather than the page I composed in Dreamweaver - the links are working properly too :-)

Thanks again,

Peter
Post Reply