Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checks disappear when form is submitted

Status
Not open for further replies.

skaizun

Programmer
Joined
Oct 13, 2006
Messages
2
Location
GB
Please view the source of my relatively simple order form at
(as long as you don't "approve" the Paypal purchase, you'll be fine
- - it takes THREE buttons to get through, plus the entry of your personal information,
so you can't do it "accidentally"!!!).

1) In Internet Explorer 5.5, if I click the "Squzzle" box, then "Buy",
it will bring up the desired pop-up window, but clear the checkbox.
That's fine for that page, since there's only one checkbox to worry about,
but I have order forms with more than one checkbox,
so if the user selects more than one,
it will be VERY annoying to have to re-click them
if he changes his mind after clicking "Buy".

2) In Netscape 4.79, if I do the same thing,
the popup appears, but without the "cancel order" button,
and the "base" window goes to the "main" web page.
When I hit the "back" button, the box is still checked!

3) Firefox does the same as IE, but leaves a number "1" at the bottom of the page.

To simplify things, I would prefer that it work with IE.

Any help you can offer would be appreciated!
 
Please take all of this as constructive criticism - as I think following these points will really help you make your site infinitely better.

- Ditch the tables for layout. You really don't need them. Use CSS instead. There are many tutorials on this, or you can ask over in the HTML/CSS forum (forum215) for help with this.

- Don't use popups. People hate them. Asking people to "please disable your anti-popup software" just doesn't cut it any more. Most people I know would buy elsewhere given a choice of a site that uses popups and one that does not.

- Use relevant keywords if you feel the need to have them. Are the keywords "sex, chocolate, osama, laden, enron, worldcom, taliban, saddam, iraq" really relevant to a site selling games? I don't think so.

- Don't use out-dated or deprecated elements in your markup ("font", "center", etc). Use CSS instead.

- Don't worry about Netscape 4.79. It's so old (more than 6 years, IIRC). I know of no-one that would use an archaic browser that old - and if you do, I suggest you advise them to upgrade. Netscape are now on v8, and v7 was the first really stable decent version. You'll spend more time trying to please the 1 or 2 people who use this than you ever should.

- Validate your markup (there are many free online validators, such as However, I'd rework your page as suggested above before doing this. There's no point in validating code that needs to be re-written.

- Keep your terminology consistent. At the top of your site, you ask users to "click the 'Submit' button". You have no "Submit" button - only "Buy" and "Reset" buttons.

- Don't put your site down ("due to my scanner's limitations...") - instead, get a better scanner, or change the settings to get better quality images. People don't want to know how good things might be - they want to see accurate representations (I certainly do when shopping online).

Anayway - I think that lot should keep you busy for a while, so I'll stop there!

Hope this helps,
Dan

Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
skaizun,

Did you find any of those pointers helpful? I've just taken another quick peek at your site, and don't see too many changes (even the innapropriate keywords are still there).

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I know you meant well, but you did not help with my problem.
I am not going to change the structure of the code,
except to fix the problem.
Plenty of websites - - include banks and brokerages - - use pop-ups.
I'm a computer programmer with over 30 years of experience.
My web pages are easy to create, edit, view and function.
One little glitch does not a rewrite make!
Again, thanks, anyway.
 
I'm not sure how havig outdated markup is any easier to "create, edit and view" than having standards compliant markup - unless you're taking a learning curve into account.

I also don't see how having keywords "sex, chocolate, osama, laden, enron, worldcom, taliban, saddam, iraq" make it any more functional as a site selling board games.

Nor do I see how pandering to < 1% of users (NN 4.79!!) make it any eaier to maintain.

But at least now I can say I've tried!

Dan

Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Dan raised some good points that I think you should take into consideration. Those suggestions will both help the site look better and make it easier to work with and extend at a later point in time.

As far as your current problem is concerned, I believe all you need to do is add a a return to your onSubmit function oncall. When you have an inline event handler like that, returning false directly in it will stop execution of later handlers (like the built in form post that your experiencing right now), basically short-circuiting the method.
Code:
<FORM name="GAMES" onSubmit="[highlight]return [/highlight]TheFormCheck();">

That will stop the form from reloading, which is why your currently getting your values reset.

 
I'd have to agree with Dan about the design. While the tables are passable, in this day and age there's no way I'd rely on popups to do the work you do. But, if you don't want to make sales, that's your choice.

You claim to have been a computer programmer for 30 years, so you should understand about standards changing. When I started programming in C++ 15 years ago, the standards were quite a bit different than now. I took a refresher course in it last year to makes sure I've been adapting to the new standards correctly, and I don't write code according to the standards back then. Most of the code I wrote back then still works fine in modern compilers, but they are distinctly different.

User interfaces are far different from when I started, too. Back then Windows 3.x was just catching on in popularity, and most programs were still available as DOS programs. I don't do much with DOS or console programs any more for user interface design.

Computer programming and markup languages, and interface design is dynamic, and good programmers keep up with what's current (I'm not talking about following all the latest fads and fashions) so they can do what it takes to please the clients. After all, that's where the money comes from.

As for your problem, in similar sites I save the purchase data in a shopping cart system, and you can do that with either client-side or server-side code. There are a variety of shopping carts available, depending on the server-side language you use, as well as some that use Javascript to work with the cookies.

As a programmer, I'm sure you're familiar with the concept that you always build 2 designs: one to throw away after you've learned from it. I'd suggest a redesign of your shopping cart system to one that's more adaptable to multiple item pages.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top