Form posting to an Iframe

They have: 7 posts

Joined: May 2003

Hi All, this is a fairly simple problem, but I cant figure it out for the life of me:

Ill try to give u all the information u need.

I have a page with a shoutbox, ive included the shoutbox as an iframe so it will scroll inside the given space provided on the page.

The form and shoutbox are part of the same .cgi file.

The problem is that the text input boxes scroll with the shoutbox which I dont want I want the input area to be fixed.

So ive created a new form outside of the iframe to post to the shoutbox, however It is posting to the shoutbox and loading it inplace of the origional page.

What I want is for the new fixed form to post into the iframe rather calling the shoutbox up.

Any suggestions are welcome.

Thanx in advance Smiling

dk01's picture

He has: 516 posts

Joined: Mar 2002

The form tag supports the target attribute so give your iframe a name like "shoutframe" or something and then use this for the form tag outside the iframe:

Good luck. Smiling
-dk

They have: 7 posts

Joined: May 2003

Thank you very much dk, worked a treat.

Seems really obvious now some1 has pointed it out but you learn somthing new every day.

Thanx again
Smiling

dk01's picture

He has: 516 posts

Joined: Mar 2002

Hehe yes well I had a much more complicated answer prepared but then remembered that it is just like all other frames.
-dk

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.