In a .NET application, the user will click the "Next" button to move to save their input and move to the next page. The current page they are on is contained in an IFrame, "fraMemberData".
After performing the save routine, it is possible the user needs to be alerted to warnings - not an error, but a warning that some of the data they entered doesn't "match" - the info was saved, but the user needs to know of the potential issues.
I'd like to use a message box to say something like "Data saved, but some providers/services did not match. Click [OK] to continue to the next page, or [Cancel] to see the warnings."
If the user selects cancel, I will stay on the same page and display their warnings. If the user clicks 'OK', I simply want to re-direct them to the next page, which should also be shown in "fraMemberData".
From the .aspx.vb code-behind of the current page within "fraMemberData"
strJavaScript = "<script language='javascript'>" & _
"If (confirm ('Click OK to go to next page, click Cancel to see warnings.'));" & _
"{" & _
"top.frames['fraMemberData
'].locatio
n='../../W
eb_UI/Asse
ssment/Car
e_Plan_Wor
ksheet_3.a
spx';" & _
"}" & _
"</script>"
Page.RegisterStartupScript
("PopupScr
ipt", strJavaScript)
I am able to see my message box, but when I click either button, I receive the "Object Expected" error - I assume this has something to do with my frame.
Also, if I leave off the ";" following my If(confirm(...)) part of the code, I get the ";" expected error. I thought that wasn't necessary with the if statement?
Any help is greatly appreciated.
Start Free Trial