By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,625 Members | 1,497 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,625 IT Pros & Developers. It's quick & easy.

Form data to Thickbox?

P: 36
Hi guys

I am using a jquery thickbox script (http://jquery.com/demo/thickbox/ - iframed content example) to display information in a popup(modal) in the middle of my page. To do this I simply use the following hyperlink in my main page:

<a href="mypage.asp?name=thickbox&keepThis=true&TB_if rame=true&height=550&width=750" title="More info" class="thickbox">Open window for more info</a>

This will open a window in the middle of my page with the dimensions of 550x750 and within it load a page called (mypage.asp". This works just fine.

However, I now want to do the same thing but instead of using a simple hyperlink I want to post form data from my main page into my thickbox modal window. It's a very basic form and looks like this:

Expand|Select|Wrap|Line Numbers
  1. <form name=myform method=post action=mypage.asp>
  2. <input type="text" name="fullname" size="20">
  3. <input type="text" name="emailaddress" size="20">
  4. <input type="submit">
  5. <input type="hidden" name="key" value="234fdw8">
  6. </form>
  7.  
Is it possible to submit the form data from my main page into the thickbox modal window? If so, how would this be done? Any help would be fully appreciated

Best regards

Rod from the UK
Feb 24 '10 #1
Share this Question
Share on Google+
5 Replies


GazMathias
Expert 100+
P: 200
You could build the url sent to the thickbox using javascript (client-side) that contains the data the thickbox page needs).

Gaz.
Feb 25 '10 #2

P: 36
Hi Gaz

Thank you so much for your reply.

Sounds good in principle but have no idea how this is done. Any help would be fully appreciated.

best regards

Rod from the UK
Feb 25 '10 #3

GazMathias
Expert 100+
P: 200
If I get time a bit later I may write a function for you, but you may get a quicker response if you post in the Javascript forum.

Maybe a moderator can move the post?

Gaz.
Feb 25 '10 #4

P: 36
Hi Gaz

Thanks for your reply.

If you could look into this for me then that would be great!

In the meantime, I will add this post into the javascript section like you suggested.

Best regards

Rod from the UK
Feb 25 '10 #5

jhardman
Expert 2.5K+
P: 3,405
moved for you. that was the solution I would have suggested as well, and the javascript isn't that bad either.

Jared
Feb 26 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.