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.
|
|
|
 |
|