Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

javascript in tpl

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
joey
Smarty Regular


Joined: 29 Oct 2003
Posts: 57

PostPosted: Thu Oct 30, 2003 5:52 am    Post subject: javascript in tpl Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
joey
Smarty Regular


Joined: 29 Oct 2003
Posts: 57

PostPosted: Thu Oct 30, 2003 8:57 am    Post subject: I 've solved Reply with quote

window.open should add "void" before the function

like "void(window.open(...))"
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP