Refresh IFRAME via ASP

S

sarel

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.
 
D

Danny Vucinec

just give the IFRAME an Id, e.g. "Calc" and use "Calc.location.replace
strWindow"
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top