Recent

Author Topic: An internet order online form software  (Read 13612 times)

aminer

  • Hero Member
  • *****
  • Posts: 956
An internet order online form software
« on: December 24, 2012, 10:00:51 pm »

Hello,

I have wrote for fun an internet order online form software of 450 lines of code
with Javascript and Object Pascal it's designed for small companies that
wants to sell products on internet, here is what it looks like:

http://pages.videotron.com/aminer/home.htm


I am using three hidden fields: item_name and min, max inside the form
and in the client side i am using the following javascript function to calculate the order:

===

function CalculateOrder(form)
{
var cnt = 0;
var sub = 0;
var products = "";

for(i=form.min.value; i<=form.max.value; i++)
{
str= ""+form.item_name.value+i;
var oText=document.getElementsByName(str)[0]
if (oText)
{
if (oText.value>0)
{
cnt += Math.abs(oText.value);
str1= str+"_price";
oText1 = document.getElementsByName(str1)[0];
sub += Math.abs(oText.value) * oText1.value;
products += oText.value+" x Product " + str+ " @ $"+oText1.value+" + "+"\r\n";
}}}
products=products.substring(0,products.length-5);
form.Products_Ordered.value = products;
form.Total_Value.value = Monify(sub);
form.Total_Price_to_be_Paid.value = Monify(sub);
}
===

In the server side i am using a CGI object pascal program that is processing the order
and sending the form to your email adress, this is also interresting, but if you want to use
a database you can easily change the code for that, and you have to compile the server side
order.dpr source code with Delphi, i will try to port it to freepascal soon..

You can download all my source codes from:

http://pages.videotron.com/aminer/zip/myprog.zip


Thank you,
Amine Moulay Ramdane.


aminer

  • Hero Member
  • *****
  • Posts: 956
Re: An internet order online form software
« Reply #1 on: December 24, 2012, 10:24:47 pm »


Hello,

I will ask you to fill an order in the following order form just for a test,
you can give another name, address , phone and email just for a test.


http://pages.videotron.com/aminer/home.htm


Thank you,
Amine Moulay Ramdane.





aminer

  • Hero Member
  • *****
  • Posts: 956
Re: An internet order online form software
« Reply #2 on: December 24, 2012, 10:28:44 pm »

I wrote:
>you can give another name, address , phone and email just for a test.

I mean you don't have to give your true name, address , phone and email.

Please fill the order form just for a test, and look at the source code
to see how it's working.


Thank you,
Amine Moulay Ramdane.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2329
Re: An internet order online form software
« Reply #3 on: December 24, 2012, 10:33:35 pm »
Hi Aminer,

I try see the page.....

Get a redirect to

http://70.81.144.15/comp.html

and page not found! :'(
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: An internet order online form software
« Reply #4 on: December 24, 2012, 10:51:00 pm »


Hello,


I think my internet company is bloking the IP.

Anyway look at the source code and try to understand it and if you have
any question on how to use it just ask.

The javasript part is: js-comp.js

the sever side part is order.dpr program.

and the HTML is comp.html


Thank you,
Amine Moulay Ramdane.









 

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: An internet order online form software
« Reply #5 on: December 24, 2012, 11:35:54 pm »

>Hi Aminer,

>I try see the page.....
>Get a redirect to
>http://70.81.144.15/comp.html
>and page not found! :'(


Can you try to connect and see if it's working now:

http://pages.videotron.com/aminer/home.htm



Thank you,
Amine Moulay Ramdane.



jmpessoa

  • Hero Member
  • *****
  • Posts: 2329
Re: An internet order online form software
« Reply #6 on: December 24, 2012, 11:53:50 pm »
For me, not!

Page not found again at

http://70.81.144.15/comp.html

 :D
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: An internet order online form software
« Reply #7 on: December 24, 2012, 11:57:02 pm »

>For me, not!
>Page not found again at
>http://70.81.144.15/comp.html


So i am sure now that my internet company is blocking my IP.


Thank you again,
Amine Moulay Ramdane.



 


aminer

  • Hero Member
  • *****
  • Posts: 956
Re: An internet order online form software
« Reply #8 on: December 25, 2012, 12:15:07 am »

Hello,

Can you connect again  and see if it's working,
 i have just changed assigned the IP to my  IIS 

Pouvez-vous tester une autre fois, j'ai assigne lmon IP au IIS :
 
http://pages.videotron.com/aminer/home.htm



Thank you,
Amine Moulay Ramdane.



jmpessoa

  • Hero Member
  • *****
  • Posts: 2329
Re: An internet order online form software
« Reply #9 on: December 25, 2012, 12:18:15 am »
Hello Aminer.... 

page not found again!  :o




Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: An internet order online form software
« Reply #10 on: December 25, 2012, 12:22:25 am »

>Hello Aminer....
>page not found again!


So my internet company gave an IP adresss but i can not use it as a server, they have
blocked it that way.   

But i have tested the program internally with IIS  and it's working correctly.


Thank you,
Amine Moulay Ramdane.


Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: An internet order online form software
« Reply #11 on: December 25, 2012, 12:30:42 am »
Hello,
I can access to http://pages.videotron.com/aminer well.
But when I try http://pages.videotron.com/aminer/home.htm it shows "Redirecting in one moment..." and nothing happens.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: An internet order online form software
« Reply #12 on: December 25, 2012, 12:35:03 am »

Hello,

I have configured windows IIS in another port (88) than 80 ,
perhaps my internet compagny is not blocking port 88,
can you connect again and tell me if it's working:

http://pages.videotron.com/aminer/home.htm


Thank you,
Amine Moulay Ramdane.


Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: An internet order online form software
« Reply #13 on: December 25, 2012, 12:38:26 am »
Yes, now it works. It redirects to http://70.81.144.15:88/comp.html.

Now I can order Pentium 150 MHz  :).
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: An internet order online form software
« Reply #14 on: December 25, 2012, 12:44:59 am »

Blaazen wrote:

>Yes, now it works. It redirects to http://70.81.144.15:88/comp.html.
>Now I can order Pentium 150 MHz 

Great.

I have put Pentium 150 MHz just for a test.



Thank you,
Amine Moulay Ramdane.

 

TinyPortal © 2005-2018