facebook

Compass Navigation Example (Wayne) HELP

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 15 posts - 16 through 30 (of 36 total)
  • Author
    Posts
  • #347459 Reply

    Brandon
    Member

    For 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.
    #347460 Reply

    Brandon 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

    #347461 Reply

    Brandon
    Member

    Opps, yeah thats my fault. I had to edit the code I had and didn’t change the whole thing. Glad you got it working.

    #347475 Reply

    Brandon,

    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

    #347713 Reply

    Dear 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

    #347715 Reply

    Brandon
    Member

    I dont think I understand what you mean…

    #347719 Reply

    Brandon,

    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 screenshot

    Takis

    #347721 Reply

    Brandon
    Member

    So 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)

    #347723 Reply

    I 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 etc

    i uploaded a file with code

    #347725 Reply

    Brandon
    Member

    Oh, you will need an if statement something like:

    if ( $(‘id$=test1’).text() == ‘230’)
    {
    //do this
    $(‘id$=test2’).text(‘You put in 230’);
    }

    #347726 Reply

    i 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
    Takis

    Attachments:
    You must be logged in to view attached files.
    #347727 Reply

    Brandon
    Member

    The 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.

    #347970 Reply

    Dear 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

    #347972 Reply

    Brandon
    Member

    Try 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.
    #347973 Reply

    Brandon 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.
Viewing 15 posts - 16 through 30 (of 36 total)
Reply To: Compass Navigation Example (Wayne) HELP

You must be logged in to post in the forum log in