Trying to force a web page, but it is not working

How can I for a web page and a message on the user from the web when They do not meet certain conditions?

I have this for code but it is not working,

Agent

If doc Is Nothing Then

	server = Evaluate(|@Name([CN];@Subset(@DBName;1))|)

	path = Evaluate(|"/"+@ReplaceSubstring(@Subset(@DbName;-1);"\\";"/")+"/";|)



	Print |<SCRIPT Language="Javascript">|

	Print |alert('| &  "test" + "\n\n" &_

	"You cannot continue .... \n\n" &_

	|you do not have.....ns | & "test" & |');|

	Print |window.location="|&path(0) & |vwwelcomepage/1?OpenDocument&L=E&| &|"|

	Print |</SCRIPT>|				

‘	continue = False

‘	Exit Sub

end if

nothing happens, it does go trought the code but it is not forcing the new page.

Any clues…

P.

Subject: Trying to force a web page, but it is not working…

This is real funny code.

I’d recommend to dump it completely, tell us more precisely what you need to do (what user input has to be validated against what condition, what should happen, if the condition uis meat, what if not) and then start from scratch using the recommendations that will be given.

Subject: RE: Trying to force a web page, but it is not working…

Well, all I need is that when a condition fails I need the code to give the user a message box”You do not meet the conditions, you will be sent back to the main page” something like that.

1- Message to the user .

2- the url needs to send the user back to the main page.

P.

Subject: RE: Trying to force a web page, but it is not working…

Why not you go for javascript validation…here u have not to go back to main page…