Insert links into List

Tips submitted by ASPMaker users

Insert links into List

Postby mastercafe » Thu Jun 06, 2013 4:15 am

On your AspMaker project open any table:
- goto Code (server Events, client script)
- Expand: Server Events / Table Specific / Common / Row_Rendering
- On the right side you can see this main code:

' Row Rendering event
Sub Row_Rendering()
If Not EW_DEBUG_ENABLED Then On Error Resume Next
' Enter your code here
End Sub

Add this code in the position indicate:

dim tmpzona, tmpexpand
if tmpzona<>"" then
'create the text that contain the URL to use
tmpzona="<a href=""anothertablelist.asp?cmd=search&t=anothertable&z_anotherfield=LIKE&x_anotherfield=" & yourtable.yourfield.Currentvalue & """ target=""_self"">"
tmpzona=tmpzona & yourtable.yourfield.Currentvalue & "</a>"
'same sample but adding an image contained in images folder and inserting HighSlide link
tmpexpand="<a class=""highslide"" target=""_Blank"" onclick=""return hs.htmlExpand(this,{outlineType:'rounded-white',wrapperClassName:'draggable-header full-size',objectType:'iframe', height:600})"" href=""anothertable.asp?cmd=search&t=anothertable&z_anotherfield=LIKE&x_anotherfield=&nomenu=1" & yourtable.yourfield.Currentvalue & """>"
tmpexpand=tmpexpand & "<img src=""images/expand.gif"" alt=""Expand"" /></a>"
'in the final result put both text separated by space
yourtable.yourfield.Currentvalue= tmpexpand & "&nbsp;" & tmpzona
end if

Change yourtable by your table name
Change yourfield by your field to use like link
Change anothertable by your Another table to list
Change anotherfield by your Field from this another table to do a search on it
Change HighSlide link method if you want to use Shadowbox, LightBox or similar plugin

We add the nomenu=1 parameter created by us to quit the menu and footer section when use highslide link method. Check this method in another post.
Posts: 6
Joined: Sun Jan 27, 2013 1:45 am

Return to User Submitted Tips (ASPMaker)