Re: [jsmn] Question for JSMN folks: Grabbing data from a form field prior to submit

From: James G.
Sent on: Thursday, February 7, 2013 11:37 AM
Good call, Tom (and Judah).  Yes, we already have a Google Group forum established, so future Q&A can go there: http://groups.google.com/group/javascript-mn

(Or, better yet, use StackOverflow as Judah suggested.)

Sincerely,
    James Greene



On Thu, Feb 7, 2013 at 11:35 AM, Judah Gabriel Himango <[address removed]> wrote:
Guys, you're flooding my inbox with back-and-forth on a technical question. I'm subscribed to this list because I want to know about JSMN events, not to figure out why keyup textbox input isn't working right for somone.

I'm all for helping people, but this is probably best done in public, where others can benefit from a solution. Perhaps if this question is posted to StackOverflow, the answers and discussion can take place there?

-Judah


On Thu, Feb 7, 2013 at 11:30 AM, James Greene <[address removed]> wrote:
Works fine for me in Chrome 24 on Windows 7:

Inline image 1


First message is from me clicking the button before changing the text. The second message is after I changed the text and clicked the button again.

It also worked fine for me when I [after a page refresh] changed the text before clicking the button:

Inline image 2

Sincerely,
    James Greene



On Thu, Feb 7, 2013 at 11:24 AM, Jordan Lane Peacock <[address removed]> wrote:
Sorry, I'm new to jsfiddle, and I'm extracting this function from a much larger JavaScript application. I figured out how to add jQuery so that the function works, and changed the alert() to a console.log().


The thing is, it works here. Which makes me suspect the following: everything within the parentdiv is, in the original application, being appended to that div using jQuery following an AJAX call; whereas with the jsfiddle code, the elements already exist.

I tried sketching out an approximation of what the broader program is doing, here, but unlike the above example, this one does not function, but is purely illustrative:



Jordan Peacock
=====================
[address removed]
[address removed]
[address removed]



On Thu, Feb 7, 2013 at 10:49 AM, James Greene <[address removed]> wrote:
There isn't any element with the "parentContainer" class.  Please update your JSFiddle and test it before you send the next link to ensure the `alert` is firing.

Sincerely,
    James Greene



On Thu, Feb 7, 2013 at 10:41 AM, Jordan Lane Peacock <[address removed]> wrote:
Sorry, it was same as previous. Here's the updated jsfiddle:



Jordan Peacock
=====================
[address removed]
[address removed]
[address removed]



On Thu, Feb 7, 2013 at 10:36 AM, Kobby Appiah <[address removed]> wrote:
Hmm seems like the fiddle only has the js in it and not the html or the result you are seeing can you tweak that so we see what you are seeing?
On Feb 7, 2013, at 10:26 AM, Jordan Lane Peacock wrote:

The only problem is that .val() does not give me the entered value, but the default value. See attached screenshot and jsfiddle.


Jordan Peacock
=====================
[address removed]
[address removed]
[address removed]



On Wed, Feb 6, 2013 at 5:23 PM, Marc Grabanski <[address removed]> wrote:
Like this? http://jsfiddle.net/6SEBu/

Replace myservice.php with your server and it will post a filterlog variable with the value as what is inside the input.


On Wed, Feb 6, 2013 at 5:11 PM, Jordan Lane Peacock <[address removed]> wrote:
It's not an input type="submit", just a <button> tag. The keyup script I placed there, as that's the most promising I've found.


What I'd like to do is read the contents of the text box logfilter when the View Log is clicked. I'll then make an AJAX call based upon what was typed.


Jordan Peacock
=====================
[address removed]
[address removed]
[address removed]



On Tue, Feb 5, 2013 at 10:07 PM, Mark Wagner <[address removed]> wrote:
Hey Jordan,

Maybe I am misunderstanding the problem but how is this any different then form validation?

bind to the submit button click event, stop the default, validate your fields.. proceed.

If I'm missing something please let me know,  Can you make a simple jsfiddle that demonstrates the problem?

I have found that jsfiddles make it easier for people to understand the problem.

Totally willing to help,

Mark


On Tue, Feb 5, 2013 at 9:40 PM, Jordan Lane Peacock <[address removed]> wrote:
I haven't seen any requests for assistance on this list, but neither have I seen any specific rules barring such questions. If there are, and I missed them, I apologize and retract the question.

I've been scouring Stack Overflow and similar sites. I'm developing an appliance administrative interface, and I have a function that needs to operate on any text, if present, in a form text field.

The text is present, and I see it in the DOM, but I can't for the life of me seem to get the function to recognize it. Most of the answers I've found online fall into the categories "can't be done" or "you need to monitor every key press".

I'm using the jquery, jquery-ui and jeditable libraries, nothing else although I'm open to others if they are applicable.

Thank you

Jordan Peacock
=====================
[address removed]
[address removed]
[address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jordan Lane Peacock ([address removed]) from JavaScriptMN.
To learn more about Jordan Lane Peacock, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]



--
Mark Wagner, Web & Mobile Developer
:coderow
Web & mobile application development for business
m: [masked] | o: [masked]
www.coderow.com | [address removed] | @thesociableme







--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Mark Wagner ([address removed]) from JavaScriptMN.
To learn more about Mark Wagner, visit his/her member profile





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jordan Lane Peacock ([address removed]) from JavaScriptMN.
To learn more about Jordan Lane Peacock, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]



--
Marc




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Marc Grabanski ([address removed]) from JavaScriptMN.
To learn more about Marc Grabanski, visit his/her member profile





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jordan Lane Peacock ([address removed]) from JavaScriptMN.
To learn more about Jordan Lane Peacock, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]
<wrong.png>





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Kobby Appiah ([address removed]) from JavaScriptMN.
To learn more about Kobby Appiah, visit his/her member profile





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jordan Lane Peacock ([address removed]) from JavaScriptMN.
To learn more about Jordan Lane Peacock, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by James Greene ([address removed]) from JavaScriptMN.
To learn more about James Greene, visit his/her member profile





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jordan Lane Peacock ([address removed]) from JavaScriptMN.
To learn more about Jordan Lane Peacock, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by James Greene ([address removed]) from JavaScriptMN.
To learn more about James Greene, visit his/her member profile



--
-Judah Gabriel Himango 
{ Kineti L'Tzyion | Debugger.Break(); | Chavah Messianic Radio | MessianicChords }




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Judah Gabriel Himango ([address removed]) from JavaScriptMN.
To learn more about Judah Gabriel Himango, visit his/her member profile

Our Sponsors

  • Twilio

    Super simple API for SMS, MMS, Voice/VoIP in native mobile or web apps

  • CoCo Co-Working

    Our gracious hosts!

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy