NetTalk Central

Author Topic: Timer on WebSource does not work INCLUDING A FORM (Ex 24)  (Read 2718 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1849
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Timer on WebSource does not work INCLUDING A FORM (Ex 24)
« on: August 11, 2012, 08:02:31 AM »
Hi Bruce,
As yo may recall, I´m trying to add a Marquee to a Header, I need the Marquee to be refreshed every nn minutes.
You have modify the menus for the WebSource timer to work ok in 6.39
If you compile & run the attached ex 24 as is you can see the PageHeaderTag timer every 1 second and the MailboxBrowse refresh every 2 seconds.
Now if you go to the PageHeaderTag,xhtml tab, and remove the FALSE in the XHTML code, this will insert the SearchFrom proc to the header.
This SearchForm is simplified but it is used to search some data and to display the marquee.
Now compile and run and you can see the PageHeader timer does not work.
Any Idea of what can I do to make it work?
Regards
Alberto

[attachment deleted by admin]
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: Timer on WebSource does not work INCLUDING A FORM (Ex 24)
« Reply #1 on: August 13, 2012, 01:44:09 AM »
Hi Alberto,

unfortunately I can't try your example because you didn't include the dictionary. With Clarion 8 apps you _must_ include the dictionary (and preferably TPS files as well) with the example. That's because the dict converted on your machine is not the same as the dict converted on my machine.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1849
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Timer on WebSource does not work INCLUDING A FORM (Ex 24)
« Reply #2 on: August 13, 2012, 02:01:50 AM »
ok, here it goes again...

[attachment deleted by admin]
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: Timer on WebSource does not work INCLUDING A FORM (Ex 24)
« Reply #3 on: August 14, 2012, 12:59:14 AM »
Hi Alberto,

you've got a few mistakes in your hand-code in the Search form. Those are easy enough to fix, but the end result is probably not what you're after anyway.

so first the mistakes.
(Incidentally all of these showed up in the Console log in fireBug, so if you're not using that you definitely should.)

a) as you know you've got to make xHtml, not just html. This means all attributes must be of the form something="whatever" - the quotes are important. So add quotes to COLOR, BGCOLOR, SCROLL and so on.

b) you're calling "exit" after sending the code, but before the call to DivFooter. So the Div is being opened (DivHeader) but not closed in Div Footer.

Once you've got that working, and seen the effect, I think you'll want to change it - but let's get there first and see how you go.

cheers
Bruce


Alberto

  • Hero Member
  • *****
  • Posts: 1849
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Timer on WebSource does not work INCLUDING A FORM (Ex 24)
« Reply #4 on: August 14, 2012, 02:12:23 AM »
Hi Bruce,
Thank you very very much!
Alberto
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1849
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Timer on WebSource does not work INCLUDING A FORM (Ex 24)
« Reply #5 on: August 14, 2012, 04:00:06 AM »
Bruce, Ive added a display to the serach form and then the timer does not work.
The display generates html as:

<div id="searchform_wellcome_value_div" class="nt-form-div">
        <font size="5" color="#FF9900">Wellcome </font>
</div>

The bold text is what I´ve added to the display text with the xhtml check.
This is not xhtml compliant? whats wrong?



-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1849
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Timer on WebSource does not work INCLUDING A FORM (Ex 24)
« Reply #6 on: August 14, 2012, 04:26:38 AM »
Here goes the app again.
If you remove the wellcome field it works.
Any Idea?


[attachment deleted by admin]
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: Timer on WebSource does not work INCLUDING A FORM (Ex 24)
« Reply #7 on: August 14, 2012, 06:14:09 AM »
liar, liar, pants on fire....

that's not really the contents of the Wellcome field is it?
you've got it set to;

'<b><font color="#FF9900" size="5">' & choose(upper(p_web.gsv('login_id')) <> 'DEMO','Wellcome <<!-- Net:s:login_name -->','This is a DEMO app.') & '</font></b>'

and if you inspect the generated HTML you see;

<div id="searchform_wellcome_value_div"  class="nt-form-div">?<font color="#FF9900" size="5">Wellcome </font></b></div>

Firebug reports "malformed, expected </div>"

And where did the ? come from?

Hint: In clarion, the < character has a special meaning in a string. So '<b>' isn't the same as '<<b>'

so, all you need is

'<<b><font color="#FF9900" size="5">' & choose(upper(p_web.gsv('login_id')) <> 'DEMO','Wellcome <<!-- Net:s:login_name -->','This is a DEMO app.') & '</font></b>'

but come on - you don't need me to be doing all your debugging for you...

Alberto

  • Hero Member
  • *****
  • Posts: 1849
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Timer on WebSource does not work INCLUDING A FORM (Ex 24)
« Reply #8 on: August 15, 2012, 04:10:30 AM »
Thanks and sorry.
My problem is I dont see any "?" in my Firebug (v1.10.2) neither the report "malformed, expected </div>"
Where do you see it?
See my attached image please.

Another problem I had is with an img tag, I´ve coded:

        '<<td><a href="http://www.futurobursatil.com.ar"><img src="images/logoFB.png" id="Image1" alt="" border="0" width="980" height="100"></a></td>'

Problem is the missed / at the end of the img tag but Firebug did not report anything about it.

Do I ned to set somthing to see the Firebug errors?

THanks again
Alberto (the liar...) :-)

-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: Timer on WebSource does not work INCLUDING A FORM (Ex 24)
« Reply #9 on: August 15, 2012, 10:00:50 PM »
I got a slightly different effect today, but that was a result of the work I was doing yesterday.
see attached pic.
The error makes it more easy to find the request that contains the broken xml - but I'm not 100% sure where the error comes from - ie if it's a firebug setting or what.

cheers
Bruce

[attachment deleted by admin]