- This topic has 35 replies, 4 voices, and was last updated 11 years, 4 months ago by
Brandon.
-
AuthorPosts
-
February 23, 2014 at 12:52 pm #347459
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.February 23, 2014 at 1:41 pm #347460
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 muchFebruary 23, 2014 at 4:13 pm #347461
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.
February 24, 2014 at 6:41 am #347475
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
March 4, 2014 at 8:37 am #347713
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
TakisMarch 4, 2014 at 9:14 am #347715
BrandonMemberI dont think I understand what you mean…
March 4, 2014 at 9:47 am #347719
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
March 4, 2014 at 9:58 am #347721
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)March 4, 2014 at 11:19 am #347723
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
March 4, 2014 at 11:29 am #347725
BrandonMemberOh, you will need an if statement something like:
if ( $(‘id$=test1’).text() == ‘230’)
{
//do this
$(‘id$=test2’).text(‘You put in 230’);
}March 4, 2014 at 12:27 pm #347726
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.March 4, 2014 at 12:47 pm #347727
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.March 12, 2014 at 9:04 am #347970
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
March 12, 2014 at 9:39 am #347972
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.March 12, 2014 at 11:01 am #347973
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