JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 25th, 2001, 06:22 PM
AlexNinjaFighte AlexNinjaFighte is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: Pittsburgh PA USA
Posts: 137 AlexNinjaFighte User rank is Corporal (100 - 500 Reputation Level)AlexNinjaFighte User rank is Corporal (100 - 500 Reputation Level)AlexNinjaFighte User rank is Corporal (100 - 500 Reputation Level)AlexNinjaFighte User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 h 22 m
Reputation Power: 15
Question JavaScript PHP and Form submit

Can the Form / Submit get confused?

My opening form line is

<?php
if (!IsSet($stage))
{
?>

<form method="POST" action="<?php print("$PHP_SELF"); ?>" onSubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">

..... bunch of stuff ..............

<input type="hidden" NAME="Stage" Value=1>
<input type="submit" value=" Let's check to see what this looks like. " name="Submit" tabindex="25"><input type="reset" value="Reset the form" name="B2"></p>
</form>

<!-- now ends the first and begins the next stage -->
<?php
}
elseif($Stage == 1)
{
?>

Here's how your listing will appear:
<table>

<tr><TD colspan="2" ><u> <$php print($Event_Month." ". $Event_Date); ?> </u> - <$php print("$Start_Hour"); ?>:<$php $print("$Start_Minute "); ?> <$php print("$Start_Am_Pm"); ?> - <$php if ($Finish_Hour !=" ") print("$Finish_Hour"); ?>:<$php if ($Finish_Minute !=" ") $print("$Finish_Minute"); ?>" "<$php if ($Finish_Am_Pm" !=" ") print("$Finish_Am_Pm"); ?> </TD> </tr>


This was taken from my form (which works) and sends a cgimail to my e-mail.

I'm rying to expand my horizons I want to move the form to PHP/MySQL but at present I get the form back but it skips the JavaScript validation. (The feedback filling of the form doesn't work either, but one problem at a time)

Any obvious hints?

Reply With Quote
  #2  
Old September 25th, 2001, 07:13 PM
JMM JMM is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: USA
Posts: 830 JMM User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 17 m 56 sec
Reputation Power: 13
In your FORM's onsubmit handler I see a call to the function 'FrontPage_Form1_Validator()', but I don't see the function.

Reply With Quote
  #3  
Old September 25th, 2001, 08:16 PM
AlexNinjaFighte AlexNinjaFighte is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: Pittsburgh PA USA
Posts: 137 AlexNinjaFighte User rank is Corporal (100 - 500 Reputation Level)AlexNinjaFighte User rank is Corporal (100 - 500 Reputation Level)AlexNinjaFighte User rank is Corporal (100 - 500 Reputation Level)AlexNinjaFighte User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 h 22 m
Reputation Power: 15
Thanks, but that is at the top of the page....

<script Language="JavaScript"><!--

function FrontPage_Form1_Validator(theForm)
{
monthChoice = theForm.Event_Month.selectedIndex
if (theForm.Event_Month.options[monthChoice].value == "")
{
alert("Please pick the month for the event.");
theForm.Event_Month.focus();
return (false);
}

etc...................

What I am trying to achive is the cycle of post thread...preview ... submit that this forum uses, together with a javaScript field checking
Alex

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > JavaScript PHP and Form submit

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap