• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

form in frames

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am stuck with a problem regarding frames. I have one main html which has three frames...top,bottom,middle. Now on this main page I wanted to have a form. Now, two fields are in top page, two in middle page and two fields with submit on bottom page. Can these all values be submitted like a form?
thanks in advance
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
that is not going to work. your main page contains a frameset tag which takes the place of a body tag. it can only include other frameset tags, frame tages and noframes tags. since you have no body you cant add a form.
 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can try this; no guarantees here though.
In the html for each frame, you must declare a form; in this form tag, give the form a name.
e.g.:
<form name="form1" action="whatever" method="[POST/GET]">
Next, in the form that contains the submit button, add some hidden fields, one for each field you'd like to submit from the other frames.
Then, change the action for this form to a javascript function. In this function, you'll want to copy the values from the other frames/forms in your hidden fields. Then submit().
It's not pretty but it should work. As for me, I'd just get rid of the frames.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here is an idea.
On the frame that is being submitted, have a series of hidden form elements that correspond to the other elements in the other frames. When information is entered into the element, have it fill in the hidden field.
if you do not know how to do it, here is the basic idea
<input type='text' value="" onblur="parent.FrameName.document.FormName.HiddenElement.name.value=this.value">
This method would be the easiest way to do it
 
They worship nothing. They say it's because nothing lasts forever. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic