R.Kinkeris Posted September 26, 2013 Share Posted September 26, 2013 Hello,I'm trying to make pagination with input field.For example: someone types a value in input field and when I press GO the value is passed to smarty so I can use the function {$link->goPage($requestPage, $page)} ere $page is the value in the input field. The thing is that I only know how to get the value of input field with javascript and I don't know how to pass it further to smarty so I can use it. Anyone has any ideas?Thanks in advance. Link to comment Share on other sites More sharing options...
PascalVG Posted September 26, 2013 Share Posted September 26, 2013 You can't do that directly, as Javascript is run on the client (i.e. browser) side, and php/smarty on the server side. Smarty's job is done (i.e. the page to show in the browser is created) before the javascript's job starts. You have to send the page value back to the server first, so that they can do something with it. Read more about it in this link: http://stackoverflow.com/questions/1271026/how-to-assign-a-javascript-variable-to-a-smarty-variable My 2 cents, pascal Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now