BigJobbies
BigJobbies

Reputation: 4343

CodeIgniter: Loading view in new window

Im writing a script that allows users to preview their reports before saving them to the database using CodeIgniter.

Using the $this->load->view('preview_report', $data); tag.

Is there anything i can add to this string to make it load into a new browser window?

Upvotes: 0

Views: 5897

Answers (2)

Nemanja Srećković
Nemanja Srećković

Reputation: 359

If you have different functions (or controllers) for creating and previewing reports, for example http://localhost/appname/report/create and http://localhost/appname/report/preview, you can open new browser window when calling preview function, using basic stuff like

<a href="http://localhost/appname/report/preview" target="_blank" >PREVIEW REPORT</a>

and your report will open in new window. if this is what you want.

Upvotes: 2

user743234
user743234

Reputation:

If 'load into a new browser' refers to 'popup window', then I don't think PHP itself can help you create popup window without the use of Javascript.

Have a look at this page: http://codeigniter.com/forums/viewthread/61395/#302107

Upvotes: 0

Related Questions