NetTalk Central
		NetTalk Web Server => Web Server - Ask For Help => Topic started by: Mike McLoughlin on August 03, 2009, 04:12:47 AM
		
			
			- 
				Sometimes I need to bypass the Login Form, based on a command line parameter, and go straight into the app menu.
I have been trying a few things but can't get round the need to chain to Framepage.
Is there a way to conditionally change the default start page (loginpage) for one session?
Or is there a cleaner way to do the above?
regards
Mike
			 
			
			- 
				Hi Mike,
By command line parameter, do you mean something on the URL?
Probably the easiest way to have a "conditional" first page is to use a NetWebPage, and then (conditionally) embed a tag to the LoginForm, or (conditionally) display some other html.
In other words don't look at conditionally _skipping_ the login, look at conditionally _including_ it.
Cheers
Bruce
			 
			
			- 
				Hi Bruce
Yes when I said "command line" I meant the URL - if the web app is being called from another site the Passowrd etc is already known so I want the user to go straight in without filling out the same password etc again.
I tried your idea and used "IntroPage" as the Default Page.  Then in LoginPage I check for a user in the URL and if none I call this routine.
LoginPage  Routine
  packet = clip(packet) & |
    '<<!-- Net:LoginPage --><13,10>'&|
    ''
But all I get is a blank screen
Could I use LoginPage(p_web) instead?
Mike
			 
			
			- 
				What template type is
IntroPage?
LoginPage?
I assume you meant 
>> Then in [DefaultPage] I check for a user
I'm guessing LoginPage is a NetWebPage. But you can't embed a _page_ in a page. So what you want to do is embed a control - most likely a NetWebForm on your page.
Cheers
Bruce
			 
			
			- 
				I got it working the way I want by putting my code in a routine in FramePage and calling it only if certain values were being passed in the URL.
thanks
Mike