JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 5th, 2004, 03:05 PM
jayjay525 jayjay525 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: Detroit, MIchigan
Posts: 1 jayjay525 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to jayjay525
Auto submit

I am trying to automatically submit for2 to a FileMaker Pro Server. Here is my code: It only refreshes the page and clear the fields. Any help is appreciated.


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>

<HEAD>
<TITLE>Lumigen Chemical Receiving</TITLE>
<script><!--
function setFocus() {
document.form1.barcode.focus();
}

function enterbarcode() {

var barcode = document.form1.barcode.value;
var supplierCode = barcode.substring(0,4);
var catNo = barcode.substring(4,10);
var emdCatNo = barcode.substring(4,13);
if (supplierCode != "") {
if (supplierCode == "h479") {
document.form2.CatNo.value=catNo;
document.form2.submit();
alert("submit");
} else if (supplierCode == "h650" ) {
document.form3.CatNo.value=emdCatNo;
document.form3.submit();
} else if (supplierCode == "h999" ) {
document.form4.CatNo.value=catNo;
document.form4.submit();
} else {
alert("This Barcode is invalid")
}
} else {
alert("You did not enter a value")
}
}
// Stop hiding -->
</SCRIPT>

</HEAD>

<BODY onload="setFocus()">

<p><FORM method="post" onsubmit="enterbarcode()" name="form1">
<INPUT type="text" name="barcode">
</FORM></p>


<p><FORM action="FMPro" method="post" id="form2" name="form2">
<P><INPUT TYPE="hidden" NAME="-db" VALUE="BAKERBarcodeData">
<INPUT TYPE="hidden" NAME="-lay" VALUE="BakerRecordData">
<INPUT TYPE="hidden" NAME="-format" VALUE="Results.html">
<INPUT TYPE="hidden" NAME="-error" VALUE="checkinverror.html">
<INPUT name="CatNo" type="text">
<INPUT TYPE="hidden" NAME="-find" VALUE="Start Search">
</FORM></p>


<p><FORM action="FMPro" method="post" id="form3" name="form3">
<P><INPUT TYPE="hidden" NAME="-db" VALUE="EMDBarcodeData">
<INPUT TYPE="hidden" NAME="-lay" VALUE="EMD">
<INPUT TYPE="hidden" NAME="-format" VALUE="Results.html">
<INPUT TYPE="hidden" NAME="-error" VALUE="checkinverror.html">
<INPUT type="text" name="CatNo">
<INPUT TYPE="hidden" NAME="-find" VALUE="Start Search">
</FORM></p>

<p><FORM action="FMPro" method="post" id="form4" name="form4">
<P><INPUT TYPE="hidden" NAME="-db" VALUE="LumigenBarcodeData">
<INPUT TYPE="hidden" NAME="-lay" VALUE="LumigenRecordLayout">
<INPUT TYPE="hidden" NAME="-format" VALUE="Results.html">
<INPUT TYPE="hidden" NAME="-error" VALUE="checkinverror.html">
<INPUT type="text" name="CatNo">
<INPUT TYPE="hidden" NAME="-find" VALUE="Start Search">
</FORM></p>

</BODY>
</HTML>

Reply With Quote
  #2  
Old August 8th, 2005, 10:22 AM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 549 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 7 h 3 m
Reputation Power: 4
form submit

The forms action's are FMPro, I think it should be pointing to a file somewhere, not a name. eg.
action="http://www.myserver.com/fmpro.cgi"

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Auto submit


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT