ASP (classic, not .NET) function that interprets some propriatary tags
$100-200 USD
Πληρώθηκε κατά την παράδοση
We need an ASP function (classic ASP) that reads and interprets an html file. This html file has the usual tags + some "meta language" tags such as IF, LOOP, VALUE.
The function has two parameters IN : a recordset, and a file name. It has to :
1- read the file and put it in a string
2- interprets the "meta language" and deploys it
<%
Function f_MyFunction(rs, sFileName)
Dim sHTML
' Read file
sHTML = ...
' Interprets file
sHTML = ...
' Out
f_MyFunction = sHTML
End function
%>
**osIF**
The HTML within this tag has to be displayed only when condition is satisfied.
Syntax : <osIF field="field1" condition="=" value="abc">HTML here bla bla</osIF>
**osVALUE**
This simple tag has to send back the value of the recordset :
<osVALUE field="field1" operation="value"/> has to be replaced by the value of rs("field1").
**osLOOP tag**
<osLOOP loop="5">bla bla bla </osLOOP> has to repeat the inner html the number of times of the parameter loop
## Deliverables
We need an ASP function (classic ASP) that reads and interprets an html file. This html file has the usual tags + some "meta language" tags such as IF, LOOP, VALUE.
The function has two parameters IN : a recordset, and a file name. It has to :
1- read the file and put it in a string
2- interprets the "meta language" and deploys it
<%
Function f_MyFunction(rs, sFileName)
Dim sHTML
' Read file
sHTML = ...
' Interprets file
sHTML = ...
' Out
f_MyFunction = sHTML
End function
%>
**- osIF tag**
The HTML within this tag has to be displayed only when condition is satisfied.
Syntax : <osIF field="field1" condition="=" value="abc">HTML here bla bla</osIF>
the "HTML here bla bla" part has to be displayed only when the recordset of field1 equals to 32 : rs("field1") = 32.
Only the "=" and "<>" conditions has to be done in this first project.
The programm has to deal with several osIF tags one into another :
<osIF field="field1" condition="=" value="abc">HTML here bla bla</osIF>
bla bla bla
<osIF field="field2" condition="=" value="def">HTML here blou blou</osIF>
other HTML
</osIF>
The programm has to use reccursive coding.
Exemples :
If the HTML file has the following content :
hello world
<osIF field="field1" condition="=" value="abc">HTML here bla bla</osIF>
bli bli bli
<osIF field="field2" condition="=" value="def">HTML here blou blou</osIF>
other HTML
</osIF>
bye bye world
- when the function is called with a rs parameter with rs("field1")="abc" and rs("field2")="def" it has to send back :
hello world
HTML here bla bla
bli bli bli
HTML here blou blou
other HTML
bye bye world
- when the function is called with a rs parameter with rs("field1")="ab" and rs("field2")="de" it has to send back :
hello world
bye bye world
- when the function is called with a rs parameter with rs("field1")="abc" and rs("field2")="de" it has to send back :
hello world
HTML here bla bla
bli bli bli
other HTML
bye bye world
**- osVALUE tag**
This simple tag has to send back the value of the recordset :
<osVALUE field="field1" operation="value"/> has to be replaced by the value of rs("field1").
<osSUM field="field1,field2,field3" operation="sum"/> has to be replaced by the value corresponding to the sum of rs("field1") + rs("field2") + rs("field3")
**- osLOOP tag**
<osLOOP loop="5">bla bla bla </osLOOP> has to repeat the inner html the number of times of the parameter loop
- the different tags can be included each in one other and combined.
- A simple control on tags need to be done : closing tags exists when needed, parameters inside tags are complete.
Ταυτότητα Εργασίας: #3764591