CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 ASP Help

Print topic Send  topic

Author Message
DragonSlayer
Posted: 04/03/2003, 8:36 AM

Ok I am having a problem where I have a function that requires a parameter to be sent. My problem is that I run the function with a OnClick even on a hyperlink but the catch is that it is made dynamically. Here is an Example:

Response.Write "<a href='JavaScript:void(0)' OnClick='SendData(" & Parameter & ")>Link</a>

the parameter is from some code that was made to grab a directory tree structure on a server we have.
Edd
Posted: 04/03/2003, 4:56 PM

The trick it to create the HTML and javascript in the BeforeShow event, i.e.

1. Right click the Image and Change the Image to a Label.
2. On the properties tab change the Content from "Text" to "HTML"
3. Create a "BeforeShow" event for the Label.

Then add Code such as
Function MyDataSource.Label.BeforeShow() '*** This would be Generated

Dim strParam
Dim strHTML
strParam = MyDataSource.DataSource.RecordSet.Fields("ParamField")
strHTML = "<a href='JavaScript:void(0)' OnClick='SendData(" & strParam & ")>" & strParam & "</a>"
MyDataSource.Label.Value = strHTML

End Function '*** This would be Generated

Hope this helps

Edd
DragonSlayer
Posted: 04/04/2003, 7:43 AM

Thank you very much for your help I will try that out hope it works.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.