Skip to main content
Inspiring
April 15, 2006
Answered

Form with nested iframe stumper

  • April 15, 2006
  • 5 replies
  • 839 views

I have a form with a nested iframe. At the top of the form (outside the iframe) there is a drop-down box that is used to filter a large database table into a smaller result set. The iframe displays this result set in a table/grid, and each row has a check-box. The form must also have a 'submit' button (outside the iframe), which will update a second database table with the rows selected from the iframe grid entries that were selected using the checkboxes.
So, the form's filter function creates the contents of the iframe, and the form's submit button uses the selected contents of the iframe to perform a database insert.
Is this possible??? Thanks!
This topic has been closed for replies.
Correct answer ColdConFused
Thanks for the tips. I know I'll have to get around to learning javascript one of these days (and I've already incorporated some open-source freebies into my site) but I'm also finding that javascript solutions are being used when they're not needed, and since I'm working with a very compressed development schedule, I can't really take too much time out for study.
Thanks again!

5 replies

ColdConFusedAuthorCorrect answer
Inspiring
April 16, 2006
Thanks for the tips. I know I'll have to get around to learning javascript one of these days (and I've already incorporated some open-source freebies into my site) but I'm also finding that javascript solutions are being used when they're not needed, and since I'm working with a very compressed development schedule, I can't really take too much time out for study.
Thanks again!
Inspiring
April 16, 2006
well, i've only been doing web development for about a month, so javascript is a little out of my league at the moment. i was hoping i could find a javascript-free solution. there must be some way for a coldfusion form to retrieve something from another form, right? or maybe not. maybe i've hit one of the limits of coldfusion? actually, i'm thinking maybe the second submit button could be within the iframe. this would probably solve it. what do you think? i'll give it a whirl, and provide an update in a couple of days.
Inspiring
April 16, 2006
If you are going to do web development, you want to learn javascript. I learned it by buying this book, http://www.samspublishing.com/library/library.asp?b=STY_JavaScript_24_hours&rl=1. Good book.

As far as where you put your submit button, I can't say. I don't know what you are trying to do. You should though. A good idea is to state what you want to do in plain English, and then write your code accordingly.

By the way, given how new you are, my compliments on getting to the stage where you could have a select in your main page populate a form in an iframe.
Inspiring
April 15, 2006
I've never tried it, but, you might be able to do it with javascript. Your iframe will probably already have a name so that's a good start. You might also have to give it an id attribute, I'm not sure. The stuff in the iframe with the checkboxes should also be a form and should also have a name and possibly an id.

Your javascript function will have to read the values of the checkboxes in your iframe form and pass them to a hidden form field on your main page. Then, in your action page, the hidden form field will be available to work with.