How to load the Iframe with hidden fields after the page load event


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 1 of 1

Thread: How to load the Iframe with hidden fields after the page load event

  1. #1
    Join Date
    May 2007
    Posts
    2

    How to load the Iframe with hidden fields after the page load event

    hi all

    I am using a third party gateway. The third party gateway does not support query-string , so i will need to post the form to pass the values to the given URL and another thing is that they don't expose the web-services so we need to use their page and that means we need to host it in an iframe in asp.net

    so what i did is that i have hidden fields that will be used as parameters as depicted below

    Code:
            <input type="hidden" name="p1" value='4635' />
            <input type="hidden" name="p2" value='Reference_test' />
            <input type="hidden" name="p3" value='Purchase credits' />
            <input type="hidden" name="p4" value='500' />
            <input type="hidden" name="m_1" value='142' />
            <input type="hidden" name="m_2" value='720' />
    and i will have a button to demonstrate what i want and i have an iframe as depicted below

    Code:
        <asp:Button ID="Button1" runat="server" Text="Proceed"  PostBackUrl="https://www.vcs.co.za/vvonline/ccform.asp" />
              <iframe id="iframe1"    src=""
                style="width: 744px; height: 333px; margin-top: 16px; margin-bottom: 0px;"> 
    		Your browser does not support inline frames or is currently configured not to display inline frames.
    		</iframe>
    now on form load i have this
    Code:
    <body onload="Loadiframe()"
    and the Javascript looks like this
    Code:
    <script type="text/javascript">
            function Loadiframe() {
                document.getElementById("iframe1").src = "https://www.vcs.co.za/vvonline/ccform.asp"
                
                return false;
            }
        </script>
    now the purpose of this , is to load the iframe after the page load event of the asp.net gets fired.

    Now my problem here is that when the iframe loads , it does not pass the parameters to the url that is being set in the iframe.

    I have attached the example, project. (2kb)

    When you run the project you will notice when the iframe loads there is an Error

    "NO VCS ID"

    now this means that the parameters were not passed when the Iframe loads , i can understand because it seems like iframe does not do a full form post. so to demonstrate what i want, click the proceed button and you will notice it will give you a page with no errors and it will be a page where credit card details are required , i want to iframe to load that the first time.


    Thanks
    Attached Files Attached Files

Similar Threads

  1. Replies: 3
    Last Post: 07-02-2009, 12:14 PM
  2. Replies: 1
    Last Post: 10-22-2001, 08:34 PM
  3. Updating Fields only in a web page!
    By Sanjay Patel in forum Architecture and Design
    Replies: 4
    Last Post: 02-22-2001, 12:33 PM
  4. IFrame Blanks Parent Page forms
    By Michael Murray in forum Web
    Replies: 0
    Last Post: 12-12-2000, 09:04 PM
  5. Replies: 2
    Last Post: 04-28-2000, 04:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center