Results 1 to 3 of 3

Thread: IFrames

  1. #1
    noGuru
    Guest

    IFrames

    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?

  2. #2
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Post

    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
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  3. #3
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Post

    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>

    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width