Reputation: 78
I have a sharepoint solution built in react template and would like to create just modalbox based on bootstrap.
i have imported the following libaries
bootstrap: 4.6.1
jquery: 3.5.1
it works just fine. i can use both of them.
Questions before the start:
Is it possible anyway to open popup window (this modalbox) under sandbox environment of sharepoint?
if yes, do i need Administrator access to enable this?
if no (and that's actually what i supposed), how i can implement this with pure Jquery (as i said before, the solution built in React).
if the Implementation with Jquery almosty is'nt possibale, then is there any easy way to implement the modalbox functionality based on React.
what i have tried:
import * as $ from 'jquery';
import * as bootstrap from "bootstrap";
import "bootstrap/dist/css/bootstrap.min.css";
export default class DemoWebPart {
public render(): void {
this.domElement.innerHTML = "<div id="myModal"><
</div><button onclick=klickibunti()>test</button>";
function klickibunti(){
$('#myModal').modal("show"); // doesn't work!
}
}
}
Upvotes: 1
Views: 41