简体   繁体   中英

how to open a function in new window ?or new tab?

I am calling a function in my controller from a button click .... I want the function to be opened in a new window how can we get that

ex: now my url is

" http://localhost/codeigniter_cup_myth/index.php/adminController/adminDegree "

with a button click i am calling a function degreechk in my adminController

I want the url

" http://localhost/codeigniter_cup_myth/index.php/adminController/degreechk "

to be opened in a new window How can i get the new url in a new window

You have to handle it on the View page only if you are submitting the form. add attribute target="_blank" in your form tag. For Ex:-

<form id="search" action="/search" method="get" target="_blank">
  <input name="q" class="textbox" tabindex="1" onfocus="if (this.value=='search') this.value = ''" type="text" maxlength="80" size="28" value="search">
  <input id="submit-button" type="submit" value="Post Your Answer" tabindex="110">

</form>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM