I’m probably doing something stupid, but somehow the onclick action doesn’t work anymore.
My goal is to redirect the user to an outside URL.
See screenshare for clarification: https://www.loom.com/share/a85a3712475e4048b99188ea08e41556
I’m probably doing something stupid, but somehow the onclick action doesn’t work anymore.
My goal is to redirect the user to an outside URL.
See screenshare for clarification: https://www.loom.com/share/a85a3712475e4048b99188ea08e41556
What’s the error in the console?
Here you need the console, not xhr
Is there a reason you can’t use an anchor button instead of browser.goto?
I actually was just testing the browser.goto with an onclick because redirecting didn’t work somewhere else where I needed it (in a ‘succes’ event after form submit). In my entire project the browser.goto doesn’t seem to respond, so also in other .php files.
Please send a link to your page, as I can’t really debug this on the video
Here you go: http://134.209.201.166/
Why do you have some JS includes twice on your page?
Once in the head and once in the body?
Aah that was the issue, having a browser component in the header.php and also in the index.php. The header navigation is a php include in index.php. Thanks!
I’m still trying to figure out SSI, instead of using php include. I have set all the correct settings for SSI file/virtual on my server but somehow the header doesn’t load. Maybe that has nothing to do with having the browser component in twice, but I thought I’d mention it. Will make a new topic about this soon.
From the video it looks like you forgot the closing bracket in the browser.goto()
Is there a specific reason why do you want to use serverside includes and not PHP includes?
Serverside includes require adjusting some settings on your server.
Yes I have changed those settings on the server already.
My initial research concluded that dynamic data isn’t passed through to the other page. So lets say I have an index.php with a header.php as a PHP include, I cannot use databindings in index.php of server connects that are used in header.php. For instance I wan’t to do a “get_user_details” server connect once (in header.php), and then use the data of get_user_details in each page that has header.php as a SSI. Hope that makes sense?
I am not really sure I understand what you mean here.
Why you can't use them? You can bind any data on the page from the server actions included there.
header.php has the “get_user_details” server connect
index.php has header.php as a php include
In index.php I want to use databinding from “get_user_details”, without having to create a server connect in index.php.
Screenshare of what I mean: https://www.loom.com/share/8808a5f42ab54cfda0ac6891fe22dd02
You mean that you don’t see the data from the included server action in the data picker, when trying to bind the data on the parent/main page?
Yes
Hi @Teodor I’m still wondering how this works. You asked me some questions like you were going to give an answer to it. Or did I misinterpret? (maybe split these posts into a new topic?)
You just don’t have access to these server actions through the UI.
It works perfectly fine when you enter the bindings manually on the page.
Aah I see, thanks. Is it possible to make that accessible in the UI?