Paul Shearing
|
| Posted: 02/14/2006, 5:33 PM |
|
What, pray, am i doing wrong?
In my HTML, I have inserted (in a table) a block BEGIN and END comment between which I have declared an HTML variable that I wish to display a custom string. The HTML for the table row looks like this:
<tr>
<td style="VERTICAL-ALIGN: middle; BACKGROUND-COLOR: #ccffcc" colspan="2"><b><font face="Verdana" size="1">
<p style="TEXT-ALIGN: center"><br>
</font><font face="Verdana"><font color="#006600" size="2">
<!-- BEGIN Cappy -->
{Cappo}
<!-- END Cappy -->
<br></font></p>
</font></b></td>
</tr>
In the BeforeShow event for the Page I have the following:
Function Page_BeforeShow(Sender) 'Page_BeforeShow @1-A1547E8B
'Custom Code @10-73254650
' -------------------------
Dim i, do_AD, do_DB, do_WE, do_MO, do_QU, fstName, Q
i = GUFFvector(fstName, do_DB, do_WE, do_MO, do_QU, do_AD)
With Tpl
Q = "Hello " & fstName & ", Here are your available Online Data Services:"
Response.Write Q
.Block("Cappy").Variable("Cappo") = Q
.....other guff here
End With
' -------------------------
'End Custom Code
End Function 'Close Page_BeforeShow @1-54C34B28
When the page is displayed, I get a great big nothing in the table cell. The Response.Write proves that a) the page BeforeShow event is being executed b) expected values are returned by GUFFvector and c) that Q is a valid string. There is no outer level block (i.e. I am not using nested blocks).
There must be a simple reason for this, but I simply cannot see it.
Any help appreciated.
Paul
|
|
|
 |
mrachow
Posts: 509
|
| Posted: 02/14/2006, 11:33 PM |
|
I always using this oneEventCaller.TemplateBlock.Variable("Cappo") = Q
_________________
Best regards,
Michael |
 |
 |
Paul Shearing
|
| Posted: 02/15/2006, 9:40 AM |
|
Thanks Michael. Unfortunately, that didn't work for me because I think something else must be broken.
General Question: How do I introduce a new Block into HTML such that CCS will recognise it. At present, if I introduce a <!-- BEGIN Gubbins --> Some HTML Stuff <! END Gubbins --> construction into the HTML code, all that happens is that when the page is displayed in a browser, [Some HTML Stuff] disappears from view. I note that the documentation talks about only editing Blocks via their properties and taking care when editing them (qv HELP | Working With Documents | HTML Mode) but if I cannot manually introduce a Block this is not a lot of use.
Clearly I have missed something out that is important. What do blocks rely on? (i.e. must they appear within Record Blocks, how are they recognised by the CCS compiler, can they be introduced manually or do they have to be generated by the compiler? etc)
Kind regards
Paul 
PS The javaScript as per the above mentioned documentation is at the head of the HTML file.
|
|
|
 |
