PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WB17 Popup Window
WB17 Popup Window
Iniciado por guest, 27,ene. 2016 10:10 - 14 respuestas
Publicado el 27,enero 2016 - 10:10
Hi Guys,

Is it possible to create a "Global Popup"?

I want a "menu bar" to go across each page and depending on the button pressed, it will show the corresponding popup.

I was hoping that I would not have to copy the code to every page.

I thought about the internal page, but I have never go it to work properly. If anybody has a code snippet / hints that they could post to get me started, it would be appreciated.

Kindest Regards,

Mike
Publicado el 27,enero 2016 - 12:57
Hi Mike

the simplest way is to use a page model and to use the model in any page where you want it... Only one code then.

Best regards
Publicado el 27,enero 2016 - 14:32
Hi Fabrice,

Can you please expand a bit on your reply.

I don't want to open a new page - but display something like the popup on a page.

As it will be the same for pages on the site, I would like to just create 1 "popup" and then call it from any page on the site.

Thanks again,

Mike
Publicado el 27,enero 2016 - 15:12
Hi Mike,

Fabrice is talking about a page template.
Look at the Help for "Page template" how to create one.
Once you have created a page template you can assign it to pages by selecting the Page tab, Templates and select "List of templates used". Then you can click the button "Add" to add the template you created.
Templates can have code, menus, popups, anything that is common to one or more pages.
You can also overlay several templates on a page.
If you modify a template Webdev will prompt you to apply the chages to each page that uses it.

Regards,
Piet
Publicado el 27,enero 2016 - 15:38
Hi Piet,

Thanks for adding your comment.

I think that I am actually looking for an "Internal Page" that can be displayed on a area setup in the middle of the page.

I have to say that any help with the Internal Page procedure / code snippet would be appreciated. After all these years I am still learning!!

Kindest Regards,

Mike
Publicado el 27,enero 2016 - 16:49
You can add an pop up page exactly where you want it. In the page that uses the template you can overload the template to for example not show the popup er anything else for that matter.
Publicado el 27,enero 2016 - 17:38
Hi Allard,

I am happy using popups - working very well.

What I was trying to get was a popup that is global, so I can call it from any of my pages.

Mike
Publicado el 27,enero 2016 - 23:53
Hi Mike,

It's obvious that you are not familiar with the concept of page templates.
It is a concept that can save you a lot of time, not only for the popup in this case.
Page templates are not about style only.
They can have code, procedures, popups, anything that you can use in a normal page.

In your case it is possible to create a template that only holds one popup.
Add the template to all your pages and the popup is ready to be called from all pages.

Regards,
Piet
Publicado el 28,enero 2016 - 11:18
Piet,

You are quite correct. I have struggled with templates.

You appear to be a "guru" on this. Do you have a template code snippet ? It would be nice to see something in operation. I have been through the Webdev examples .... but I have had sleepless nights.

I think it might be easier just to create popup and copy it to all the pages that need it.

Thanks again for your help.

Mike

PS Where abouts are you based?
Publicado el 28,enero 2016 - 13:24
Hi

there is NO code to use a template...

You define a page, save it as template
then in each page where you need that style/function/element you go in the page 7 tabs and add the template
that's it, everyhting from the template is now part of your page

and when you modify the template, all pages are updated
Publicado el 28,enero 2016 - 23:32
Hi Mike,

There are no guru qualities needed to use templates, it's kinda basic stuff.
Suppose you have a website with a top bar with menu and a logo on most of the pages.
Then you create a page holding the cell for the top bar, the menu and the logo. You give it the right size and colors and save it as a template.
Now you can apply this template to new and existing pages (see my and Fabrice's previous howto) and they will all have the same menu and logo.
If you add a menu item or change the position of the logo it will be applied to all pages using the template.

As said before, you could create a page with no style or anything else whatsoever and create a popup on that page, then save it as template.
(I don't remember if WB 17 already has the popups integrated in the pages, but that should not matter)

BTW I'm located in the Netherlands, Amstelveen (a suburb of Amsterdam)

Regards,
Piet
Publicado el 29,enero 2016 - 07:22
Hi,

I personally would use a "Program defined hotkey"> or "Globally defined hotkey" and a switch on WinInput() to make this work ;)

Cheers
Tor-Bjarne
Publicado el 29,enero 2016 - 11:08
In Windev perhaps, but in Webdev no.
regards,
Piet
Publicado el 31,enero 2016 - 07:36
Quote
cardcoder

I think it might be easier just to create popup and copy it to all the pages that need it.
Using a Template does just what you are thinking of doing but automatically for you.

Yes you understood it right. Create a template and associate it with your page. All this is just point and click.

WB will do the code insertion (copy-paste) for you on the pages where you have associated a particular template.

HTH
Publicado el 01,febrero 2016 - 20:28
Hi Guys,

Just a quick update.

I spent all day on it today. I am obviously quite stupid in this area as I can't get it to work the way I wanted it to. I have given up and I will create a set of pop windows that I will copy to all relevant pages.

I didn't get the concept from the help, and I can't afford to waste any more time on it.

Thanks for the help from everybody.

Regards,

Mike