Form Question, I think? Not sure what to use

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a webpage that I want people to read the terms and have to input thier
initials and then choose a button to continue. I want the button to take
them to another web page not on MY website. I don't want to collect
information, I simply want to make the page verify that they input 2-3
letters and choose "continue".

How do I do this?

I tried using a form and tried every combination of properties, etc...that I
can see. But I'm not very technical, so I'm not sure what I am missing.

Please help!
Thanks!
Michelle
 
Create a form field, then set the field to require the letters "YESyes" under form field validation,
however the next page will need to check for the "yes" or "YES" value since the user could have
JavaScript disabled.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
Hi Michelle,

Create a regular FrontPage form. Remove any Submit button from the form.
Right-click the form, and select "Form Properties" from the context menu.
Click the "Send to Other" radio button, and then click "Okay." This removes
any "action" property from the Form, which means that it will not submit to
any URL. Add a "Push Button" to the form, and give it whatever label you
want. Add a text box to the form, and name it "T1."

Then you want to go into the HTML for the form, and add an id attribute to
the button. Something like:

<input type="text" name="T1" id="T1" size="10">

Now add a JavaScript to the page, in the HTML, anywhere in the page between
the body tags. The following will do:

<script type="text/javascript"><!--
function buttonHandler()
{
var el = document.getElementById("T1");
if (el.value == "")
{
alert("You must enter your initials.";
return;
}
document.location = "http://whateverYourUrlToRedirectIs";
}
// --></script>

Add an "onclick" event handler for the button:

<input type="text" name="T1" id="T1" size="10" onclick="buttonHandler()">

Bob's your uncle.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
 
Ok, I am following you Kevin, but I'm getting an error and have one other
question.

I input the Javascript code after the <body> but it now gives me an error
when I try and view the page.

I went ahead and started to add the "onclick" script under body also, but I
get the same message. I'm assuming I'm entering it in the wrong place.

Any thoughts??? Thanks for being patient.
Michelle
 
PositiveMichelle said:
http://www.positiveimagesonline.com/ProofInstructions.asp
This is the page UNEDITED. I'd like to learn if you can show me
where to enter the code.

THANKS !!!!!!

I can't see where the initials are requested

But a word on the layout

It must be
<html>

<head>
<script ...........>
</script>
</head>

<body>

</body>
</html>

There should be no duplicate of these tags (except that you can have many
<script></script> pairs if you want)
There should be no code before <html> or after </html>

<script> goes in the <head>.

<input> goes in the <body>.

Try sorting this out for a start
 
There's a field underneath the purple box of text which Presume is the one
you enter the three chars in? There's no instruction saying "enter your
initials", you should put that in so people know what they need to do to go
to the next page/site/whereever.
 
Hi Michelle,

I tend to not just give code away, in the interest of helping people to
learn how to do things on their own, but, in this case, I've written out an
entire script/HTML section for you, which you will want to modify to fit
into your page. I have tested the following code successfully. Just promise
me you'll study and try to understand it!

<script type="text/javascript"><!--
function buttonHandler()
{
var el = document.getElementById("T1");
if (el.value == "")
{
alert("You must enter your initials.");
return;
}
document.location = "http://albums.millerslab.com/positiveimages";
}
// --></script>
<form method="POST">
<p>&nbsp;<input type="text" name="T1" id=""T1""size="10">
<input type="button" value="Enter your initials to continue" name="B1"
onclick="buttonHandler()"></p>
</form>

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
 
Kevin,
Thank you. I was making it harder than it really was. I am trying to
understand this, as well as stay up to date with my photography field,
marketing, accounting and customer service of my own photography studio.

I very much appreciate your help. I was not asking for you to do it for me,
I was simply getting confused with everything I had tried. I sincernly
appreciate your knowledge and help. It means so much to me to have this
simple function in my site. It will save me some headaches with clients not
reading. At least this way if they don't read the policies they are being
held responsible anyway.

Thank you for your time. Please feel free to contact me if you need help
with any photo related items, as that is my specialty. :-)
 
My pleasure, Michelle. :-)

I know you weren't asking me to do it for you, and I appreciate that. I'm a
"teach a person to fish" type of guy, as that seems more helpful in the long
run. But you certainly did give it a good try, and it seemed to me that the
most efficient thing to do at this point would be to give you some code that
works, and let you use/modify/study it.

I can certainly see why you call yourself "Positive Michelle!"

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
 
Back
Top