[Building Sakai] Debugging Javascript & Velocity

David Adams da1 at vt.edu
Wed Apr 24 06:17:23 PDT 2013


If there are no problems on the Javascript side, then if  possible, check
the web server access logs to be sure that a request is being made when you
click the button (though you should also be able to see this in
Firebug/Chrome Dev Tools). If you know how to hook up Eclipse to do live
debugging, that's probably the most useful thing you could do if a request
is making it through. Or if you're not set up for that, just tossing in
some logging statements in the code you expect to be called is usually what
I end up doing (since I've never bothered to learn Eclipse).

David Adams
Director, Systems Integration and Support
Virginia Tech Learning Technologies


On Wed, Apr 24, 2013 at 6:39 AM, Daniel Merino <daniel.merino at unavarra.es>wrote:

>  Hi, David.
>
> I'm currently using Firebug 1.11.2 with Firefox 19.0.2, but console does
> not show errors when I click over the button, only lots of warnings that
> does not seem to be related with this issue.
>
> Maybe is a velocity issue, but I don't know how to check this.
>
> Thanks for your help.
> Best regards.
>
> El 24/04/2013 13:11, David Adams escribió:
>
> Hi Daniel,
> To troubleshoot Javascript, you'll need a client-side debugger. I'm fond
> of the Developer Tools built into Google Chrome (under the Tools submenu).
> Firefox has similar tools (Firebug was the best one when I was using
> Firefox). If you pull those tools up you should immediately see if there
> are issues on the page. Then if you click the bad link, you should see
> what's going wrong. The other, simpler option would be to just pull up the
> Javascript Console on whatever browser you're using and it should display
> some error or other that should lead you in the right direction.
>
>  -dave
>
>  David Adams
> Director, Systems Integration and Support
> Virginia Tech Learning Technologies
>
>
> On Wed, Apr 24, 2013 at 6:02 AM, Daniel Merino <daniel.merino at unavarra.es>wrote:
>
>> Hi everybody.
>>
>> I'm trying to fix a local patch that does not work, but I'm not able to
>> find the error. Is Javascript code running inside a Velocity template,
>> two technologies that I don't know very well. I hope some experienced
>> developer can help me.
>>
>> In a vm file inside content tool, I have this code:
>>
>> <input type="button" class="active" name="savechanges" id="savechanges"
>> onclick=
>> "javascript:showNotif('submitnotifxxx','savechanges','addContentForm');document.getElementById('addContentForm').action='#toolLink("
>> ResourcesAction"
>> "doMultipleFoldersUpload")';submitform('addContentForm');"
>> value="$tlang.getString("label.continue")" accesskey="s" />
>>
>> that renders a Continue button. This button should call
>> doMultipleFoldersUpload method in ResourcesAction.java class, but I have
>> checked that this method is not called and no error is shown inside
>> Tomcat's logs.
>>
>> I don't know how to continue in order to detect this error. Could
>> somebody give me any hint or idea?
>>
>> If you need more information, just tell me.
>>
>> Thanks in advance.
>> Best regards,
>> --
>> Daniel Merino Echeverría
>> daniel.merino at unavarra.es
>> Gestor de teleformación - Centro Superior de Innovación Educativa.
>> Tfno: 948-168489 - Universidad Pública de Navarra.
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>> TO UNSUBSCRIBE: send email to
>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>> "unsubscribe"
>>
>
>
> --
> Daniel Merino Echeverría
> daniel.merino at unavarra.es
> Gestor de teleformación - Centro Superior de Innovación Educativa.
> Tfno: 948-168489 - Universidad Pública de Navarra.
> --
> Los amigos son para las ocasiones, salvo en determinados circulos
> político-económicos, en los que las ocasiones son para los amigos. (Perich)
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130424/f258ddd2/attachment.html 


More information about the sakai-dev mailing list