Refresh IFRAME via ASP

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.
Sarel [ Mi, 05 September 2007 22:26 ] [ ID #1813045 ]

RE: Refresh IFRAME via ASP

just give the IFRAME an Id, e.g. "Calc" and use "Calc.location.replace
strWindow"
DannyVucinec [ Fr, 07 September 2007 14:56 ] [ ID #1814833 ]

Re: Refresh IFRAME via ASP

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

Thanx its working
ASPDeveloper [ Sa, 08 September 2007 09:46 ] [ ID #1815634 ]
Webserver » microsoft.public.inetserver.asp.general » Refresh IFRAME via ASP

Vorheriges Thema: Wildcards in ASP Replace String
Nächstes Thema: OT but Important: Usenet Abuse and Impersonation by a sick individual using IP address 152.209.186.1