|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
joey Smarty Regular
Joined: 29 Oct 2003 Posts: 57
|
Posted: Thu Oct 30, 2003 5:52 am Post subject: javascript in tpl |
|
|
I want to create a link to open a new window in smarty tpl.
such like :
Code: |
<a href="javascript:window.open('showUserInfo.php?user={$mylist[row].username}','win01','scrollbars=yes,width=630,height=680')">{$mylist[row].username}</a>
|
when I click on this link , a new window will be opened.but the parent window has changed. and "[object]" write on the page.I don't know why?
if I create a function to open new windows. it can run normally.
but when I use <script src=../js/mainjs.js></script> include the function ,it can't run again.
pls help me!~ |
|
Back to top |
|
joey Smarty Regular
Joined: 29 Oct 2003 Posts: 57
|
Posted: Thu Oct 30, 2003 8:57 am Post subject: I 've solved |
|
|
window.open should add "void" before the function
like "void(window.open(...))" |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|