OK, I followed the comprehensive instructions in the Xway manual to create a popup box (p.95) and have it working. Excellent!
I now want to make the popup box resizable and draggable.
Let’s do resizable first. AI tells me to make it resizable I need to add resize: both; overflow: auto; to the .overlay class (I called the box ‘overlay’ as per the Xway instructions).
If I add those in Xway as “Extended HTML Attributes” to the overlay box, that appears in the HTML as <div id="overlay" resize="both"> which obviously does nothing.
If I add these properties to “Extended Properties” in Xway, it appears in the #overlay ID in <style> in <head>. This also does not make the box resizable:
You want to target the “popup” box rather than the “overlay” box. The overlay box has Fixed position and is set to cover the content area of the window to provide a transparent dark background.
resize is a CSS property rather than an HTML attribute, so you need to add it in the Extended Properties section of the Box Inspector.
You don’t need to set a class unless you are applying a property to multiple elements. If you apply a property to a box, Xway uses the box ID to target that particular box. (Xway uses classes when outputting text styles.)
You don’t need to use an extended property to set overflow: you can choose Auto from the Overflow popup in the Style section of the Box Inspector.
So the only changes you need to make after following the steps in the Xway User Guide are:
Select the “popup” box.
Add resize (name) both (property) in the Extended Properties section of the Box Inspector.
Choose Auto from the Overflow popup in the Style section of the Box Inspector.
If you do this, you should see that the popup box has a resize widget in the bottom right corner.
I don’t think it’s possible (in a non-hacky way) to create a draggable box using CSS, so you probably do need to use JavaScript.
There are some good sites that have non-AI information about HTML and CSS. These are being plagiarised by AI, sadly, but they’re often more user-friendly. Here is one page that might be a good starting point: How to Create a Draggable HTML Element.
Answering your second question: you want to target the “popup” box (as before), and you don’t need to use JavaScript for resizing. If you follow the W3Schools page mentioned above, one thing you will need to do is set the box to have absolute position instead of relative position (choose Absolute from the Position popup in the Style section of the Box Inspector).
The W3Schools example also assumes that you have a “header” box within the popup box. This provides an area that users can drag (like a window bar on macOS).
The simplest way to add JavaScript on an Xway page is to put it in the JavaScript Markup section of the Page Inspector.
There is also a draggable HTML attribute, which is very simple: you can set this by adding draggable (name) true (value) in the Extended HTML Attributes section of the Box Inspector.
… but when I tried it in Safari, it created a temporary draggable copy of the popup, so I don’t think it’s what you’re looking for.
(I think it’s actually intended to be used for drag and drop operations.)