NetTalk Central

Author Topic: Button onclick set to procedure and popup  (Read 3980 times)

JHojka

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • Email
Button onclick set to procedure and popup
« on: January 11, 2012, 10:39:13 AM »
I added a button to my form. On the OnClick tab I added a webPage procedure. I click on the Open as PopUp option. When I open the page with the button in my browser the PopUp page is merged into my current page. I was expecting the button to open a popup window with the second page loaded in the popup.

Jeff Hojka
Marathon Software Co.

bruce2

  • Full Member
  • ***
  • Posts: 108
    • View Profile
    • Email
Re: Button onclick set to procedure and popup
« Reply #1 on: January 11, 2012, 12:43:43 PM »
Alas you can't popup. Web page.
A popup isn't a separate page, it's a control that actually always exists, as an unpopulated shell, on a page. Thus you can popup browses, or forms, ( which are both controls) but not another page.

A form can contain XHTML, and display fields, so is probably the best container for what you are trying to do.

Cheers
Bruce

JHojka

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • Email
Re: Button onclick set to procedure and popup
« Reply #2 on: January 11, 2012, 01:27:11 PM »
Now I get a POPUP with nothing in the popup. I tried to add buttons to the form but still nothing. How do I get items to show up in the popup.

Jeff Hojka
Marathon Software Co.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Button onclick set to procedure and popup
« Reply #3 on: January 12, 2012, 05:15:55 AM »
the most likely reason for the popup shell to appear, bu the content not to be populated, is that the content you are populating it with is not valid xHtml.

In order to be valid xHtml, the contents should pass xml validation. This means things like every-tag-has-a-closing-tag and so on. For example you can't just have <p> or <br> - you need <p /> or <p> </p>.

If you open the popup in Firefox, with Firebug (*), and you go to the console window, then you can see the Ajax request there when the popup opens. If you inspect the Ajax reply, at the top of the reply is an XML tab, and this will tell you where the xml error is. (see attached pic).

(*) Firebug is the debugging tool for FireFox and is your friend when it comes to building web apps. Get it from www.getfirebug.com. Other browsers have similar tools, but so far for me firebug is the best.

cheers
Bruce



[attachment deleted by admin]

JHojka

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • Email
Re: Button onclick set to procedure and popup
« Reply #4 on: January 12, 2012, 06:33:11 AM »
I resolved this issue by re-setting my webserver templates.

Jeff Hojka
Marathon Software Co.