addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1light-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Re: [jsmn] JavaScript/CoffeeScript problem in Rails search form

From: Jason M.
Sent on: Wednesday, August 14, 2013 11:55 AM
JSMN list for announcements.
Google group for technical questions.

On Aug 14, 2013, at 11:43 AM, Kevin Whinnery <[address removed]> wrote:

James/Jason, FWIW I personally would actually like to see more technical discussion on this list (I feel like the RubyMN group has really good content in this vein).

Quick straw poll - is James' assertion correct that people would prefer to discuss tech and specific issues like this one off list?  If so, we can resurrect the Google group (I don't check it anymore) or do something else besides use this mailing list.

Thanks,
-Kevin




On Tue, Aug 13, 2013 at 8:38 AM, James Greene <[address removed]> wrote:

For generic questions, we highly advise using StackOverflow instead of a local group mailing list. You will find more people available to help and won't bother the members of this list who are on it strictly for announcements (pretty much everyone).

If you feel the need to keep this off SO for some reason, please use our Google Group forum instead:
    https://groups.google.com/group/javascript-mn

Thanks, and good luck resolving your issue!

Sincerely,
   James Greene

On Aug 12,[masked]:51 PM, "Jason Hsu, Rubyist" <[address removed]> wrote:
I have two Rails apps up and running, Bargain Stock Funds and Doppler Value Investing.  Please note that I haven't done any Javascript programming beyond the "Hello World" stage.

Both apps have search engines that uses the Ransack gem (for the search form) and the Kaminari gem (provides paginated results).  The search pages are http://www.bargainstockfunds.com/funds and http://www.dopplervalueinvesting.com/stocks , respectively.  The URLs for the source code are https://github.com/jhsu802701/bsf and https://github.com/jhsu802701/dvi , respectively.

In the production environment (the one that sees the light of day), the "add field" and "remove" buttons on the Doppler Value Investing search page work, but the "add field" and "remove" buttons on the Bargain Stock Funds page do not work.  What's even stranger is the fact that the "add field" and "remove" buttons do work in the development environment.  Yes, the Bargain Stock Funds search page works in the development environment but not in the production environment.

I posted about this on the ruby.mn Google group, and Joshua Wehner suggested that I have a problem with JavaScript and/or CoffeeScript.  Thus, I've decided to post here as well, as this is the forum where the top JavaScript people congregate.

The JavaScript/CoffeeScript file on the Bargain Stock Funds site is app/assets/javascripts/funds.js.coffee script.  The analogous file on the Doppler Value Investing site is app/assets/javascripts/stocks.js.coffee .  Both have the following code:

# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file:
http://jashkenas.github.com/coffee-script/
jQuery ->
$('form').on 'click', '.remove_fields', (event) ->
$(this).closest('.field').remove()
event.preventDefault()

$('form').on 'click', '.add_fields', (event) ->
time = new Date().getTime()
regexp = new RegExp($(this).data('id'), 'g')
$(this).before($(this).data('fields').replace(regexp, time))
event.preventDefault()

Exactly how can I get an error message to appear?  Until I get an error message, I have no way of properly troubleshooting this.  I have downloaded and installed FireBug, and I'm in the process of trying to make sense of it.

--
Jason Hsu <[address removed]>



--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
http://www.meetup.com/JavaScriptMN/
This message was sent by Jason Hsu, Rubyist ([address removed]) from JavaScriptMN.
To learn more about Jason Hsu, Rubyist, visit his/her member profile: http://www.meetup.com/JavaScriptMN/members/844108/
Set my mailing list to email me

As they are sent
http://www.meetup.com/JavaScriptMN/list_prefs/?pref=1

In one daily email
http://www.meetup.com/JavaScriptMN/list_prefs/?pref=2

Don't send me mailing list messages
http://www.meetup.com/JavaScriptMN/list_prefs/?pref=0
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
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]



--
Kevin Whinnery
@kevinwhinnery




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Kevin Whinnery ([address removed]) from JavaScriptMN.
To learn more about Kevin Whinnery, 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]

Our Sponsors

  • Twilio

    Pizza sponsor and a Super simple API for SMS, MMS, Voice/VoIP

  • Olson

    The great people at Olson are providing us the space for our meetings.

  • TrackJS

    Food Sponsor and awesome error reporting

  • FrontEnd Masters

    Monlty Sponsor

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