How to load Two iframe in one aspx page?

Discussion in 'Software' started by pratima, Jan 19, 2008.

  1. pratima

    pratima

    Joined:
    Jan 19, 2008
    Messages:
    1
    I have page LotteryResultPage.aspx .
    And i have one control which has drop down and value is like this
    <option value="SelectStates">Select a Country</option>
    <option value="3">US,Canada,U.K.& Ireland </option>
    <option value="8">Mexico</option>

    control has GO buttonwhich calls javascript function and passes the parameter value like this LotteryResultPage.aspx?country=



    I need to load two iframe in the page LotteryResultPage.aspx. but when country value is 3 load iframe which has src = iframe/lottery_results.html

    and when country value is 8 load another iframe src = iframe/lottery2.html .

    I don't want tboth iframe source at a same time in the page.



    Or in shortcut,
    Load iframe in aspx page according to the querystring value
    if LotteryResultPage.aspx?country=3
    load iframe 1

    if LotteryResultPage.aspx?country=8
    load iframe 2

    thanks
     
    pratima, Jan 19, 2008
    #1
    1. Advertising

  2. pratima

    ProgTalk

    Joined:
    Dec 4, 2007
    Messages:
    12
    you can hide any of the two frames using javascript. Here is an example:

    function hideframe(frameid)
    {
    var fr = document.getElementById (frameid);
    fr.style.display = 'none';
    }

    function showframe(frameid)
    {
    var fr = document.getElementById (frameid);
    fr.style.display = 'block';
    }

    bought to you courtesy of www.progtalk.com
     
    ProgTalk, Feb 2, 2008
    #2
    1. Advertising

  3. pratima

    ProgTalk

    Joined:
    Dec 4, 2007
    Messages:
    12
    try to hide the iframe

    document.all["IFRAMEID"].style.display = 'none';
     
    ProgTalk, Feb 2, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Naga_01
    Replies:
    0
    Views:
    1,421
    Naga_01
    Jun 6, 2006
  2. eyal1234
    Replies:
    1
    Views:
    1,419
    sjk123
    Jul 22, 2008
  3. Armando Ruiz

    default.aspx or login aspx?

    Armando Ruiz, Jun 22, 2004, in forum: MCAD
    Replies:
    0
    Views:
    452
    Armando Ruiz
    Jun 22, 2004
  4. getmeaditi
    Replies:
    0
    Views:
    1,735
    getmeaditi
    Mar 10, 2009
  5. Sangeeth
    Replies:
    0
    Views:
    2,236
    Sangeeth
    Jun 25, 2009
Loading...

Share This Page