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

retaining form field data in conjunction with Check Username behaviour?

LEGEND ,
Feb 21, 2007 Feb 21, 2007

Copy link to clipboard

Copied

I have a customer registration form. It asks the customer to enter a
username. I have the Check Username behaviour on this form page, along with
the Insert behaviour of course.

If the Username already exists in the database, I am just re-directing to
the same registration form/page however the other fields are wiped after the
re-direct.

How can I retain the data entered in all of these fields so that the
customer only has to enter a new username?

Thanks.
nath.


TOPICS
Server side applications

Views

812
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
LEGEND ,
Feb 21, 2007 Feb 21, 2007

Copy link to clipboard

Copied

You have a few options. You can change the form to GET and treat it like a
query string. The check new username behavior will preserve the query
string. You can also find the redirect part of the behavior and explicitly
add the form collection as a query string (Response.Redirect(myURL &
Request.Form). The form's default values can then be set to the matching
query string value. If the check new username behavior and the actual
insert behavior are on a different page than the form, you can also just
change response.redirect to server.transfer, and the form will then be
available on the registration page.


"tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
news:erhb9i$pmb$1@forums.macromedia.com...
>I have a customer registration form. It asks the customer to enter a
>username. I have the Check Username behaviour on this form page, along
>with the Insert behaviour of course.
>
> If the Username already exists in the database, I am just re-directing to
> the same registration form/page however the other fields are wiped after
> the re-direct.
>
> How can I retain the data entered in all of these fields so that the
> customer only has to enter a new username?
>
> Thanks.
> nath.
>


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
LEGEND ,
Feb 21, 2007 Feb 21, 2007

Copy link to clipboard

Copied

Hi again Lionstone. I notice a couple of requests for this feature, so
hopefully this will help a few out.
At the moment, the form is:
<form ACTION="<%=MM_editAction%>" METHOD="POST" name="form1">

So, I've changed the method to "GET" but I'm now getting this when I submit
the form:
Microsoft JET Database Engine error '80040e10'
Parameter ?_1 has no default value.

Parameter 1 is:
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1,
50, Request.Form("firstname")) ' adVarWChar

Is there something else I need to change other than the Method?
Could you also explain, in a little more detail, how to add the entered form
values to the redirect part of the behaviour? Which behaviour? The Check
Username or the Insert Record?

Hope you can help.

Thanks.
Nath.


"Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in message
news:erhgrm$321$1@forums.macromedia.com...
> You have a few options. You can change the form to GET and treat it like
> a query string. The check new username behavior will preserve the query
> string. You can also find the redirect part of the behavior and
> explicitly add the form collection as a query string
> (Response.Redirect(myURL & Request.Form). The form's default values can
> then be set to the matching query string value. If the check new username
> behavior and the actual insert behavior are on a different page than the
> form, you can also just change response.redirect to server.transfer, and
> the form will then be available on the registration page.
>
>
> "tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
> news:erhb9i$pmb$1@forums.macromedia.com...
>>I have a customer registration form. It asks the customer to enter a
>>username. I have the Check Username behaviour on this form page, along
>>with the Insert behaviour of course.
>>
>> If the Username already exists in the database, I am just re-directing to
>> the same registration form/page however the other fields are wiped after
>> the re-direct.
>>
>> How can I retain the data entered in all of these fields so that the
>> customer only has to enter a new username?
>>
>> Thanks.
>> nath.
>>
>
>


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
Contributor ,
Feb 21, 2007 Feb 21, 2007

Copy link to clipboard

Copied

you could try using the request.form("formField") to retain the values

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
LEGEND ,
Feb 21, 2007 Feb 21, 2007

Copy link to clipboard

Copied

Hi Envision.

I have tried entering request.form("formField") as the default value for
each of the form fields, but when the page re-directs (to itself - only if
the username already exists in the database table) the fields are blank.
Here's an example field:

<input name="firstname" type="text" id="firstname" accesskey="3"
tabindex="3" value="<%= Request.Form("firstname") %>" size="20"
maxlength="30">

My form method is set to POST and when I set it to GET I receive a missing
parameter error.

Has really got me stumped I must admit because I was sure that, because the
form was posting to itself, that I would be able to re-use the form field
data.
Any other ideas?

Much appreciated
Nath.

"envision3d" <webforumsuser@macromedia.com> wrote in message
news:erhr8f$f6s$1@forums.macromedia.com...
> you could try using the request.form("formField") to retain the values


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
LEGEND ,
Feb 21, 2007 Feb 21, 2007

Copy link to clipboard

Copied

The built-in behaviors might only work with a POST form. It's been a while
since I've used them. So scratch that.

In your case, it's the check new username redirect that you need to preserve
the values. In that behavior, you'll see a line that says
Response.Redirect(something). That something might be a variable such as
MM_redirectURL, or it might be the actual page URL "myForm.asp" or
something. In either case, just add the entire form to the URL:
Response.Redirect(someVariable & "&" & Request.Form)
or
Response.Redirect("somePage.asp?" & Request.Form)

If I recall, the check new username redirect URL already has "badusername"
added to the query string, that's why I appended "&" in the first example.
If that's different now, then simply use "?" as normal to start the query
string part of the URL.


"tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
news:erhic5$4n7$1@forums.macromedia.com...
> Hi again Lionstone. I notice a couple of requests for this feature, so
> hopefully this will help a few out.
> At the moment, the form is:
> <form ACTION="<%=MM_editAction%>" METHOD="POST" name="form1">
>
> So, I've changed the method to "GET" but I'm now getting this when I
> submit the form:
> Microsoft JET Database Engine error '80040e10'
> Parameter ?_1 has no default value.
>
> Parameter 1 is:
> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1,
> 50, Request.Form("firstname")) ' adVarWChar
>
> Is there something else I need to change other than the Method?
> Could you also explain, in a little more detail, how to add the entered
> form values to the redirect part of the behaviour? Which behaviour? The
> Check Username or the Insert Record?
>
> Hope you can help.
>
> Thanks.
> Nath.
>
>
> "Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in message
> news:erhgrm$321$1@forums.macromedia.com...
>> You have a few options. You can change the form to GET and treat it like
>> a query string. The check new username behavior will preserve the query
>> string. You can also find the redirect part of the behavior and
>> explicitly add the form collection as a query string
>> (Response.Redirect(myURL & Request.Form). The form's default values can
>> then be set to the matching query string value. If the check new
>> username behavior and the actual insert behavior are on a different page
>> than the form, you can also just change response.redirect to
>> server.transfer, and the form will then be available on the registration
>> page.
>>
>>
>> "tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
>> news:erhb9i$pmb$1@forums.macromedia.com...
>>>I have a customer registration form. It asks the customer to enter a
>>>username. I have the Check Username behaviour on this form page, along
>>>with the Insert behaviour of course.
>>>
>>> If the Username already exists in the database, I am just re-directing
>>> to the same registration form/page however the other fields are wiped
>>> after the re-direct.
>>>
>>> How can I retain the data entered in all of these fields so that the
>>> customer only has to enter a new username?
>>>
>>> Thanks.
>>> nath.
>>>
>>
>>
>
>


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
LEGEND ,
Feb 21, 2007 Feb 21, 2007

Copy link to clipboard

Copied

Hi Lionstone,

The line you reference, in the Check Username behaviour reads:
Response.Redirect(MM_dupKeyRedirect)

MM_dupKeyRedirect is specified earlier in the script as:
MM_dupKeyRedirect = "registration.asp"

The script also tags on the duplicate username as a querystring value
"requesrname", as you rightly state.

So, anyway, I changed the Response.Redirect to read:
Response.Redirect(MM_dupKeyRedirect & "&" & Request.Form)

...and I notice that the form data is being brought over as a QueryString,
however I am now getting this:

Microsoft JET Database Engine error '80040e10'
Parameter ?_1 has no default value.
line 63

Line 63 is:
MM_editCmd.Execute

...but Parameter 1 is:
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1,
50, Request.Form("firstname")) ' adVarWChar

...regardless of whether I have the method set to POST or GET.

Not sure what this could be. Any ideas?
Appreciate the help, as ever.

