Skip to main content
March 17, 2009
Question

one button for submitting information and linking to another page

  • March 17, 2009
  • 1 reply
  • 283 views
Hello evryone,
I need help regarding Button in dreamweaver cs4. I am near to finish my website but I have one button which I used to send value to my email using behavior setting(on click) and after that this button takes me to the next linked page. I built two behaviors tags 1 on click - Go to Url and 2. is on click- validate form. button is working well but when I put wrong data in my text fields then internet explorer shows message "you need to put correct email address, etc then I simply click on OK but after that it takes me to the liked page.
But I want here if I put wrong data it displays message "you need to put correct email address, etc" after clicking OK it should remains the same and when I put correct infromation then the likned page should be displayed.
Could you help me in this
Thanks for your time guys
This topic has been closed for replies.

1 reply

Inspiring
March 17, 2009
> I built two behaviors tags 1 on click - Go to Url and 2. is on
> click- validate form.

The correct way to do a form validation is NOT to have it applied to a
submit button, but to apply it to the <form> tag with the 'onsubmit' event
as a trigger. Sounds like you are not doing this - am I correct?

The correct way to a) validate first, and b) send to a subsequent page,
would be to use a server-side script for the validation, and when if that
validation succeeds, it would then formulate and send your email, after
which it would redirect you to a confirming page. Javascript (client side)
validation can be useful, but is not sufficient in any situation where you
are then sending emails or entering data into a database.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Fatehjhalli" <webforumsuser@macromedia.com> wrote in message
news:gpnesm$s9c$1@forums.macromedia.com...
> Hello evryone,
> I need help regarding Button in dreamweaver cs4. I am near to finish my
> website but I have one button which I used to send value to my email using
> behavior setting(on click) and after that this button takes me to the next
> linked page. I built two behaviors tags 1 on click - Go to Url and 2. is
> on
> click- validate form. button is working well but when I put wrong data in
> my
> text fields then internet explorer shows message "you need to put correct
> email
> address, etc then I simply click on OK but after that it takes me to the
> liked
> page.
> But I want here if I put wrong data it displays message "you need to put
> correct email address, etc" after clicking OK it should remains the same
> and
> when I put correct infromation then the likned page should be displayed.
> Could you help me in this
> Thanks for your time guys
>