|
Input value problem
|
|
14th April, 10:27
Post: #1
|
|||
|
|||
|
Input value problem
Hi Everyone (and Hi Craig)
I noticed something weird with the tooltip. I have actually two problems : first one : Imagine a select input with options, when I have the mouse pointed on an option, i want to display something about it (and obviously, this something depends on the option), I can't get the value of the optio, here is my code : JS Code
I posted on several french board because I tought it was a javascript with selectors problems.... I'm still waiting for answers on these boards. But I noticed something while I was doing another feature : I have a input, and we have to enter a number into it. But the number hasn't to be used...And i want to test in with a jquery request. I tested this code : JS Code
It works : you enter something, it display what you entered. You changes the input value (you enter another thing), is displays the modified content... Now i tried this : JS Code
It displays "undefined".. so I tried this : JS Code
And it doesn't work. here is the scenario : I load the page, the input is empty. I enter something("5" for exemple), I blur, it displays "". now I just reload the page, the input content is "5", i enter something replacing the content (6 for example) and when i blur, it displays "5" (content no refreshed...) does it seem to be a bug ? I really don't understand... thankyou in advance. |
|||
|
14th April, 13:52
Post: #2
|
|||
|
|||
|
Input value problem
Hi gostbuster,
This is actually a common error when dealing with jQuery's selectors and the $(this) statement. What your actually doing when you reference $(this) in a function of a selector e.g. $('selector').myFunction, is referencing the jQuery object itself, hence why you're getting undefined!!! What you need to do is encapsulate it in the .each() method, which gives you access to each element within the selector, as well as their attributes. So here's the code which should work for you: JS Code
Your second code example also suffers from the little mistake. Here's what it should look like: JS Code
Hope that helps clarify things! Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
14th April, 14:27
Post: #3
|
|||
|
|||
|
Input value problem
Hi Craig, you're GREAT ! I passed hours and hours with the first problem ! But now it's okay. Thanks a lot.
However, i'm still in trouble with the other problem. You suggested me a code that I try, but it's the same. It's a different probleme from the first One. I'll try to explain again in a better language (excuse me in advance if you did understand !) Imagine an input field like this : <input type="text" id="numero" value=""/> the id is unique (there is only one element (input type) named numero. Well the problem is (and with your code, it's the same) : I can't get the content value : First the input is empty, i get then Nothing...it's normal I enter something, it should display what I entered, but it doesn't.... That's the matter.... do you see it? Thankyou in advance ! |
|||
|
14th April, 20:39
Post: #4
|
|||
|
|||
|
Input value problem
Hi Gostbuster,
Have you tried using the api? There may be an easier option out there but this is what I use. Hope this helps. JS Code
|
|||
|
15th April, 09:12
Post: #5
|
|||
|
|||
|
Input value problem
Hi napre and thank you for this answer.
It's almost what I need, but I'm still in trouble. I actually want to get the value (that's done) and request a page with this value, according to what is answered, i need to display the tooltip or not : exemple : JS Code
I'm still looking for thos, using the doc and tryin stuff, but a little more help would be great. Thank you very much. |
|||
|
15th April, 13:33
Post: #6
|
|||
|
|||
|
Input value problem
Hi gostbuster,
You can do this quit easily using the API, as napre suggested. So say when you submit the form you want to check the input is valid: JS Code
Hope this helps! Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
20th April, 07:50
Post: #7
|
|||
|
|||
|
Input value problem
Hi guys,
thanks to your help, I'm very close to the result I expect. I tried lot of stuff. Now here is the scenario : I want to test if a number is already used or not. If it's used, a tooltip appears saying "it's used". Else, it doesn't. This tooltip appears on blur event. With this code below,if the number is used, the tooltip appears (as expected :-) ) but, if the number is free, the tooltip appears,and it disappears just a second later. I don't want it to appear when it's okay. I tryed several things but without success. Here is my code : JS Code
Thank you in advance for you last(i hope) little help. Thanks a lot ! |
|||
|
20th April, 09:43
Post: #8
|
|||
|
|||
|
Input value problem
Try using the beforeShow event and return false if you don't want it to show:
JS Code
Hope that does what you're looking for! Get back to us with any other queries or help if needed. Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
20th April, 11:21
Post: #9
|
|||
|
|||
|
Input value problem
Hi Craig and thanks for your help !
I'm afraid that returning false doesn't hide the tooltip. I tryed your code and the tooltip shows whatever the test result.... Do you see where could be the problem? Thanks... |
|||
|
22nd April, 15:42
Post: #10
|
|||
|
|||
|
Input value problem
Hi everyone,
I'm still in trouble with this tooltip which show. doesn't somebody have a clue about how could I solve it ? Thanks a lot in advance. |
|||
|
22nd April, 16:33
Post: #11
|
|||
|
|||
|
Input value problem
Sorry about the long delay in replying. In the process of moving over to launchpad for various bug reporting and feature suggestion services!
Could you send a link to a demo page or the code your using? Returning false should definitely work, as I've tested it numerous times. Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
23rd April, 08:13
Post: #12
|
|||
|
|||
|
Input value problem
Hi Craig and thank you for replying. Don't be sorry about delay, I know you're should be busy with other stuff and it's normal
![]() Well, Here is My code : JS Code
Don't know what's happening.... i tried this : JS Code
Doesn't work either.Thank you very much. |
|||
|
23rd April, 13:12
Post: #13
|
|||
|
|||
|
Input value problem
Think I found the problem. Try this instead:
JS Code
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
23rd April, 14:24
Post: #14
|
|||
|
|||
|
Input value problem
Hi craig and thanks for your answer,
Unfortunately, it doesn't work, it makes this error : $(this).data("qtip") is undefined but I see what you wanna do : you wanna trigger the qtip display after the ajax reply. I'm gonna try something right now : After the ajax reply, on a blur event : according the reply, I create a tooltip and display it directly (maybe show:false?)..... I'm gonna try this now and give news |
|||
|
23rd April, 14:36
Post: #15
|
|||
|
|||
|
Input value problem
Okay, I tried this which doesn't work :
JS Code
Check out this code, This works with the alert, now I need to display the tooltip (when needed) instead of the alerts. Can do we do this? Thanks ! |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| Hiding tooltip problem | sohailanwarpk | 2 | 400 |
31st January 12:13 Last Post: sohailanwarpk |
|
| [Solved] qTip input fields validation not working with display:none | Maverick | 6 | 1,412 |
25th July 16:44 Last Post: Maverick |
|
| [Solved] Starter problem | enne87 | 1 | 627 |
12th July 17:29 Last Post: Craig |
|
| [Solved] z-index problem | RickardL | 3 | 1,382 |
31st March 19:48 Last Post: kiddailey |
|
| Simpel problem with qtip | SnowJim | 4 | 1,042 |
22nd February 20:08 Last Post: SnowJim |
|
| Viewport problem | dynamicmindset | 8 | 1,413 |
18th February 02:12 Last Post: Craig |
|
| qTip and Forms, how to access form input/elements/form data? | lancelot_one | 2 | 1,560 |
15th February 21:43 Last Post: lancelot_one |
|
| [Solved] Newbie problem :( | todsa | 4 | 1,070 |
24th December 01:03 Last Post: todsa |
|
| qtip + jquery validation not showing the title of the input | mbarros | 3 | 1,804 |
16th November 23:13 Last Post: Craig |
|
| Problem with tip: 'buttomLeft' | amunsen | 1 | 410 |
29th September 17:30 Last Post: Craig |
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Calendar
Help