Regards
nath.

"Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in message
news:erhtk2$i86$1@forums.macromedia.com...
> The built-in behaviors might only work with a POST form. It's been a
> while since I've used them. So scratch that.
>
> In your case, it's the check new username redirect that you need to
> preserve the values. In that behavior, you'll see a line that says
> Response.Redirect(something). That something might be a variable such as
> MM_redirectURL, or it might be the actual page URL "myForm.asp" or
> something. In either case, just add the entire form to the URL:
> Response.Redirect(someVariable & "&" & Request.Form)
> or
> Response.Redirect("somePage.asp?" & Request.Form)
>
> If I recall, the check new username redirect URL already has "badusername"
> added to the query string, that's why I appended "&" in the first example.
> If that's different now, then simply use "?" as normal to start the query
> string part of the URL.
>
>
> "tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
> news:erhic5$4n7$1@forums.macromedia.com...
>> Hi again Lionstone. I notice a couple of requests for this feature, so
>> hopefully this will help a few out.
>> At the moment, the form is:
>> <form ACTION="<%=MM_editAction%>" METHOD="POST" name="form1">
>>
>> So, I've changed the method to "GET" but I'm now getting this when I
>> submit the form:
>> Microsoft JET Database Engine error '80040e10'
>> Parameter ?_1 has no default value.
>>
>> Parameter 1 is:
>> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1,
>> 50, Request.Form("firstname")) ' adVarWChar
>>
>> Is there something else I need to change other than the Method?
>> Could you also explain, in a little more detail, how to add the entered
>> form values to the redirect part of the behaviour? Which behaviour? The
>> Check Username or the Insert Record?
>>
>> Hope you can help.
>>
>> Thanks.
>> Nath.
>>
>>
>> "Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in message
>> news:erhgrm$321$1@forums.macromedia.com...
>>> You have a few options. You can change the form to GET and treat it
>>> like a query string. The check new username behavior will preserve the
>>> query string. You can also find the redirect part of the behavior and
>>> explicitly add the form collection as a query string
>>> (Response.Redirect(myURL & Request.Form). The form's default values can
>>> then be set to the matching query string value. If the check new
>>> username behavior and the actual insert behavior are on a different page
>>> than the form, you can also just change response.redirect to
>>> server.transfer, and the form will then be available on the registration
>>> page.
>>>
>>>
>>> "tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
>>> news:erhb9i$pmb$1@forums.macromedia.com...
>>>>I have a customer registration form. It asks the customer to enter a
>>>>username. I have the Check Username behaviour on this form page, along
>>>>with the Insert behaviour of course.
>>>>
>>>> If the Username already exists in the database, I am just re-directing
>>>> to the same registration form/page however the other fields are wiped
>>>> after the re-direct.
>>>>
>>>> How can I retain the data entered in all of these fields so that the
>>>> customer only has to enter a new username?
>>>>
>>>> Thanks.
>>>> nath.
>>>>
>>>
>>>
>>
>>
>
>


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
LEGEND ,
Feb 21, 2007 Feb 21, 2007

Copy link to clipboard

Copied

Hi. Also...I don't want to carry over the password in the QueryString. Is
there any way of leaving it out?

Nath.

"Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in message
news:erhtk2$i86$1@forums.macromedia.com...
> The built-in behaviors might only work with a POST form. It's been a
> while since I've used them. So scratch that.
>
> In your case, it's the check new username redirect that you need to
> preserve the values. In that behavior, you'll see a line that says
> Response.Redirect(something). That something might be a variable such as
> MM_redirectURL, or it might be the actual page URL "myForm.asp" or
> something. In either case, just add the entire form to the URL:
> Response.Redirect(someVariable & "&" & Request.Form)
> or
> Response.Redirect("somePage.asp?" & Request.Form)
>
> If I recall, the check new username redirect URL already has "badusername"
> added to the query string, that's why I appended "&" in the first example.
> If that's different now, then simply use "?" as normal to start the query
> string part of the URL.
>
>
> "tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
> news:erhic5$4n7$1@forums.macromedia.com...
>> Hi again Lionstone. I notice a couple of requests for this feature, so
>> hopefully this will help a few out.
>> At the moment, the form is:
>> <form ACTION="<%=MM_editAction%>" METHOD="POST" name="form1">
>>
>> So, I've changed the method to "GET" but I'm now getting this when I
>> submit the form:
>> Microsoft JET Database Engine error '80040e10'
>> Parameter ?_1 has no default value.
>>
>> Parameter 1 is:
>> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1,
>> 50, Request.Form("firstname")) ' adVarWChar
>>
>> Is there something else I need to change other than the Method?
>> Could you also explain, in a little more detail, how to add the entered
>> form values to the redirect part of the behaviour? Which behaviour? The
>> Check Username or the Insert Record?
>>
>> Hope you can help.
>>
>> Thanks.
>> Nath.
>>
>>
>> "Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in message
>> news:erhgrm$321$1@forums.macromedia.com...
>>> You have a few options. You can change the form to GET and treat it
>>> like a query string. The check new username behavior will preserve the
>>> query string. You can also find the redirect part of the behavior and
>>> explicitly add the form collection as a query string
>>> (Response.Redirect(myURL & Request.Form). The form's default values can
>>> then be set to the matching query string value. If the check new
>>> username behavior and the actual insert behavior are on a different page
>>> than the form, you can also just change response.redirect to
>>> server.transfer, and the form will then be available on the registration
>>> page.
>>>
>>>
>>> "tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
>>> news:erhb9i$pmb$1@forums.macromedia.com...
>>>>I have a customer registration form. It asks the customer to enter a
>>>>username. I have the Check Username behaviour on this form page, along
>>>>with the Insert behaviour of course.
>>>>
>>>> If the Username already exists in the database, I am just re-directing
>>>> to the same registration form/page however the other fields are wiped
>>>> after the re-direct.
>>>>
>>>> How can I retain the data entered in all of these fields so that the
>>>> customer only has to enter a new username?
>>>>
>>>> Thanks.
>>>> nath.
>>>>
>>>
>>>
>>
>>
>
>


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
LEGEND ,
Feb 22, 2007 Feb 22, 2007

Copy link to clipboard

Copied

"tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
news:erib49$4sv$1@forums.macromedia.com...
> Hi. Also...I don't want to carry over the password in the QueryString.
> Is there any way of leaving it out?
>
> Nath.

Yes, but it will irritate you. :)
You'll have to loop through the form and leave out the password:

