How to start uploading photo when the user clicks submit button?

tristanbailey

New Member
I have one form on the page for addition and it is related with 2 tables in the database.Eg. Say i have a table named \[code\]event\[/code\] and one table named \[code\]eventphotos\[/code\]. The uploadify plugin of jquery for \[code\]eventphotos\[/code\] works just fine, however, \[code\]event\[/code\] is the master table and \[code\]eventphotos\[/code\] is the child table. Thus when i upload the photo due to asynchronous behaviour of uploadify the photo gets submitted on server but there is no \[code\]EventId\[/code\] present for this photo which throws exception when i try to insert the photo into \[code\]evenphotos\[/code\]. I hope you got the idea what the problem is.I want that when the user clicks on the \[code\]submit\[/code\] button on the form, the photo uploading process should start and it should only get inserted into database once the master record is inserted into table.How do i make this happen?Thanks in advance :)
 
Back
Top