Using thickbox to display number of fields based on input
I'm using Thickbox 3.1 and right now I have some HTML setup like this:
<input type="text" name="number" size="1">
<input alt="overlay.html?height=300&width=400" type="button" class="thickbox" value="Make Fields">
What I'm trying to accomplish is when the user enters a number into the first input text field and clicks the "Make Fields" button, a thickbox pops up and shows a certain number of text fields depending on what the user entered.
So if the user enters 2, when they click "Make Fields" the thickbox pops up and shows 2 input fields. If they enter 5, the thickbox pops up and shows 5 in开发者_JAVA百科put fields. Is this possible?
Thanks!
Yes. You can pass in a parameter to a ThickBox underlying page. You need to use JS script to do that. Then based on that parameter, the underlying page can display another value (you can use JS or server side for this)
精彩评论