I solved this problem, i found some old code that i used on a project years ago that actualy takes the value of the iframe and posts it to a hidden form field so that UPDATE and INSERT behaviors can be applied...
Works beautifully witht he exception of some functionality that is missing. Check out the Javascript group if you want to see that question posted..
Code follows for all interested:
--------------------------
<%@ Page Language="VB" ContentType="text/html" Debug="true" validateRequest="false" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrl
runat="server"
CommandText='<%# "UPDATE SiteText SET Heading=?, Content=? WHERE ID=?" %>'
ConnectionString='<%# System.Configuration.Confi
DatabaseType='<%# System.Configuration.Confi
Expression='<%# Request.Form("MM_update") = "fHtmlEditor" %>'
CreateDataSet="false"
SuccessURL='<%# "pagetext_edited.aspx" %>'
Debug="true"
><Parameters>
<Parameter Name="@Heading" Value='<%# IIf((Request.Form("Heading
<Parameter Name="@Content" Value='<%# IIf((Request.Form("EditorV
<Parameter Name="@ID" Value='<%# IIf((Request.Form("theID")
</Parameters>
</MM:Update>
<MM:DataSet
id="EditPage"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.Confi
DatabaseType='<%# System.Configuration.Confi
CommandText='<%# "SELECT * FROM SiteText WHERE PageAssignment = ?" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@PageAssignment" Value='<%# IIf((Request.QueryString("
</MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<%@ Register TagPrefix="EONHDR" TagName="Header" Src="header.ascx" %>
<%@ Register TagPrefix="EONFTR" TagName="Footer" Src="footer.ascx" %>
<%@Import Namespace="System.Web.Secu
<script language="vb" runat="server">
Sub Page_Load()
'verify authentication
If User.Identity.IsAuthentica
'display Credential information (UserName)
displayCredentials.InnerHt
Else
'Display Error Message
displayCredentials.InnerHt
End If
End Sub
</script>
<html>
<head>
<title>Welcome to eOn Studios</title>
<style type="text/css">
.clsCursor { cursor: hand}
</style>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<link href="eon.css" rel="stylesheet" type="text/css">
</head>
<body onLoad="Init()">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="55" valign="top" nowrap><EONHDR:header runat="server"/></td>
</tr>
<tr>
<td colspan="3" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="8">
<tr align="center" class="Text_Large">
<td align="left" class="Menu"><br>
<a href="default.aspx">Client
<td align="right" class="Menu"><div class="Text3s" id="displayCredentials" runat="server" /></td>
</tr>
<tr>
<td height="100%" colspan="2" align="center" valign="top" class="Text"> <p> </p>
<table width="90%" border="0" cellpadding="2" cellspacing="0">
<tr>
<td nowrap bgcolor="#CCCCCC" class="TBord_noBot"><div class="Header">Edit Page Content: </div></td>
</tr>
<tr>
<td align="center" class="TBord"> <table width="80%" cellpadding="5" cellspacing="0" background="images/swatch_
<tr>
<td width="100%" align="left" valign="top" bgcolor="#FFFFFF" class="Header"><table cellpadding="0" cellspacing="5" class="Text2">
<tr valign="top">
<td><img src="images/ques.gif" width="15" height="14" onClick="Help_OnClick()"><
<td><a href="#" onClick="Help_OnClick()">H
</tr>
</table></td>
</tr>
<tr>
<td align="center" class="TBord_noSides">
<form ACTION="" METHOD="POST" name="fHtmlEditor" runat="server">
<textarea name="EditorValue" style="display: none;"><%# EditPage.FieldValue("Conte
<script language="JavaScript">
var errorString = "Sorry but this web page needs\nWindows95 and Internet Explorer 5 or above to view."
var Ok = "false";
var name = navigator.appName;
var version = parseFloat(navigator.appVe
var platform = navigator.platform;
if (platform == "Win32" && name == "Microsoft Internet Explorer" && version >= 4){
Ok = "true";
} else {
Ok= "false";
}
if (Ok == "false") {
alert(errorString);
}
function ColorPalette_OnClick(color
cpick.bgColor=colorString;
document.all.colourp.value
doFormat('ForeColor',color
}
function initToolBar(ed) {
var eb = document.all.editbar;
if (ed!=null) {
eb._editor = window.frames['myEditor'];
}
}
function doFormat(what) {
var eb = document.all.editbar;
if(what == "FontName"){
if(arguments[1] != 1){
eb._editor.execCommand(wha
document.all.font.selected
}
} else if(what == "FontSize"){
if(arguments[1] != 1){
eb._editor.execCommand(wha
document.all.size.selected
}
} else {
eb._editor.execCommand(wha
}
}
function swapMode() {
var eb = document.all.editbar._edit
eb.swapModes();
}
function create() {
var eb = document.all.editbar;
eb._editor.newDocument();
}
function newFile(){
create();
}
function makeUrl(){
sUrl = document.all.what.value + document.all.url.value;
doFormat('CreateLink',sUrl
}
function copyValue() {
var theHtml = "" + document.frames("myEditor"
document.all.EditorValue.v
}
function SwapView_OnClick(){
if(document.all.btnSwapVie
var sMes = "View Wysiwyg";
var sStatusBarMes = "Current View Html";
} else {
var sMes = "View Html"
var sStatusBarMes = "Current View Wysiwyg";
}
document.all.btnSwapView.v
window.status = sStatusBarMes;
swapMode();
}
function Help_OnClick(){
window.open("images/editor
}
function OnFormSubmit(){
if(confirm("This Document is about to be submitted\nAre you sure you have finished editing?")){
copyValue();
document.fHtmlEditor.submi
}
}
</script>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr valign="top">
<td valign="top"> <div id=editbar >
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="left">
<tr>
<td> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td> <table border="0">
<tr valign="baseline">
<td nowrap> <img class='clsCursor' src="images/editor_images/
</tr>
</table></td>
<td> <table border="0">
<tr valign="baseline">
<td nowrap> <i
</tr>
</table></td>
<td> <table border="0">
<tr valign="baseline">
<td nowrap><img src="images/editor_images/
<td nowrap> <select name="what" style="font: 8pt verdana;">
<option value="http://" selected>http://</option>
<option value="mailto:">mailto:</o
<option value="ftp://">ftp://</opt
<option value="https://">https://<
</select> </td>
<td> <input type="text" name="url" size="35" style="font: 8pt verdana;"> </td>
<td> <input type="button" name="button2" value="Add" onClick="makeUrl();" style="font: 8pt verdana;"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr valign="top">
<td height="20"> <table border="0">
<tr>
<td nowrap valign="baseline"> <div align="left"> <img class='clsCursor' src="images/editor_images/
</tr>
</table> </td>
</tr>
<tr valign="top">
<td height="21" align="left"><table>
<tr valign="baseline">
<td align="right" nowrap class="Header">Heading:</t
<td>
<asp:textbox Columns="60" CssClass="forms" id="Heading" runat="server" TextMode="SingleLine" Text='<%# EditPage.FieldValue("Headi
</td>
</tr>
</table></td>
</tr>
</table>
</div></td>
</tr>
<tr valign="top" align="left">
<td valign="top"> <table width="100%" border="0" height="100%">
<tr valign="top">
<td width="100%" height="300"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr valign="top">
<td bgcolor="#FFFFFF"><iframe id=myEditor src="../pd_edit.htm" onFocus="initToolBar(this)
</tr>
</table>
<p> </p></td>
</tr>
</table></td>
</tr>
</table>
<input type="submit" value='Update Page ' onClick="OnFormSubmit()">
<input type="hidden" name="theID" value="<%# EditPage.FieldValue("ID", Container) %>">
<input type="hidden" name="MM_update" value="fHtmlEditor">
</form> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><span class="modFormSubmit">&nbs
</tr>
</table> </td>
</tr>
</table>
<p> </p>
</td>
</tr>
</table>
<p></p></td>
</tr>
<tr>
<td height="55" colspan="3" valign="bottom" nowrap><EONFTR:footer runat="server"/></td>
</tr>
</table>
<script>
initToolBar("foo");
window.status = "Current View: Wysiwyg";
</script>
</body>
</html>
--------------------------
Nugs
Main Topics
Browse All Topics





by: sky99yahooPosted on 2005-03-09 at 20:43:57ID: 13503114
Hi,
An iframe is basically a separate webpage nested within another webpage.
So if you wish to load db content into it, you would simply just do it the same way for a normal page.
Is it possible to elaborate further on your idea?
Cheers!
Ty