Discussion

Calling an activity on click of Text(hyperlink).

Hi All,

I am trying to make a Text appear like a hyperlink, and on the click of the link I need to call an activity. Can you please help me.

thanks,

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

August 16, 2010 - 7:35am

The Syntax should be

<a href="" on click= myFunction() >Phone Number
</a>

The write your java script in a separate file .... like this

myFunction()
{
SafeURL osafeURL = new SafeURL(Rule-Obj-Activity ClassName.YourActivityName);
osafeURL.putString(Property , value );
openQueryByHandle(osafeURL.URL);
}

you can used use encrypt method also .. in the safeURL

by

Karthick

August 6, 2010 - 5:34pm

What does this Activity need to do?.

Thanks!

August 9, 2010 - 9:18am

The activity makes an outbound call. I want the Phone-number to appear as a link and on the click of the number make an outbound call.

August 9, 2010 - 10:22am

quote:


Originally posted by aguptaPega

The activity makes an outbound call. I want the Phone-number to appear as a link and on the click of the number make an outbound call.

Hope this helps You!

<a href="javascript:openQueryByHandle('','Rule-Obj-Activity ClassName.YourActivityName&pyAgeLimitInDays=90')">
Phone Number
</a>
Thanks!

August 9, 2010 - 1:22pm

ASHWIN16NOV: you are using the wrong syntax for calling an activity via URL.

August 9, 2010 - 1:33pm

quote:


Originally posted by JonGarfunkel

ASHWIN16NOV: you are using the wrong syntax for calling an activity via URL.

Jon,

Please update me with ur piece of code? Hope that helps me replacing my stuff in code.

Thanks!

August 23, 2010 - 11:37pm

Hi,
You can use the below code snippet as well.
<a href="" onClick= "outBoundCall();">Phone Number
</a>

<script>
outBoundCall()
{
var URL = "?pyActivity=<className>.<ActivityName>&<param1>="+<if any parameter from html element or javascript>;
var response=httpRequestAsynch(URL,null,50,200);
}
</script>

Thanks

May 21, 2014 - 8:50am

Hi,

Where does the above code needs to be written,Javascript code.

 

Thanks

May 21, 2014 - 8:54am

Hi,

Can anyone help me on below query

How can i call a javascript on clicking the link(used pxlink control).I am unable to get it through Advanced run script.

Thanks

Ajay