Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 07-20-2005, 06:32 AM   #1 (permalink)
WmFenn
Registered User
 
Join Date: Jul 2005
Posts: 3
WmFenn is on a distinguished road
Child Form to Parent Form

Ok,

I have a form that passes it's values to a submission page written in ASP. The submission page has an include file that checks the values of the user input for invalid characters using RegExp patterns. If the input doesn't match the pattern, I want user to be redirected to the form and have the invalid input highlighted. I can get the form to redirect using "history.go(-1)" but this doesn't allow me to specify what field to highlight.
WmFenn is offline   Reply With Quote
Old 07-20-2005, 06:33 AM   #2 (permalink)
WmFenn
Registered User
 
Join Date: Jul 2005
Posts: 3
WmFenn is on a distinguished road
PS: I don't want to use Pop-Up windows.
WmFenn is offline   Reply With Quote
Old 07-20-2005, 09:10 AM   #3 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
Normaly you'd do this another way, I'm used to php, so here is an example of that, if you're used to reading another language it should be a breeze to alter to be asp.
PHP Code:
<?php
if(isset($_POST['name'] || isset($_POST['email'])
{
/* handle the submit request */
    
if($_POST['name'] == "")
        
$error_name="<a href=# title='Error in submitted name, it must be filled out'><font color=#FF0000>!</font></a>";
    if(
$_POST['email'] == "")
        
$error_email="<a href=# title='Error in submitted email, it must be filled out'><font color=#FF0000>!</font></a>";
    if(!isset(
$error_name) && !isset($error_email))
    {
        
/* do the submitting and all that */
        
echo "Thanks for your submitting";
        exit;
    }
}
echo 
"
<form action='$PHP_SELF'>
$error_name
<input type='text' name='name' value='$_POST[name]'>
$error_email
<input type='text name='email' value='$_POST[email]'>
<input type='submit'>"
;
?>
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
maintaining child relation between pages sde HTML, XML, Javascript, AJAX 1 05-26-2005 12:09 AM
Passing Values from Popup Form to Main Form chrislopezz PHP 7 03-28-2005 01:45 PM
Form Field Change nyoung HTML, XML, Javascript, AJAX 3 03-17-2005 05:38 AM
EMERGENCY: Dynamic form processing DavH27 PHP 8 10-27-2004 08:52 PM
Passing form data to PHP with Javascript bdl PHP 5 07-03-2002 11:18 AM


All times are GMT -8. The time now is 10:17 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting