User Profile
Collapse
-
what error message are you getting? -
Leave a comment:
-
-
-
flash cs3 textboxes
hello to all! I havent used any of the flash cs3 components before but i am trying to get use one of the UI components to create a text box where i can get the value that a user enters into the text box and place it on another clip.
at this point, i am just trying to figure out how to get the entered value and place it on an empty movieclip.
i am merely researching at this point so i dont have anything to show you guys yet.... -
function not defined in browser
hello all, i am having another problem with a file i am working on. acoder was great enough to help me to get it working but now when i came back to it today, its telling me that the function isn't defined. so here it is:
Code:function getPrice() { var qty = parseInt(document.prodform.quantity.value, 10); var y = document.prodform.price.value; var num = new Number(document.prodform.price.value);
-
-
IT WORKS! acoder, thanks for all your help you have no idea how much i really appreciate it.
thanks to bytes for having ppl on here like you that we can talk to inorder to get help.
this will be the last question for this thread. is there any way i can "fix" the decimals to two places? sometimes i ll get a value that looks like this: 1586.7199999999 998 instead of making it 1586.72....Leave a comment:
-
ok acoder, how about this?
could i do qty <= 12 && qty > 24?
that way the logic would be asking if this quantity is in between these two numbers? would that be possible???Leave a comment:
-
but that doesnt explain why it only uses the qty2016 value.
the first one has to be if qty greater than or equal to12 and is also less than 23, calculate the quantity by 3.17 (php echo recordset1)
if quantity is greater than or equal to 24 and is also less than or equal to 35, calculate quantity by 2.95 (php echo recordset2)
and so on til it gets to 2016. also something else that has me confused is why...Leave a comment:
-
this thing still isnt right. instead of cycling thru the if else if statement it either chooses between qty12 or qty2016 and nothing in the middle and if i punch in a different number it still references it's original calculation.... here's the newest, please let me know.
[CODE=JavaScript]
if (qty <= 12 && qty >= 23) { with this one the min they can order is 12
y = qty * 3.17; ...Leave a comment:
-
this things still isnt right... i really dont know why!!!!!!
for some reason, when i enter a quantity, the only number it calculates by qty2016 value = 1.81. like it doesn't cycle thru the entire function,
Code:function getPrice() { var qty = parseInt(document.prodform.quantity.value, 10); var qty12 = <?php echo $row_Recordset1['qty12']; ?>; var qty24 = <?php
Leave a comment:
-
see what i mean??? so that it doesnt interfere with the next recordset.
[CODE=javascript]function getPrice(qty)
{
var qty = parseInt(docume nt.prodform.qua ntity.value, 10);
var qty12 = <?php echo $row_Recordset1['qty12']; ?>;
var qty24 = <?php echo $row_Recordset2['qty24']; ?>;
var qty36 = <?php echo $row_Recordset3['qty36'];...Leave a comment:
-
acoder,
good news!!! i got it working but there is another problem. All the qty# fields are going to be less than 2016 (the last one in the list). so is there way i can say if qty is less than 24 BUT NO MORE than 35 use this formula?
or something similar thanks again
Code:if (qty <= 12 <24) <-- this { y = qty * <?php echo $row_Recordset1['qty12']; ?>;
Leave a comment:
-
you know? when i got home last night, i thought the same thing. when i got to work this morning, i had already placed it in the code. so idk.... but it still doesnt work either....Leave a comment:
-
ok heres the source for the entire page. basically all my other functions work with the exception of the one to calculate quantity * price.
the code is supposed to do this:
user --> enters a quantity of 150-->getCalc says number is greater than 144 use the next one up = qty288--> cust(150) * qty288 --> spits out answer in text box for price. once that value is placed in the text box i need you use to later...Leave a comment:
-
ARGGHHHH!!!! this doesnt work either?!?!?!?!? what i am doing wrong here?????
Code:function getCalc(){ var qty = parseInt("document.prodform.quantity.value",10); alert(document.prodform.price.value); var qty12 = parseFloat(<?php echo $row_Recordset1['qty12']; ?>); var qty24 = parseFloat(<?php echo $row_Recordset2['qty24']; ?>); var qty36
Leave a comment:
-
acoder, have a question for ya... since i have those php variables being passed to hidden text boxes on the form, (and they actually show up) is there a way i can reference them instead of trying to call the php variable into the Javascriptfunct ion? i dont very much about php (still tryin to learn while i am doing this....) so i am trying to find the most streamlined method of making the client side do most of the work......Leave a comment:
-
OMG!!! this is getting really frustrating... here's the new code that also doesn't work. I understood what you meant about the parse float but since you said to use it on the user entered value, there's not a need for it as the user can only enter numbers that arent decimals..... IDK what is going on with this but i am really at a road block. any other ideas?????
Code:function getCalc(){ var qty = parseInt(document.prodform.quantity.value);
Leave a comment:
-
acoder this is what i did with what you sent me... unfortunately, it doesnt work in IE or FF (havent even bothered to check safari) any ideas????
thanks again for all the help. Maybe it's because the values from the recordsets have decimals?? also i need to be able to show these as currency values and not just integers...
Code:function getCalc(){ var qty = parseInt(document.prodform.quantity.value);
Leave a comment:
No activity results to display
Show More
Leave a comment: