Thread: jQuery Dynamic JQuery UI dialogs
View Single Post
Old 12-17-2012, 10:43 PM   PM User | #1
deafdigit
New Coder

 
Join Date: Jul 2009
Location: Odense, Denmark
Posts: 70
Thanks: 4
Thanked 0 Times in 0 Posts
deafdigit is an unknown quantity at this point
Dynamic JQuery UI dialogs

Alright so I've seen something like this question around, but I can't really figure out how to make it right...

With a php-loop I'm building a table. Each row of this table represents a question and contains a cell with a link which is supposed to open a JQuery UI-dialog with a standard form in it allowing the user to answer that question.

Now here's the tricky bit. When the user has answered the question the answer need to be submitted to a MySQL-db and it needs the question's id so as to map the two together.

My idea so far is to give the form a <input type='hidden' name='id'> element and make the value-attribute contain the id of the question. However, I can't figure out how to get the id into this input-element.

I can of course put the question's id into the link's id-attribute like this:

PHP Code:
<a href='javascript:void(e);' id='1'>Answer</a
... but I don't know how to get it into the form's hidden input field.

Can somebody please help me with this?


Thank you in advance,

// deafdigit
__________________
HornskovVindberg inkasso
deafdigit is offline   Reply With Quote