Walter Kempees
|
| Posted: 02/15/2006, 10:37 AM |
|
Paul,
I might be wrong or not grasping the problem but,
The Begin End Blocks will only be needed by the template manager, so I can't
imagine why you would use it, and I havent.
If it is show/no show you're after use Panel's assuming CCS3+.
The {Cappo} label, and I am reading your original text by the letter, has to
be inserted from the toolbox Form tab not the HTML tab.
So in concreto, regmove the BEGIN---END, remove the {Cappo} in HTML view,
then position your cursor richt after size="2">
and in the Toolbox->Form click the "A label" which should result in a
{Label1} in your Html and the properties window to show the properties of
the newly added label. In the Properties rename the Label1 to Cappo and
apply all the changes you need.
The in the properties of that label you can add coding to the BeforeShow as
described by mrachrow.
I think this will solve the problem, if not I'll read about it here.
Walter
<PaulShearing@forum.codecharge (Paul Shearing)> schreef in bericht
news:643f284e97e165@news.codecharge.com...
> What, pray, am i doing wrong?
>
> In my HTML, I have inserted (in a table) a block BEGIN and END comment
> between
> which I have declared an HTML variable that I wish to display a custom
> string.
> The HTML for the table row looks like this:
>
> <tr>
> <td style="VERTICAL-ALIGN: middle; BACKGROUND-COLOR: #ccffcc"
> colspan="2"><b><font face="Verdana" size="1">
> <p style="TEXT-ALIGN: center"><br>
> </font><font face="Verdana"><font color="#006600" size="2">
> <!-- BEGIN Cappy -->
> {Cappo}
> <!-- END Cappy -->
> <br></font></p>
> </font></b></td>
> </tr>
>
>
> In the BeforeShow event for the Page I have the following:
>
> Function Page_BeforeShow(Sender) 'Page_BeforeShow @1-A1547E8B
>
> 'Custom Code @10-73254650
> ' -------------------------
> Dim i, do_AD, do_DB, do_WE, do_MO, do_QU, fstName, Q
> i = GUFFvector(fstName, do_DB, do_WE, do_MO, do_QU, do_AD)
>
> With Tpl
> Q = "Hello " & fstName & ", Here are your available Online Data
> Services:"
> Response.Write Q
> .Block("Cappy").Variable("Cappo") = Q
> ....other guff here
> End With
> ' -------------------------
> 'End Custom Code
>
> End Function 'Close Page_BeforeShow @1-54C34B28
>
> When the page is displayed, I get a great big nothing in the table cell.
> The
> Response.Write proves that a) the page BeforeShow event is being executed
> b)
> expected values are returned by GUFFvector and c) that Q is a valid
> string.
> There is no outer level block (i.e. I am not using nested blocks).
>
> There must be a simple reason for this, but I simply cannot see it.
>
> Any help appreciated.
>
> Paul 
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
mrachow
Posts: 509
|
| Posted: 02/15/2006, 11:41 AM |
|
Ah..., yes Walter is right.
I forgot to mention that {Cappo} had to be simply entred manually into HTML here.
_________________
Best regards,
Michael |
 |
 |
Paul Shearing
|
| Posted: 02/15/2006, 6:33 PM |
|
Thanks Walter and Michael.
Between you, you have managed to straighten me out. I was suffering from a severe bout of muddled thinking. Actually, I do need to use blocks because I am performing the neat trick of disabling buttons (using SetVar) according to various criteria (this example is in the help files). However, you're quite right, I do not need blocks for the setting of my label caption - which was my original question. For the record (in case others read this thread) the answer is, as Walter said, to insert a Forms label and then to set its value in the BeforeShow event thus:
Cappo.Value = Q
sooo simple. The dull thudding that you can hear right now, as you are reading this, is me kicking myself black and blue. My mistake was to approach it from the wrong end by typing block syntax directly into HTML rather than using CCS inserted labels.
I'm most grateful to you both.
Paul
|
|
|
 |
Walter Kempees
|
| Posted: 02/16/2006, 1:56 AM |
|
Your welcome, 'm happy.
<PaulShearing@forum.codecharge (Paul Shearing)> schreef in bericht
news:643f3e4600b531@news.codecharge.com...
> Thanks Walter and Michael.
>
> Between you, you have managed to straighten me out. I was suffering from a
> severe bout of muddled thinking. Actually, I do need to use blocks because
> I am
> performing the neat trick of disabling buttons (using SetVar) according to
> various criteria (this example is in the help files). However, you're
> quite
> right, I do not need blocks for the setting of my label caption - which
> was my
> original question. For the record (in case others read this thread) the
> answer
> is, as Walter said, to insert a Forms label and then to set its value in
> the
> BeforeShow event thus:
>
> Cappo.Value = Q
>
> sooo simple. The dull thudding that you can hear right now, as you are
> reading
> this, is me kicking myself black and blue. My mistake was to approach it
> from
> the wrong end by typing block syntax directly into HTML rather than using
> CCS
> inserted labels.
>
> I'm most grateful to you both.
>
> Paul 
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Kim Shearing
|
| Posted: 06/01/2006, 1:01 PM |
|
Hello Paul. What I want to ask you got nothing todo with your subject. Is your full name Paul Michael Shearing?
|
|
|
 |
|