JSPMaker Custom Tags Example

JSPMaker provides more flexibility to customize your generated codes by supporting tag customization. You can override an existing replacement tag or create your own replacement tags to suit for different needs. To do this you need to write your own VBScript module and save it to the User Code File (usually C:\JSPMaker\src\usercode.txt) for the changes to take effect.

Please see below for examples of tags customization.

Example 1. Override an existing Replacement Tag

Task:
Assume you have a "Users" Table with a "Country" Field which has been set to a combo box. You want to skip generating the "Please Select" option for this field.

Steps:
Create the following module in the User Code File to override the "FIELDEDIT_SELECT" tag.

Function FIELDEDIT_SELECT(str)
  Dim wrkstr
  If Table.TblName = "Users" And Field.FldName = "Country" Then
    wrkstr = Replace(str,"<OPTION value=''><--##@PleaseSelect##--></OPTION>","")
  Else
    wrkstr = str
  End If
  FIELDEDIT_SELECT = wrkstr
End Function

Example 2: Create your own Replacement Tags

Task:
Assume you have a "Users" Table and you want to create a help page for this table and link it from the list page.

Steps:
1. Create the help page file (say userhelp.htm) using standard Html Editor.
2. Override the "tablecaption" tag to add a reference to a new tag (say "userhelp") next to the table caption.

Function tablecaption(str)
  Dim wrkstr
  If Table.TblName = "Users" Then
    wrkstr = str & "&nbsp;<--##userhelp##-->"
  Else
    wrkstr = str
  End If
  tablecaption = wrkstr
End Function

3. Create the following module in the User Code File to process the new tag ("userhelp").

Function userhelp(str)
  If Ctrl.CtrlID = "list" Then
    userhelp = "<a href='userhelp.htm'>Help</a>"
  Else
    userhelp = ""
  End If
End Function

 


Products


User Comments on ASPMaker


"Well done all, what ground breakers!!!!"
"You guys are the only people I know in software development who seem to get it right every time and actually take the time to listen to their audience requests."

"You don't know what you're missing!"
"I tested this product on one of my existing databases to see what it would produce; in less than 5 minutes I was purchasing a license for ASPMaker. If you code JSP pages from scratch, this will save you over 40 hours of work, easily! HIGHLY RECOMMENDED!!!"

"Essential Tool for REAL webmasters!"
"So easy to use, so affordable. Once I got it, I found more and more uses for it. I am not a programmer, yet I found ASPmaker to be extremely quick and easy to learn."

"Incredible"
"As a VB programmer, I would have to say that you guys have an incredible software. Good for you!!! To write that much code manually, would take days. I recommend this to anyone who is planning on writing code to interact with any ODBC Database. If you understand programming, you will appreciate it very much."

 

 ©2004-2025 e.World Technology Ltd. All rights reserved.