By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,640 Members | 2,355 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,640 IT Pros & Developers. It's quick & easy.

IFRAME AS FORM TARGET! POSSIBLE?

P: n/a
Hi all,

does somebody know how to target the answer of a form to an iframe (in
ie expecially)???? I use iframe as temporary object to redirect the content
do a layer built with a <div...> tag; this is possible with an hiperlink:
clicking on it i can change the layer content whit a file in a URL location
storing the answer first in the iframe and then sending is content to the
<div...>. Here following the code:

<script>
function showText(){
theText = window.textFile.document.body.innerHTML;
MM_setTextOfLayer('Layer1','',theText)
if(theText>"")
alert(theText);
}
</script>

[...]

<div id="Layer1" style="position:absolute; left:218px; top:120px;
width:205px; height:134px; z-index:1"></div>
<p onClick="window.textFile.location = 'testo.txt'">prova </p>

testo.txt is just a static file; now i need to upgrad the final <div...>
layer with the answer of a form gived by a php script who accep GCI variable
.... i need to target the temp <iframe...> with a real html form. Somebody
know how can i do?????

Thank you very much. Federico.

Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
The target attribute of the form must match the name attribute of the IFrame. But it won't work in anything but IE (as I recall.) So you should dynamically set the target on document load after determining that the browser has an implementation of the object model that treats IFrames in the same way it treats regular frames (check the frames collection of the window for the IFrame element.)

"Federico Bari" <fe********@tiscali.it> wrote in message news:bj**********@lacerta.tiscalinet.it...
| Hi all,
|
| does somebody know how to target the answer of a form to an iframe (in
| ie expecially)???? I use iframe as temporary object to redirect the content
| do a layer built with a <div...> tag; this is possible with an hiperlink:
| clicking on it i can change the layer content whit a file in a URL location
| storing the answer first in the iframe and then sending is content to the
| <div...>. Here following the code:
|
| <script>
| function showText(){
| theText = window.textFile.document.body.innerHTML;
| MM_setTextOfLayer('Layer1','',theText)
| if(theText>"")
| alert(theText);
| }
| </script>
|
| [...]
|
| <div id="Layer1" style="position:absolute; left:218px; top:120px;
| width:205px; height:134px; z-index:1"></div>
| <p onClick="window.textFile.location = 'testo.txt'">prova </p>
|
| testo.txt is just a static file; now i need to upgrad the final <div...>
| layer with the answer of a form gived by a php script who accep GCI variable
| ... i need to target the temp <iframe...> with a real html form. Somebody
| know how can i do?????
|
| Thank you very much. Federico.
|
|
|

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.