April 3, 2019 at 9:13 am #421838
@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.April 3, 2019 at 9:21 am #421840
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.April 3, 2019 at 9:32 am #421848
Tim KMember307 pts@timk
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.April 3, 2019 at 9:41 am #421850
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 🙂April 3, 2019 at 9:46 am #421853
@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 🙂September 9, 2019 at 9:49 am #431284
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!September 9, 2019 at 10:43 am #431290
<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.September 9, 2019 at 10:53 am #431296
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.
Thank you 🙂September 10, 2019 at 12:52 am #431309
<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…September 10, 2019 at 6:06 am #431346
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?
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’);
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.September 10, 2019 at 10:07 am #431359
Darrel SomozaMember199 pts@Klaatu
Deja vu. Use search, we did this already.
You must be logged in to reply to this topic.