Question about Ecommerce

1 Answer

Validation code using single loop for multiple fields in javascript

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Mentor:

    An expert who has written 3 tips or uploaded 2 video tips.

    Governor:

    An expert whose answer got voted for 20 times.

  • Expert
  • 80 Answers

As example, use it:

JavaScript Form ValidationJavaScript can be used to validate input data in HTML forms before sending off the content to a server.
Form data that typically are checked by a JavaScript could be:

  • has the user left required fields empty?
  • has the user entered a valid e-mail address?
  • has the user entered a valid date?
  • has the user entered text in a numeric field?
Required FieldsThe function below checks if a required field has been left empty. If the required field is blank, an alert box alerts a message and the function returns false. If a value is entered, the function returns true (means that data is OK):
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{
alert(alerttxt);return false;
}
else
{
return true;
}
}
}The entire script, with the HTML form could look something like this:
<html>
<head>
<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{alert(alerttxt);return false;}
else {return true}
}
}function validate_form(thisform)
{
with (thisform)
{
if (validate_required(email,"Email must be filled out!")==false)
{email.focus();return false;}
}
}
</script>
</head><body>
<form action="submitpage.htm"
onsubmit="return validate_form(this)"
method="post">
Email: <input type="text" name="email" size="30">
<input type="submit" value="Submit">
</form>
</body></html>
E-mail ValidationThe function below checks if the content has the general syntax of an email.
This means that the input data must contain at least an @ sign and a dot (.). Also, the @ must not be the first character of the email address, and the last dot must at least be one character after the @ sign:
function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2)
{alert(alerttxt);return false;}
else {return true;}
}
}The entire script, with the HTML form could look something like this:
<html>
<head>
<script type="text/javascript">
function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2)
{alert(alerttxt);return false;}
else {return true;}
}
}function validate_form(thisform)
{
with (thisform)
{
if (validate_email(email,"Not a valid e-mail address!")==false)
{email.focus();return false;}
}
}
</script>
</head><body>
<form action="submitpage.htm"
onsubmit="return validate_form(this);"
method="post">
Email: <input type="text" name="email" size="30">
<input type="submit" value="Submit">
</form>


P.S.: If this information was helpful, please rate this solution.
</body></html>

Posted on Mar 13, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

How do I start a penny auction web site and be able to use the same source code as quibids or beezid?


