Jquery UI modal show not working |
Hello Everyone,
New to this forum and new to codeigniter. Facing following issue. I have a view definition file which contain a link to show personal info as given below. Code: <div><a href="javascript:show_contact_info();">Show contact info</a></div> THen I have the javascript function as follows: Code: function show_contact_info() Now here is the modal definition. Code: <div class="modal fade" id="emplinfo_div" role="dialog" > Please help Regards, Vijay
Hello,
Can somebody answer please.. Project held up on this. Thanks and regards, Vijay
This isn't a CodeIgniter related question, i.m.o.
It's about Javascript and/or jQuery UI. A few steps you need to check: Do you load jQuery and jQuery UI correctly? Do you have a $(document).ready() section to handle jQuery events? If you replace Code: $("#emplinfo_div").modal('show'); by Code: alert("You clicked the link to open a popup!"); Does that work?
Here is how to do it using Bootstrap Modal.
Bootstrap Modal What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Perhaps you can refer to this website in creating modal with javascript : https://www.w3schools.com/bootstrap/boot..._modal.asp
(01-10-2019, 11:58 PM)Wouter60 Wrote: This isn't a CodeIgniter related question, i.m.o. Yes it work when I put alert there. It is going to the function. In fact, the window seems to display something but nothing is shown and the control is passed on to the non-displayed div. I need to click somewhere to get back to original screen. Really weird. (01-10-2019, 11:58 PM)Wouter60 Wrote: This isn't a CodeIgniter related question, i.m.o. To clear the issue, the above modal window is in another view of codeigniter which display the base page with other info. The link is given to click to show only that info in a modal window.
A modal should be at the bottom of html file.
Here are a couple of links to a more friendly bootstrap dialog (modal) bootstrap-dialog Examples What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
If you are using mozilla firefox please use right click then choose "inspect element". In console section if you have an error will show up.
|
Welcome Guest, Not a member yet? Register Sign In |