Forum Moderators: open
<form>
<input type="hidden" name ="age" value="23 years old">
<input type="hidden" name="experience" value="expert">
<input type="submit" value="John">
</form>
With the above, I show a little example of course. What I have is a submit button with John's name written in it and I want, when the user clicks on John, a pop-up window to appear and contain the "hidden" values of age and experience in it.
I don't know much about Javascript, i tried usind the document.write function, but no luck. I can only "send" data to the next page that are written in an input field, but not data that are written in hidden fields...
Any thoughts?
The form with the hidden fields is in the main window and you want to print that info in your popup?
If that's it, try this.
Add this to your main page:
<a href="2.html" target="_blank">test</a>
<form name="frmTest"><input type="hidden" name="txtTest" value="test hidden"></form>
Then add this to your popup:
<script>document.write(window.opener.document.frmTest.txtTest.value);</script>
You should be able to understand how it works after that.