Swoopo Wikipedia the free encyclopedia penny auction software pennyauctionguru com
If you are looking to start a penny auction web site and want to use the same source code that the 7 top penny auction sites in the world are using then you need to talk to the two brothers that invented the penny auction. It is a closely gaurded secret by the top sites where they got their source code from ( if every one used the source code that can handle millions of users at once they would lose their advantage) This advantage has allowed them to make millions of dollars a year while hundreds of people waste their money buying other source code from wannabee vendors that are taking advantage of the situation selling code that is fundamentally flawed or can only support 20 to 40 users before a sql bottle neck occurs. The answer to your question, Telebid.com was the first ever penny auction web site which was later changed to swoopo.com. The two twin brothers credited with creating the penny auction are Albert Liske and William Buckell. The two spent a year over coming major coding challenges and developing timers that run on javascript and use a push system. The resulting code would become swoopo.com AG and would make millions of dollars. The two brothers must of had spidey sense because they sold their site for no apparent reason to a German company. A law suit against swoopo and other big name sites like quibids.com would arrive shortly after. Although the sites being sued won the law suit and many others, Those two brothers where quitely approached by different people in the know and investors. Another interesting fact William Buckell was asked to fly to Oklahoma City to meet two investors Matt Beckham and Shaun Tilford about a site they wished to open selling garden products, apparel and jewelry that site was called The okcBIZ website. William suggested that they could use the Swoopo source code to maybe try the penny auction model insted of the ebay style auction the two had originally planned. Although both Beckham and Tilford both deny getting their base code from William or the suggest name change from okcBIZ to what William had mispronounced Quibids, William had left his demo code of Swoopo.com for them to test out now Quibids.com was the new name of Tilfords and Beckhams site, And they quickly adopted the penny auction model. Hiring thier own in house coding team Quibids quickly built its self into one of the top penny auctions in the world. Albert Liske founded pennyauctionsoft.com while William opened pennyauctionguru.com. Liske is credited for helping create sites like beezid, ( the name was decided by the winner of a poker game ) While William helped William create Dealdash, and other sites like bidhere.com. Liske sold pennyauctionsoft.com to a josh mcdonald who quickly ran the company into the ground and sold it to a joel assidorian. Liske moved on to help build a penny auction for Frode Jorgeson called bidsson.com and wrote a MLM site code to work side by side called bidify later to be changed to centerbids.eu and mycenterbids.eu. He was offered a CEO position and found out Frode was running a massive ponzie scheme so he quitely asked for his money he was owed. After he was used and ripped off for his pay, He decided that Frode wasnt all that nice of a guy and maybe every one should know aboout his ponzie. Frode ran off with everyones money and framed Toah ( a payment processor) While Liske returned to penny auction site production founding pennyaucitonwizards selling it and moving on to a multi million dollar app mlm system called cashdojo.com. William has been selling the source code at pennyauctionguru.com for 8 years. The code can be run on multiple servers using CDN cloud support allowing a site to support hundreds of thousands of users at once. Hope that answers your question. There are currently 16 software vendors and only 3 of them sell code that works properly. Starting a penny auction site is one of the most challenging tasks but one of the most rewarding if you can find the proper source code to run it with.
36c83587-569d-41c4-9692-6dd0d5eab58d.png

Sep 14, 2014 | Ecommerce

Tip

I use a utility called "Keypass" to store all of my passwords on a flash drive....


How to create and keep track of all these passwords?

There are a lot of people that say you should never wright down your passwords; while that might be true but that also gives rise to easy to guess passwords.
There are security experts that say it is better to have a complex password written down then an easy to remember password, or to use pass-phrases instead. There are also tools to help you. I have been using to such tools for a while.
They are:
http://strongpasswordgenerator.com/
and
https://www.passwordcard.org/en
Keep you online identity safe and secure.

on Mar 14, 2011 | eBay Auctions

Tip

How to create multiple item listings for fixed price on eBay


