Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert text from database to iframe

Status
Not open for further replies.

guitardave78

Programmer
Sep 5, 2001
1,294
0
0
GB
Hi i am useing an iframe based html editor for an online content manager. I can write html and submit it to the database fine by taking the text from teh iframe into a textarea then into the database. But i would like to be able to go the other way round, to edit existing text from teh database.

Help!
 
can i use src=<%=rs_recordset.table.value%>
type syntax?
 
NO.

The iframe take a url as a src not the HTML atself.

Develop a Dynamic page say &quot;iframepage.asp&quot; which will extract these the contents for the the iframe and then use that page in the ifram src tag like . src=&quot;iframepage.asp&quot;


[peace]
 
i have used a cut and paste load button that takes the text from database into the submitable text area and pastes it into iframe :)
 
guitardave78
Can you show the code used to do this? as I don't fully understand what you mean by
cut & paste load button

Jay
How can I go forward when I don't know which way I'm facing (John Lennon)​
 
it uses the iframe exec command function i will dig out the code to show you

hidden.submitData.focus()
hidden.submitData.select()
hidden.submitData.document.execCommand('copy', false, null)
editbox.focus()
editbox.document.execCommand('paste', false, null)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top