Create a Popup window |
[eluser]Unknown[/eluser]
Hi , In my Application i need to show a new popUp window. how could i do this ?. Basically i created a Tab Called 'New Reg Form' when user Click this i show new popup window . in Main.php i added a tab Code: <LI><A href="<?=base_url();?>regform_control/mymethod">RegForm</A></LI><br /> and i transfer the control to contoler class called regform_control. where i declared a method called mymethod what could i add in this method to show a pop up window. or give the best way to generate the pop up window.
[eluser]Unknown[/eluser]
Try this: Place the following on the onclick event of <a> tag: onclick="window.open('<?=base_url();?>regform_control/mymethod','mywindow','menubar=1,resizable=1,width=350,height=250');" in the view page and in the controller regform_control you have the function somewhat like function mymethod(){ $this->load->view("popup.html"); } popup.html is the page that opens in the pop-up
[eluser]DeaD SouL[/eluser]
Hi, I didn't understand what you meant,.. I think you was asking how to make a popup or where to put it? Let's say you have a view called layout.php which will hold all your nav-menu links Code: <html> and your controller application/controllers/regform_control.php Code: class Regform_control extends CI_Controller and your registration form view application/views/reg_form.php should be a normal form.. so the popup link has nothing to do with the reg. form... Since it is only a link to a page that shows nothing but the form. read more about url helper good-luck |
Welcome Guest, Not a member yet? Register Sign In |