You can list multiple, identical items in one listing with a fixed price for each item. Buyers can buy whatever quantity they want at that price. In a fixed price listing, you need to sell your items for at least $1 each. To list in fixed price format, you need to do at least one of these things:
-- Establish your proof of identity with ID Verify (http://pages.ebay.com/services/buyandsell/idverify-login.html).
-- If you have a PayPal account, you need to have a feedback score of 15 and accept PayPal in your listing. -- If you don't have a PayPal account, you should be registered on eBay for at least 14 days and have a feedback score of at least 30.
-- If you're selling through a premium or anchor store, you also need to be PayPal Verified (https://www.paypal.com/helpscr?cmd=_help&locale=en_US&countrycode=US&_dyncharset=UTF8&t=solutionTab&ps=solutionPanels&solutionId=10568). Here's how it works:
1. When listing your item, select the fixed price tab, enter the Buy It Now price, and then enter the number of items for sale in the quantity field. If you don't see the Fixed Price tab or can't enter a number in the Quantity field, verify that you meet the requirements. 2. Buyers purchase one or more of your items by clicking the Buy It Now button on your listing. They can keep buying your items until they run out or the listing ends. If you have more than 10 of the same item, you can choose to show the quantity available as "more than 10" or show the actual number of items available. To select whether to show the exact number of items:
1. Go to My eBay and sign in.
2. Click the "Account" tab, and then click the "Site Preferences" link on the left.
3. Under Selling Preferences, click the "Show" link. 4. Click the "Edit" link next to "Show the exact quantity of items in your listing if the quantity exceeds 10."
5. Select either:
-- Display "More than 10 available" in your listing (if applicable).
-- Display the exact quantity in your listing.
6. Click "Submit."

on Jan 21, 2010 | Ecommerce

2 Answers

How do I use my gift card?


You can pay for eBay items with e-gift certificates, gift cards, and coupons. You need to have eBay and PayPal accounts, but if you don't, you'll be given the opportunity to register on eBay and sign up for a PayPal account when you purchase an item.

To redeem an e-gift certificate, gift card, or coupon, you'll need to log into your PayPal account when you purchase the item. If you don't have an account, you'll be given an opportunity to sign up.
To use an e-gift certificate, gift card, or coupon:

  1. Click the Pay now button.
  2. If the seller offers more than one shipping option, select the one you want.
  3. Enter the redemption code in the Redeem a Gift Card, certificate, or coupon field.
    Tip: If you received your redemption code online, it's easier to copy and paste it into the redemption code field instead of typing it.
  4. Click the Apply button to see your new order total, and then click the Continue button.
  5. On the next page, log in to your PayPal account.
  6. Select a PayPal payment method, and then click the Continue button.
  7. Check your order details, and then click the Confirm payment button.

Aug 11, 2014 | eBay Auctions

6 Answers

What do I need to know to build a eCommerce Site?


If you were asking from developer's point of view, the answer might be too complex. If you're new to website building, you won't want to jump into that before you tackle the basics. That is, HTML (basic framework of a webpage), CSS (formatting and styling) and a little bit of Javascript (functionality). The next step would be to learn about SQL and databases.


If you simply didn't familiar with programming, you can hire a dev instead, pay them to create an eCommerce site for you, and sit back thinking about your business plan.


Or you can sign up into eCommerce platform which designed to help people who want to build their online based business. eCommerce platform basically is a web based applications which you can use to create, host, and manage your own site even you don't have any experiences in web programming, sure you should pay for it, but these option is cheaper instead of hiring a part time programmer to maintain your site.


eCommerce business had to take over the traditional commerce which people can enjoying their ability to sell, shop, even just wanted to know about things they want to buy.


See : Opening an eCommerce site

Dec 12, 2012 | Ecommerce

1 Answer

On "My Ebay" page there are several red boxes that


try and reset your browser. Clean your cookies and files. You can try and install a fresh copy of another browser so if you are using firefox install IE or vice verse.

Mar 19, 2011 | eBay Auctions

1 Answer

How to auction an item, but you have several in stock. How do you handle & location to enter the quantity. Customers have complained that they can only order one.


Hi there!
You can no longer list multiple Auction since the dutch auctiion is no longer available. You can only list one at a time but if you have multiple items, why not list it as a fixed price with multiple quantity? You can also try the variations if you have multiple variations of the listing.
The dutch auction is the type of listing format that eBay had before for multiple auction style but it's already been removed by eBay to promote the fixed price multiple listing format with variations.
I hope this helps. Have a great day!

Oct 08, 2010 | eBay Auctions

1 Answer

Hi do i have to pay shipping on multiple items, textbooks?


This is totally vendor related, eBay has no influence or policy on this at all. Use the column to the left to narrow your searches and then you can choose to list them according to several different parameters, such as: Lowest price with shipping. 

Jan 14, 2009 | eBay Auctions

1 Answer

Listing my car on a classified add


What it is saying is that a value you are entering into a specific field is not valid. This is more common in files being uploaded as .CSV. Go to the link below and you will find the valid value for each field on the eBay and eBay Motors sites.

http://pages.ebay.com/help/sell/import-csv.html

If this link does not take you to the eBay page, copy and paste this into your address field and hit enter.

Please remember to rate this solution.

Sep 18, 2008 | eBay Auctions

Not finding what you are looking for?
Ecommerce Logo

Related Topics:

147 people viewed this question

Ask a Question

Usually answered in minutes!

Top Ecommerce Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18298 Answers

Jimmy Accardi

Level 2 Expert

97 Answers

Are you an Ecommerce Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...