Click to See Complete Forum and Search --> : IFrames
noGuru
Jun 18th, 2001, 08:55 AM
How can I save the contents of an Iframe into a field in an SQL Database? Say the name of the Iframe is name="frame1", then when I use
rs1("field1")=Request.Form("frame1")
on the next page, nothing is written into the database. The contents is html (a webpage). Is there another way to display another webpage embedded in one of my asp pages and then on the click of a button save that webpage into a field in a database?
abhijit
Jun 18th, 2001, 09:02 AM
Why don't you capture the url of the page in a hidden text box and save the url instead of saving the whole page?
-abhijit
abhijit
Jun 18th, 2001, 10:53 AM
here is a solution i have devised for you.
-abhijit
<% @language=vbscript enablesessionstate=false %>
<html>
<head>
<meta name="vi60_dtcscriptingplatform" content="client (ie 4.0 dhtml)">
<meta name="generator" content="microsoft visual studio 6.0">
<script language="javascript">
function fnGetURL(){
alert(document.all.inDoc.src);
(window.inDoc.contains);
frm.getURL.value = document.all.inDoc.src;
alert(frm.getURL.status);
}
</script>
</head>
<body bgColor=#ffefd5 text=#8b0000>
<form name="frm" method="post" onsubmit="fnGetURL();">
<iframe src="hungarian_Notation.htm" id="inDoc" name="inDoc" style="display:block"></iframe>
<br><br><br>
<select name="lstMain" multiple>
<option value="human">Man</option>
<option value="animal">Goat</option>
<option value="extinct">Sabre Toothed</option>
</select>
<input type="hidden" name="getURL" value="">
<input type="submit" value="submit">
</form>
<%
Response.Write Request.Form("lstMain")
Response.Write Request.Form("getURL")
%>
</body>
</html>
:) :D ;) :p
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.