close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

field input round number

Thread began 8/28/2012 6:18 am by QuiruNet | Last modified 8/30/2012 1:22 am by QuiruNet | 1337 views | 8 replies |

QuiruNet

field input round number

send you a image you attached to show a example, what i need the field input "cajas field" as a round number, not like now show: 2.13, i need roun the number to 3, and with ecart buy the iten 3 boxes.

Sign in to reply to this post

Jason ByrnesWebAssist

you can use a java script on change event on the text field:

onchange="this.value = Math.ceil(this.value);"
Sign in to reply to this post

QuiruNet

doesnt work

see upload file.

x1.php

I put like you told me. Thanks

Attached Files
x1.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

works for me, see the attached screen shots.

maybe you need to clear your browsers cache.

Sign in to reply to this post

QuiruNet

round number

see the image attach it.

Sign in to reply to this post

Jason ByrnesWebAssist

it would have helped a great deal if you had let me initially that you where using javascript to populate the the subtotal field.


in your script, change:

document.calcform.subtotal.value = dp(eval(document.calcform.quantity1.value) / (document.calcform.select1.value))

to:
document.calcform.subtotal.value = ciel(dp(eval(document.calcform.quantity1.value) / (document.calcform.select1.value)))

Sign in to reply to this post

QuiruNet

not working

x1.php

i did you told me and but not in the result field "boxes" nothing appears. If you try to put a number in field "put her your number", automatically it give you the price and de boxes (rounded), but the boxes field is empty.

Sign in to reply to this post

Jason ByrnesWebAssist

sorry, i had a syntax error, this line:
document.calcform.subtotal.value = ciel(dp(eval(document.calcform.quantity1.value) / (document.calcform.select1.value)))


should be:
document.calcform.subtotal.value = Math.ceil(dp(eval(document.calcform.quantity1.value) / (document.calcform.select1.value)))

Sign in to reply to this post

QuiruNet

it works

thank so much. you are de best

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...