Bunny Posted March 18, 2003 Posted March 18, 2003 I have a login form with username and password. This form checks the username and password entered by the user against the username and password fields in my database. The next page selects the related customer name from the database and inserts it into a cookie which is passed onto the search page where it is used as the search criteria. At the moment the user has to click a button on the middle page to get to the search page, but it is not necessary from a user point of view. Is there any way that the middle page (that retrieves the customer name and creates the cookie) can be invisible to the user? I did try using a redirect meta tag, but this does not execute the form on the page and hense does not pass the cookie on. Many thanks in advance for your help!
Anatoli Posted March 19, 2003 Posted March 19, 2003 You can submit blank HTML page with Form through JavaScript. You can also use InLine. You can also redirect page with JavaScript.
Garry Claridge Posted March 20, 2003 Posted March 20, 2003 You can use the "onload" parameter of the <body> tag. to automatically submit a form. For example, <html> <head> <title>Return to Payments from Add Purchase/Payment</title> <meta name="generator" content="BBEdit 6.1.2"> </head> <body onload="javascript:document.shootdetfm.submit();">Returning to Payment Details... <form name="shootdetfm" action="FMPro" method="post"> <input type="hidden" name="-db" value="shoot_talent.fp5"> <input type="hidden" name="-lay" value="allfields"> <input type="hidden" name="-format" value="/pages/photo_payments.html"> <input type="hidden" name="key" value="[FMP-CurrentToken]"> <input type="hidden" name="-find"> </form> </body> </html> Hope this is of use. Garry
Pupiweb Posted March 20, 2003 Posted March 20, 2003 Garrycl what are the pros/cons of the java script compared to a redirect or a FMP-header using the same parameters ?
Unable Posted March 20, 2003 Posted March 20, 2003 "I did try using a redirect meta tag, but this does not execute the form ..." Yes, that is true, it will not process a form. So why not submit the action as a link on redirect00.htm which generates redirect01.htm to get to where you want to go? I imagine the answer to my "why not" is because I no doubt am missing something. Remember...
Garry Claridge Posted March 21, 2003 Posted March 21, 2003 It works It is just the method I use. I haven't really tried any others. Others may also be as simple and work. However, I do usually prefer to use Forms. All the best. Garry
Recommended Posts
This topic is 7988 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now