Refresh IFRAME via ASP

Discussion in 'ASP General' started by sarel@oscarsystems.co.za, Sep 5, 2007.

  1. Guest

    Hi,

    I need to refresh an IFRAME in my asp page, currently I use a popup
    screen to do the calculation, but want to add an IFRAME in the page.

    Here is the code that I currently use.

    <SCRIPT Language="VBScript">
    Function CalcPremium()
    If document.Pers_Info.txtCalcPremium.Value = "True" or
    document.Pers_Info.txtAutoCalcUser.Value = "True" Then
    strWindow = "Rates/AllRisk.asp?Area='" &
    document.Pers_Info.txtPostal_Code.Value & "'"
    If document.Pers_Info.txtSum_Insured.Value > "0" Then
    strWindow = strWindow & "&Sum_Insured=" &
    (document.Pers_Info.txtSum_Insured.Value)
    Else
    strWindow = strWindow & "&Sum_Insured=0.5"
    End if
    strWindow = strWindow & "&NCB='" & document.Pers_Info.cboNCB.Value
    & "'"
    strWindow = strWindow & "&Type=" & document.Pers_Info.cboType.Value
    & ""
    strWindow = strWindow & "&Include10Discount=5"
    If document.Pers_Info.txtDiscounts.Value > "0" Then
    strWindow = strWindow & "&Discounts=" &
    document.Pers_Info.txtDiscounts.Value
    Else
    strWindow = strWindow & "&Discounts=0"
    End if
    If document.Pers_Info.txtLoadings.Value > "0" Then
    strWindow = strWindow & "&Loadings=" &
    document.Pers_Info.txtLoadings.Value
    Else
    strWindow = strWindow & "&Loadings=0"
    END IF
    strWindow = strWindow & "&CalcDate=" &
    document.Pers_Info.txtCalcDate.Value
    strWindow = strWindow & "&AutoCalcUser=" &
    document.Pers_Info.txtAutoCalcUser.Value
    strWindow = strWindow & "&AutoPremium=" &
    document.Pers_Info.txtPremium.Value
    strWindow = strWindow & "&txtCalcPrm2=" &
    document.Pers_Info.txtCalcPrm2.Value
    strWindow = strWindow & "&Debug=0"

    window.open strWindow, "CalcPrem", "width=1, height=1, top=0,
    left=0"
    CalcPremium = 0
    Else
    CalcPremium = 0
    End If
    END Function
    </SCRIPT>

    Instead on opening a popup I want to parse strwindow's value to the
    IFRAME to open the new page.

    All your help will be apreciated.
    , Sep 5, 2007
    #1
    1. Advertising

  2. just give the IFRAME an Id, e.g. "Calc" and use "Calc.location.replace
    strWindow"
    Danny Vucinec, Sep 7, 2007
    #2
    1. Advertising

  3. ASPDeveloper Guest

    On Sep 7, 2:56 pm, Danny Vucinec
    <> wrote:
    > just give the IFRAME an Id, e.g. "Calc" and use "Calc.location.replace
    > strWindow"


    Thanx its working
    ASPDeveloper, Sep 8, 2007
    #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. brian lanning
    Replies:
    0
    Views:
    590
    brian lanning
    Jul 29, 2003
  2. Bill Cohagan

    Refresh "other" frame via ASP?

    Bill Cohagan, Nov 25, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,740
    Jacob Yang [MSFT]
    Nov 26, 2003
  3. Per Magnus L?vold
    Replies:
    1
    Views:
    5,109
    John C. Bollinger
    Oct 8, 2004
  4. Scott
    Replies:
    6
    Views:
    930
    [MSFT]
    Apr 14, 2004
  5. Daedalous
    Replies:
    3
    Views:
    678
    Daedalous
    Jan 16, 2004
Loading...

Share This Page