Explore the community Forums Lectora Lectora Questions & Answers Formatting in-line variables

Viewing 11 posts - 16 through 26 (of 26 total)
  • Author
    Posts
  • #421838 Score: 1
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    118 pts
    @mnotermans5114

    @timk your pageTransition caused it to NaN at start… in my zip based on your version i just added some delay on those actions at show… and then it works perfectly.

    This post has received 1 vote up.
    #421840 Score: 0
    Profile photo of Lydia B
    Lydia B
    Member
    beginner
    intermediate
    curious george
    wise owl
    friend finder
    contributor
    @lb1730

    It works! All of you have been amazing! (I may be a bit too excited by this. Sorry…:D)

    It will take a bit of studying of the file on my part to be comfortable with the usage of these functions, but I think I can take it from here. I may ask you again if I can’t make it run for a different question.

    Another problem: The way you formatted the number (ex A1) in the text box will only work if there is no other text in the text box, is this correct?  So if I have a question that contain more text in the text box with the variable, how can I make it format?

    Thank you again.

    #421848 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    307 pts
    @timk

    @mnotermans5114

    Thanks. I didn’t realize there was a transition in the sample when previewing the single page. I should have published. I used Lectora 17.0.6, maybe the transitions changed after that. I usually avoid all transitions whenever possible, too much effort for too little effect 😉

    Another thing to learn from: You can test as much as you want on your side, there’s no guarantee it’ll work somewhere else … and I couldn’t count the number of times I pressed F5, to make A7 a negative value which only happens once in a 1,00,0 whiles.

    #421850 Score: 0
    Profile photo of Lydia B
    Lydia B
    Member
    beginner
    intermediate
    curious george
    wise owl
    friend finder
    contributor
    @lb1730

    Apparently the transition was inherited from the template. Although, it does not seem like it is really making any difference to the view of feel of the page, so I may follow your example and take it out.

    Something new I have learned! Thanks Tim 🙂

    #421853 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    118 pts
    @mnotermans5114

    @timk Agree on all, and i could have known it wasnot your transition 😉 I too avoid them mostly. When testing your own work, at some point you get blind for other approaches. So always good to let others do some tests, you often encounter things you didnot think of 🙂

    #431284 Score: 0
    Profile photo of Lydia B
    Lydia B
    Member
    beginner
    intermediate
    curious george
    wise owl
    friend finder
    contributor
    @lb1730

    @mnotermans5114

    Math,

    I see in your file you use the “CSS Align Input fields to the right” to justify the input fields. This works great and even I can use it! However, it justifies all the entry fields on the page. Is there a way to target specific fields, but not others? And if so how would I go about it?

    Thank you so much!

    • This reply was modified 1 week, 5 days ago by Profile photo of Lydia B Lydia B.
    • This reply was modified 1 week, 5 days ago by Profile photo of Lydia B Lydia B.
    #431290 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    22 pts
    @CarlFink

    <span class=”handle-sign”>@</span>lb1730, Math hasn’t been around much lately. I hope he returns!

    May I suggest assigning the entry fields you wish to justify to a class? See Trivantis’ resource here.

    #431296 Score: 0
    Profile photo of Lydia B
    Lydia B
    Member
    beginner
    intermediate
    curious george
    wise owl
    friend finder
    contributor
    @lb1730

    <span class=”handle-sign”>@</span>CarlFink

    I tried doing that based on this post, but it seems that the fields get justified, but the formatting brings all the other values back to the default (like entry field height etc). This creates whole bunch of other issues, because I need fields right justified that are of various sizes etc. (Perhaps, I did something wrong…I am unfamiliar with using CSS or Javascript, so it is very possible. lol)

    Math’s code did exactly what I needed, but on the global scale. If I can use this code to target a specific field that would be perfect solution, as it seems easy to use.

    Any ideas?

    Thank you 🙂

    #431309 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    118 pts
    @mnotermans5114

    <span class=”handle-sign”>@</span>lb1730 Lidia, Carl’s solution should work. you can target specific input- or textfields. Doublecheck anything you can find in the forum about CSS and classes… in the end that will help. Also important to watch the difference between Lectora 17 ( or before ), 18 and Lectora Online…all have differences… As Carl stated…i havenot been around a lot… one reason is offcourse work keeping me busy…

    I dont have L18… but in L17 and Lectora Online i can make a sample if time permits this week..  Let me know if you need it, and i see if i can make time…

    #431346 Score: 0
    Profile photo of Lydia B
    Lydia B
    Member
    beginner
    intermediate
    curious george
    wise owl
    friend finder
    contributor
    @lb1730

    @mnotermans

    I really appreciate you taking the time to respond.

    I have search and tried, but I am afraid that my lack of knowledge is preventing me from getting it to work.

    I followed the instructions on the post mentioned by Carl and got the field to be right justified and used your code to add the commas as thousand separators, but the code changed the way the entry field looks. It took out all my other changes to the field and upon input it seems as it took the field back to default.

    Is it possible to alter your code to target specific field?

    Your code:

    <style>
    input{
    text-align:right;
    }
    </style>

    The above code justifies all the fields. I need to target the specific one.

    You also used this code to add commas as thousand separators:

    var theentry = document.getElementById(“%HTMLNAME%id”).value.replace(/,/g, ”);
    document.getElementById(“%HTMLNAME%id”).value = parseFloat(theentry).toLocaleString(‘en’);
    VarEntry_0001.set(document.getElementById(“%HTMLNAME%id”).value);

    Thank you again for that code! It works amazing and it is easy to use. Is there a way to add decimal places? I tried the currency, but it adds a dollar sign, which I do not want. I tried to add the minimum and maximumFractionDigits, but it disallowed number larger than one integer.

    If you are able to, I would appreciate any help you may offer. Thank you for responding either way Math.

     

    #431359 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    199 pts
    @Klaatu

    Deja vu. Use search, we did this already.

Viewing 11 posts - 16 through 26 (of 26 total)

You must be logged in to reply to this topic.