开发者

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

开发者 https://www.devze.com 2022-12-25 18:52 出处:网络
I am calling a function in my controller from a button click .... Iwant the function to be opened in a new window how can we get that

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/admi开发者_StackOverflownController/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>
0

精彩评论

暂无评论...
验证码 换一张
取 消