Little JavaScript/Smart Navigation help needed.
I have a page that the user wants to see a success, failure message on a save. I do the save routine to the database, and set the blnReturn to whether it works or not. I was using the code below to write out the alert and it was working beautifully....until I turned smart navigation on for the project. Now I get script errors on the page. When I turn off smart navigation, it works again. The requirements are to use smart navigation, and use a alert to tell the user the status of the save. I am not fully up to speed on the javascript scene, so I could use some help in understanding this problem, and a good work around/ better solution.
VB Code:
If blnReturn Then
'Show a saved message.
Response.Write("<script>alert ('Data Saved.')</script>")
Else
'Show an error message.
Response.Write("<script>alert ('ERROR! There was an error saving the data.')</script>")
End If
Smart navigation in the Web.Config:
Code:
<configuration>
<system.web>
<!-- SMART NAVIGATION
This is for smart navigation in the web application.-->
<pages smartNavigation="true" />
</system.web>
</configuration>