- This topic has 35 replies, 4 voices, and was last updated 10 years, 8 months ago by Brandon.
-
AuthorPosts
-
BrandonMemberFor some reason its not letting me post the code on the forum so I had to attach it to a file.
Attachments:
You must be logged in to view attached files.
Takis KaragiannopoulosParticipantBrandon thank you for quick reply.
Not working.., I think the problem is in the code: var new = num.toFixed(2)
Edit:
I found the error in the code.
var num = oppDegree
var new = num.toFixed(2)
$(‘[id$=oppDegree]’).text(n) –> (nun)Now everything is working
Thank you very much
BrandonMemberOpps, yeah thats my fault. I had to edit the code I had and didn’t change the whole thing. Glad you got it working.
Takis KaragiannopoulosParticipantBrandon,
thanx for everything.
If you come for vacation to Greece i will give you a free meal in a Greek Tavern and free Tour in Greek sightseeings in Athens. 🙂Takis
Takis KaragiannopoulosParticipantDear Brandon,
you are always helpful and i wonder if you can help me finish my app .
This is what i want:How can i type in the “textbox” degrees and to have text results.
I want this to have the same use as the code you gave me before, but i dont want it in the compass, i need it in a textbox script.Thank you
Takis
BrandonMemberI dont think I understand what you mean…
Takis KaragiannopoulosParticipantBrandon,
this has nothing to do with the compass, but it has the same logic.
I want to input degrees(numbers) and for each number have a text output.
I posted you a screenshotTakis
BrandonMemberSo you want the text box to have text like “Facing: ” and the degrees?
If so you can just add that with the degree variable something like this;
“Facing: ” + yourDegreeVariable inside the textbox assign field (wont allow me to post code for some reason…again)
Takis KaragiannopoulosParticipantI want the same as we did in the compass, but i need it in a new script.
The info-box will not take the information from the compass but from an archive i will add.So for examble if you put in the box the number “230” degrees it will have output a text field “BLA BLA” etc
For other degrees other text etci uploaded a file with code
BrandonMemberOh, you will need an if statement something like:
if ( $(‘id$=test1’).text() == ‘230’)
{
//do this
$(‘id$=test2’).text(‘You put in 230’);
}
Takis KaragiannopoulosParticipanti tried it but it does not work
where to i put the code?
in the file custom.js or in the action textbox?Can you open the attach file to see what i mean via mobione?
Thank you
TakisAttachments:
You must be logged in to view attached files.
BrandonMemberThe code was off the top of my head and wasn’t expected to work as is.
Im not at my development system at this time so not able to test any real code.
If I get a chance later Ill try a real test.
Takis KaragiannopoulosParticipantDear Brandon,
hope you tested my script.
Here i will explain you again what i need.
I want someone to put on the textbox number and for each number he will get a text result.I uploaded a photo. Hope it helps.
Thank you so much in advance
BrandonMemberTry this. There are two ways in it. The active one automatically updates after the box loses focus. The second which is commented out, is the if statement. Which one to use would depend on your needs.
Attachments:
You must be logged in to view attached files.
Takis KaragiannopoulosParticipantBrandon thank you for the quick responce to my problem.
Your script works fine.I attach you a file to see what i exactly want.
I want certain numbers from 10-40 for example to have the same text outfit.
How can we do this?
Thank you again
Attachments:
You must be logged in to view attached files. -
AuthorPosts