Page 1 of 1

Issue with action on advanced button

Posted: Sat May 02, 2020 5:47 pm
by Rodders
Hi, still relatively new to the software, but have completed my first site and very pleased. I'm almost finished my second site but have hit a problem - I'm certain that it's something I'm not doing or have a parameter incorrectly set! Basically the new site has 5 pages that are competition regs, when you ask for them they open in a new window. The pages are created using layout guides and are responsive. The issue I have is that there are two buttons at the foot of the page - one is a link to the online entry form (which will open in the same browser window) which works fine and the other is a simple "close" button, but I can't get it to work. I have created the last layout guide as a form and set the page to PHP. I'm using an advanced button and it's configured as onclick with the action of close current browser window. But it won't work. I have a feeling it may be my configuration of the form details - should I be using POST or GET and should the target be _self or _blank? Even though I'm not submitting a form I presume I still have to set to use the inbuilt PHP processor
You can see the output at www.styleprint.biz/test/charity_regs.php and the file is www.styleprint.biz/test/regs page.wbs

Any pointers greatfully accepted
Cheers
Nick

Re: Issue with action on advanced button

Posted: Sat May 02, 2020 6:00 pm
by Pablo
The close option only works if the Window was opened via JavaScript. This is a browser security limitation, and unrelated to WWB.

See also:
https://developer.mozilla.org/en-US/doc ... ndow/close

Re: Issue with action on advanced button

Posted: Sat May 02, 2020 7:10 pm
by Rodders
Oh okay thanks, guess I've still got a lot to learn!