For Each FormVar In Request.Form
If FormVar <> "password" Then
MM_dupKeyRedirect = MM_dupKeyRedirect & "&" & Request.Form(FormVar)
End If
Next
Response.Redirect(MM_dupKeyRedirect)


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
LEGEND ,
Feb 22, 2007 Feb 22, 2007

Copy link to clipboard

Copied

"tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
news:eria49$3sd$1@forums.macromedia.com...
> Line 63 is:
> MM_editCmd.Execute
>
> ...but Parameter 1 is:
> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1,
> 50, Request.Form("firstname")) ' adVarWChar
>
> ...regardless of whether I have the method set to POST or GET.
>

Everything from the redirect will be Request.QueryString as the form no
longer exists. Although it's not normally recommended, in this case, you'd
probably be best served by simply using Request("firstname"). It will
search the querystring and form collections to find the value and use it if
it exists in either. It's not really that simple (there are other
collections involved, they're searched in a certain order, etc), but if
you've got a field that always exists in either the form or querystring then
you'll be fine.


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
LEGEND ,
Feb 22, 2007 Feb 22, 2007

Copy link to clipboard

Copied

Hi Lionstone,

That's confused me! (isn't difficult!) :o).

The Insert Record code surely needs Request.Form("fieldname") for each
parameter, as the data that's entered, and is submitted, is ultimately
coming from the form fields, not the querystrings?

Why isn't "Request("firstname")" normally recommended?

Hope to hear from you,

Regards
Nath.


"Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in message
news:erk5mp$af8$1@forums.macromedia.com...
> "tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
> news:eria49$3sd$1@forums.macromedia.com...
>> Line 63 is:
>> MM_editCmd.Execute
>>
>> ...but Parameter 1 is:
>> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1,
>> 50, Request.Form("firstname")) ' adVarWChar
>>
>> ...regardless of whether I have the method set to POST or GET.
>>
>
> Everything from the redirect will be Request.QueryString as the form no
> longer exists. Although it's not normally recommended, in this case,
> you'd probably be best served by simply using Request("firstname"). It
> will search the querystring and form collections to find the value and use
> it if it exists in either. It's not really that simple (there are other
> collections involved, they're searched in a certain order, etc), but if
> you've got a field that always exists in either the form or querystring
> then you'll be fine.
>


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
LEGEND ,
Feb 22, 2007 Feb 22, 2007

Copy link to clipboard

Copied

"tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
news:erkga4$muq$1@forums.macromedia.com...
> Hi Lionstone,
>
> That's confused me! (isn't difficult!) :o).
>
> The Insert Record code surely needs Request.Form("fieldname") for each
> parameter, as the data that's entered, and is submitted, is ultimately
> coming from the form fields, not the querystrings?

Maybe I didn't read carefully. If your check new username passes and
execution continues and the insert is on the same page, then yes, I'd expect
you to use Request.Form if your form submitted as a POST form. Check the
spelling of your field names.

> Why isn't "Request("firstname")" normally recommended?

It's slower. The collections are searched in order (I believe QueryString,
Form, ServerVariables, Cookies), and if you request a key that doesn't
exist, then ALL of those collections are searched.

>
> Hope to hear from you,
>
> Regards
> Nath.
>
>
> "Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in message
> news:erk5mp$af8$1@forums.macromedia.com...
>> "tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
>> news:eria49$3sd$1@forums.macromedia.com...
>>> Line 63 is:
>>> MM_editCmd.Execute
>>>
>>> ...but Parameter 1 is:
>>> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202,
>>> 1, 50, Request.Form("firstname")) ' adVarWChar
>>>
>>> ...regardless of whether I have the method set to POST or GET.
>>>
>>
>> Everything from the redirect will be Request.QueryString as the form no
>> longer exists. Although it's not normally recommended, in this case,
>> you'd probably be best served by simply using Request("firstname"). It
>> will search the querystring and form collections to find the value and
>> use it if it exists in either. It's not really that simple (there are
>> other collections involved, they're searched in a certain order, etc),
>> but if you've got a field that always exists in either the form or
>> querystring then you'll be fine.
>>
>
>


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
LEGEND ,
Feb 23, 2007 Feb 23, 2007

Copy link to clipboard

Copied

I've ditched it. Totally fed up wrestling with it and I can't get it to
work despite best efforts. Thanks for your attempts to help, but I'm still
receiving Parameter errors, or, empty form fields.
I am just going to use WebAssists Cookies Toolkit instead.

It appears that it's not possible to achieve what I want using standard
Dreamweaver functions. I've noticed that there are quite a few others out
there who have also wrestled with this, but haven't found a solution. Maybe
a feature request for future versions?

Anyway, I believe the Cookies Toolkit has what I need.

Thanks anyway,
Nath.

"Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in message
news:erkjeq$qoj$1@forums.macromedia.com...
> "tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
> news:erkga4$muq$1@forums.macromedia.com...
>> Hi Lionstone,
>>
>> That's confused me! (isn't difficult!) :o).
>>
>> The Insert Record code surely needs Request.Form("fieldname") for each
>> parameter, as the data that's entered, and is submitted, is ultimately
>> coming from the form fields, not the querystrings?
>
> Maybe I didn't read carefully. If your check new username passes and
> execution continues and the insert is on the same page, then yes, I'd
> expect you to use Request.Form if your form submitted as a POST form.
> Check the spelling of your field names.
>
>> Why isn't "Request("firstname")" normally recommended?
>
> It's slower. The collections are searched in order (I believe
> QueryString, Form, ServerVariables, Cookies), and if you request a key
> that doesn't exist, then ALL of those collections are searched.
>
>>
>> Hope to hear from you,
>>
>> Regards
>> Nath.
>>
>>
>> "Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in message
>> news:erk5mp$af8$1@forums.macromedia.com...
>>> "tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
>>> news:eria49$3sd$1@forums.macromedia.com...
>>>> Line 63 is:
>>>> MM_editCmd.Execute
>>>>
>>>> ...but Parameter 1 is:
>>>> MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202,
>>>> 1, 50, Request.Form("firstname")) ' adVarWChar
>>>>
>>>> ...regardless of whether I have the method set to POST or GET.
>>>>
>>>
>>> Everything from the redirect will be Request.QueryString as the form no
>>> longer exists. Although it's not normally recommended, in this case,
>>> you'd probably be best served by simply using Request("firstname"). It
>>> will search the querystring and form collections to find the value and
>>> use it if it exists in either. It's not really that simple (there are
>>> other collections involved, they're searched in a certain order, etc),
>>> but if you've got a field that always exists in either the form or
>>> querystring then you'll be fine.
>>>
>>
>>
>
>


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
LEGEND ,
Feb 23, 2007 Feb 23, 2007

Copy link to clipboard

Copied

Did you try sessions?

Basically, you set the sessions to the forms fields and then when they
get bounced to the next page, it fills in their information.

ASP version

This get's placed on the 2nd page.

<%
if (cStr(Request.Form("formname")) <> "") then
Session("ssSessionNameForEachtextboxhere") = "" &
cStr(cStr(Request.Form("FormTextBoxNameFromTheFormSent"))) & ""
end if
%>

Then, using the binding, you just pull the sessions into the form

It's fairly easy.

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
LEGEND ,
Feb 27, 2007 Feb 27, 2007

Copy link to clipboard

Copied

Hi Lee,

There isn't a 2nd page! This is all within one page! :o)

I have an INSERT form that uses the Check New Username behaviour. If the
username exists, it redirects to the same page so that the person can try a
new username.

"It's fairly easy."..... Muhahahahahahaaaa!!! :o)

Nath.

"Lee" <lee_nospam_@artjunky.com> wrote in message
news:ern45k$rgo$1@forums.macromedia.com...
> Did you try sessions?
>
> Basically, you set the sessions to the forms fields and then when they get
> bounced to the next page, it fills in their information.
>
> ASP version
>
> This get's placed on the 2nd page.
>
> <%
> if (cStr(Request.Form("formname")) <> "") then
> Session("ssSessionNameForEachtextboxhere") = "" &
> cStr(cStr(Request.Form("FormTextBoxNameFromTheFormSent"))) & ""
> end if
> %>
>
> Then, using the binding, you just pull the sessions into the form
>
> It's fairly easy.


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
LEGEND ,
Feb 27, 2007 Feb 27, 2007

Copy link to clipboard

Copied

LATEST

"tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
news:es14o6$88g$1@forums.macromedia.com...
> Hi Lee,
>
> There isn't a 2nd page! This is all within one page! :o)
>
> I have an INSERT form that uses the Check New Username behaviour. If the
> username exists, it redirects to the same page so that the person can try
> a new username.
>
> "It's fairly easy."..... Muhahahahahahaaaa!!! :o)
>
> Nath.

It really is easy. Try this one instead.
Don't redirect.

<%
This is the check new username behavior.
Pretend it's all the DW-generated script.

If (something) Then
Response.Redirect(MM_redirectURL)
End If
%>
<%
This is the insert behavior. Pretend it's all the DW script.
%>

OK. Now that I've outlined the page (ha!), make one simple change:

<%
This is the check new username behavior.
Pretend it's all the DW-generated script.

If (something) Then
[This is where the redirect was, but you've deleted it now.]
This is the insert behavior.
Pretend it's all the DW script.
End If
%>

Ta-da! Now your form is available to you and there's no insert when the
username is a duplicate. To print a message to the user like "Sorry, try
again" or whatever, check for a value in DW's badusername variable that it
creates.

<%
If MM_badUserName <> "" Then
Response.Write("<p>Sorry, but that name is already in use. Please try
again.</p>")
End If
%>

I know that's not what it's called, but you found it earlier. I'm just too
lazy to look back in the thread. 😉


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