codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  store content in iframe to hidden form field  iverson at 18:46 on Monday, April 10, 2006
 

hi, i am new to DHTML.
i have tried to solve the following in the last few days. I still cannot figure what's the problem. is there anyone can help me? i have a form like this. (sorry to post such a long program)
It seems that the hidden form field cannot store the content
in iframe. I think that it may be there is no field to store in iframe to store data, but i do not know how to store the data and submit it.


//store value in iframe to hidden form field on submit
<form id="myform" name="myform" method="post"
action="./updateContent"
onSubmit="document.myform.htmlfield.value=document.all.iView.
innerHTML;alert(this.htmlfield.value);">

//the hidden form field
<input type="hidden" name="htmlfield" id="htmlfield"
value="">

//the iframe
<iframe id="iView" name="iView" style="width: 450px;
height:450px">
</iframe>

//the submit button
<a href="javascript:document.myform.submit()"><img
src="file:///C|/Documents%20and%
20Settings/iverson/submit.gif" width="80" height="18" ></a>

</form>


Thanks a lot









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: open excel file in html page
•  waitfor statment
•  How to build treecheckbox using xml file in javascript
•  how to show xml file in a taxonomy structure
•  IE7 does not open folders
•  Re: how to show xml file in tree structure using java script (show the file in a html form)
•  Re: Computer Name in Web page
•  help with jsp..urgent
•  Re: Firefox


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007