Link I'm going throug the bootstrap docs and I want to try using a modal for registration and/or login, maybe both. Is it possible to translate a java link into a laravel blade link? For example, can this link be converted to a laravel blade link?
<button onclick="document.getElementById('id01').style.display='block'"
class="w3-button w3-green w3-right-align">Register</button>
@shaungbhone I'm wondering if It's possible to convert the java link above into a laravel link. such as
{!! <a href= "events/$events->id">$event->name</a> !!}
@dmcglone27 Normally you can have a link like:
<a href="javascript:void(0);" id="testme">testme</a>
And a listener that opens the model, once the link is clicked, they work together.
@jlrdw Thanks man, that should put me on the right path.
I don't understand
For example, can this link be converted to a laravel blade link?
your code is just a modal when you click the Register button, the modal is come out.
@shaungbhone I'm trying to get a better understanding of links in laravel. Basically all I am wondering is if the Java link can be written in laravel.
@dmcglone27 What do you mean, “Java link”? I don’t understand what you’re wanting. If you just want a link to open a modal, then just do that:
<a href="{{ route('register') }}" data-bs-toggle="modal" data-bs-target="#register-modal">Register</a>
@jlrdw thank you, this helped tremendously.
please learn the difference between java and javascript - a quick google search should do it.
this
<button onclick="document.getElementById('id01').style.display='block'"
says, when the button is clicked, find an element on the page with id="id01" and change its display style to block
Assuming the item is currently hidden then it will be unhidden
Please note that this has ZERO relation to Laravel and ZERO relation to Java
@Snapey Thanks. It turned out I was way overthinking this. Once I seen how it worked using a simple link or button, I smacked myself.
It was as simple as
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
@Snapey Oh and I forgot the link that opens the modal..
<button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#register">
Register
</button>
@dmcglone27 ok, as long as you realise that this is Bootstrap javascript plugin that makes this work. Not some feature of native javascript or of Laravel
Please sign in or create an account to participate in this conversation.