Can this program do calculations? -...

User 2675588 Photo


Registered User
15 posts

here is the link: http://www.australianice.be/fr/voucherorderForm_fr.php

When we put the quantity, the number stay at the left of the box, as you can see. The same happen in all the boxes.
User 187934 Photo


Senior Advisor
20,193 posts

Yes , near the bottom of the code switch the values around.
if(this.value!="" && this.value.length!=0) {
sum += parseFloat(this.value);
$(this).val($(this).val() + "$");//********here

}

});
$('input[name="grandtotal"]').val(sum.toFixed(2)+"$"); //*******here
$('input[name="actual_grandtotal"]').val(sum.toFixed(2));
}

});</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2675588 Photo


Registered User
15 posts

Hi Eric

Sorry the delay but i was in vacations in this last 2 weeks.

Thanks for the info, but i mean the cursor inside the input box and not the € character.
User 187934 Photo


Senior Advisor
20,193 posts

You want your cursor to be the € character just when hovering over the input box or all the time?
Like this?
http://ericrohloff.com/coffeecup/ccforu … ost_grand/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2675588 Photo


Registered User
15 posts

:) It's nice indeed...

Just send you a picture...
Attachments:
User 187934 Photo


Senior Advisor
20,193 posts

You want all of your inputs right aligned or just the one with the arrow in the screen shot?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2675588 Photo


Registered User
15 posts

Only the ones that appear in the picture.

Another thing. I looked to the CSS and notice it create a id for each input, like here:

<input type="text" id="item1_text_1" maxlength="254" placeholder="" autocomplete="off"
data-hint="" name="glace1boule" />

I try to find the id="item1_text_1", but apparently it did not exist. Is this normal?
User 187934 Photo


Senior Advisor
20,193 posts

Add this to the head of your actual form directly above the </head> tag.

<style>
.custom {
cursor: url(../currency.png), auto;
text-align:right;
}
</style>

Next add the jquery selectors to the jQuery code to add a custom class to the inputs you want to have the currency symbol on mouseover and you want right aligned.
Mine look like this. Adjust the names to your input names
$('input[name="item1amount"]').addClass('custom');
$('input[name="item2amount"]').addClass('custom');
$('input[name="grandtotal"]').addClass('custom');
$('input[name="actual_grandtotal"]').addClass('custom');

Make sure you grab a currency symbol and add that to you directory structure.
Attachments:
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2675588 Photo


Registered User
15 posts

Thanks

The jQuery code is add in what file? the .html?
User 187934 Photo


Senior Advisor
20,193 posts

Add it just above this line in the jQuery script.
// name of amount of item 1
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.