NetTalk Central

Author Topic: Add class to header on popup form  (Read 563 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • Email
Add class to header on popup form
« on: January 12, 2024, 01:32:40 AM »
Hi Bruce

I need to remove (hide) the "Close" button (top right) on a popup form.
The popup form is called from a button on a form.
How do I add a class to the header so that I can hide the underlying close-button.
I've tried with "Class"-->"Main Heading" but that doesn't work when the form is called as a popup.
I have added an example.
Do you have a solution?

Regards Niels

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Add class to header on popup form
« Reply #1 on: January 12, 2024, 05:11:03 AM »
Try this:

button.ui-button.ui-corner-all.ui-widget.ui-button-icon-only.ui-dialog-titlebar-close {
    visibility: hidden;
}
-----------
Regards
Alberto

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • Email
Re: Add class to header on popup form
« Reply #2 on: January 12, 2024, 05:17:08 AM »
Hi Alberto

It will work, but on all my popup forms.
I need to just do it on a single form. Therefore, I need to add a class to the header.
But thanks anyway

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Add class to header on popup form
« Reply #3 on: January 12, 2024, 05:41:07 AM »
In the Form, search for: CloseButton and add the following line to change its title:

p_web.SetOption(loc:options,'closeText','xxx')

Then use:

p_web.script('$("[title='xxx']").addClass("yourclass");')

To add the class.

Hope it helps
« Last Edit: January 12, 2024, 07:10:49 AM by Alberto »
-----------
Regards
Alberto