Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Issue with Dreamweaver CS3 Check username behavior

Guest
Jul 29, 2010 Jul 29, 2010

Copy link to clipboard

Copied

Let me start by saying that I'm not a developer, and I may be in over  my head on the project I'm working on.

I'm creating a  page to register new user's information into aa Access user table. I've  created a registration form, and added the Insert Record behavior. That  works fine, no problems. However, when I add the Check New User  behavior, I get some strange results.

If the new  username is valid (not a duplicate), the form processes and goes to my  "thank you for registering" page. Great.

If the new  username is not valid, the behavior redirects to the "sorry, pick a  different username" page. Great.

When the user goes  back to the registration page to change the User Name and tries to  submit the form, and error message appears thet the connection  (MM_rsKey) is still open. When I look at the code (with my very limited  knowledge of actual code), it looks like the behavior doesn't close the  connection unless the selected User Name is valid. If the redirect  happens, and the user goes back to the registration form page, the  connection hasn't been closed, and the form simply won't process.

I've  even tried splitting the registration into 2 parts... I created a form  with only the User Name field and a submit button, thinking I'll just  make the second part of the process an update, where the additional  information is added to the existing record that matches the user name,  but still no joy.

I even checked to see if the code  that closes the connection resides on the redirect page, but I don't  think that's the case.

I'm probably missing some  perfectly simple step, but I just can't seem to figure it out.

I  appreciate any help with this. Thanks in advance.

Ken

TOPICS
Server side applications

Views

1.0K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 30, 2010 Jul 30, 2010

Copy link to clipboard

Copied

The RSKey Recordset should close at the end of the Check code block regardless of the outcome.  Is it there, or did it somehow get moved elsewhere, such as the end of the page.

Also check to make sure this code comes before the insert code.

I've never run into this problem, maybe because i don't redirect them back to the original registration page - I just have a duplicate registration page with the Oops message on top.  Perhaps not efficient, but it saves the users an extra click.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 03, 2010 Aug 03, 2010

Copy link to clipboard

Copied

Lon,

Thanks for the response.

I stopped fighting with the behavior and changed the process so the enter username is step 1. The form has only 1 input field that passes to a page that does the comparison. If the username is unique, it redirects to a page with the rest of the registration information, otherwise it passes back to the original page with a "please enter a different user name" message.

Works much better this way, and I don't have to figure out how to manipulate the Dreamweaver code.

Ken

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 24, 2010 Aug 24, 2010

Copy link to clipboard

Copied

LATEST

Yes, that's really how that behavior is meant to be used. You could even take it a step further and have a password field on the first page.

The only issue I have with that scenario is is for some reason, the user doesn't complete step two - then you essentially have the account created but not complete. So then you have to add some sort of check upon login and direct the user back to step 2 if he never filled out that part.

So you may want to start thinking about eventually building a registration page where it's all containined on the same page. The prococess would be something like this:

1. User enters all required information,  including username and password.

2. The page is submitted, but before the insert record occurs the check new username runs, or some variation of it.

3. If it passes, the record is inserted and rediects to the confirmation page.

4. If it doesn't pass the check, instead of a redirect like the behavior does, it displays a message.

5. the tricky part here is not to lose all the other entered information. That can be retained in a session, and bound back to the input fields.

That's just an overview, and i'm sure you've seen enough web forms to recognize the workflow - usually with registration forms and online shopping and checkout forms.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines