Learn node/express/jade/ajax/json/javascript/css3/html5 by example

I used to do a lot of freelance web development for sports clubs and self-worshipping individuals back when I was at school.  That was in the days when Internet Explorer 5/6 ruled supreme, animated GIFs were cool, and many other painful memories.
While I am probably still proficient with ASP/VBscript/IIS/MS SQL Server/Access despite doing no web development for almost a decade, I'm not masochistic enough to touch them again so I decided to learn some "modern" and "intelligently designed" web development techniques last week.
If anyone else is interested, and (like me) learns from examples and by fiddling then you will find the following useful.  It's a little demonstration project that I created, which allows editing of an inventory table in a MySQL database, produces aggregates/summaries of the table, and applies a branch-and-bound knapsack solver to work out which combination of items would be the best for you to steal borrow, given the maximum total weight that you can carry.
github.com/battlesnake/nodejs-starter
Feel free to fork it all you want.
As with all most open-source software, the documentation (when it even exists) leaves a lot to be desired.  However, like most "tech startup tools"-style software, the design is so elegant that it explains itself without the need for documentation 95% of the time.  REPL often gives answers quicker than a google/StackOverflow search.
Upon first seeing node.js and mongo, I thought "an entire environment running on JavaScript? what could possibly be worse?!?!"
But after learning JS properly (i.e. not the cargo-culting late 90's style of it), I have taken a real appreciation for the language.  It is probably as slow as Python (or maybe considerably faster with the V8 compiler), but so much nicer to use!  The MySQL package for node.js actually makes it easier to write proper parametrized queries than to write the typical "lazy, insecure" junk of a rushed 90's commercial project.
The Jade template engine is a real pleasure to use, which when combined with the Express web server, makes me think that all my time fighting working with and learning ASP and PHP is going to become a distant waste.
I have yet to use Stylus, a CSS templating engine which presumably solves the problems incurred by the popularity of small-screened pointless, fashion nonsense tablets and smartphones.
CSS3 is... well nothing too drastically different from its predecessors, but the flexbox layout mode is really nice, and even Internet Explorer supports it (well IE9+ anyway).  Thanks to Wine, I have IE6,7,8,9,10 all installed and running simultaneously, so I can see how aweful the IE<9 versions are at rendering pretty much anything involving flexbox layout, html, css, etc.
JSON is easy, so google it if you want to know what that is about.  It solves a problem well and doesn't really do anything flashy, so I'll leave wikipedia to market it.
AJAX always seemed like a simple concept, and indeed it is!  One little gotcha that I found was that when adding HTML fragments from an AJAX response to the document DOM, the default stylesheet doesn't seem to get applied - so everything is "display: inline", amongst various other problems.  This was solved by mercilessly stealing copying from the W3's default HTML4 stylesheet.
I really should learn JQuery and implement that to reduce the code size, but I couldn't quite be bothered at the time.
Happy learning!
Last edited by windows_me (2013-08-26 22:05:36)

I wondered the same thing, until I watched all the way to the very end where he gives a URL for source and slides:
http://mad.com.au/MAX2013/
iBrent

Similar Messages

  • Can Web Performance Test work on AJAX or Javascript Project which will show only one URL for all the pages?

    Hi there,
    I'm working on testing a AJAX and JavaScript Project which has several pages but all in the same URL. I need to test some attribute on the page or parameter past by AJAX or Javascript. Can Web Performance Test work to get what I want?
    Thanks,
    

    Hello,
    Thank you for your post.
    Web performance test is used to test if a server responses correctly and the response is consistent with what we expected. And we test the response speed, the stability and scalability.
    The Web Performance Test Recorder records both AJAX requests and requests that were submitted from JavaScript, but
     web test does not execute JavaScript. I am afraid that you can’t use web test to test parameter past by AJAX or JavaScript.
    Please see:
    Web Performance Test Engine Overview
    About JavaScript and ActiveX Controls in Web Performance Tests
    From the first link, “Client-side scripting that sets parameter values or results in additional HTTP requests, such as AJAX, does affect the load on the server and might require you to manually modify the Web Performance Test to simulate the scripting.”
    If you want to execute the function typically performed by script in web test, you need to accomplish it in coded web performance test or a web performance test plugin. Please see:
     How to: Create a Coded Web Performance Test
    How to: Create a Web Performance Test Plug-In
    I am not sure what the ‘some attribute on the page’ is. If you mean that you want to test those controls on the page, you can do coded UI test, which can test that the user interface for an application functions correctly. The coded UI test performs actions
    on the user interface controls for an application and verifies that the correct controls are displayed with the correct values. You can refer to this article for detailed information about code UI test:
    Verifying Code by Using Coded User Interface Tests
    Best regards,
    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Comment interfacer Labview avec JSON (JavaScript Object Notation) or AMF (Action Message Format) ?

    Bonjour,
    Comment interfacer Labview avec JSON (JavaScript Object Notation) or AMF (Action Message Format) en envoi et réception ?
    Pourriez vous m'indiquer la procédure ?
    Si vous avez des exemples ?
    Merci d'avance et bon week-end.
    Seb 

    Bonjour,
    Pour vos post en français, je vous invites à poster sur cette rubrique du forum:
    Discussions de produit de NI.
    Pouvez vous décrire pourquoi vous voulez vous interfacer avec du JSON ou du AMF?
    Cordialement
    Yann C.
    France

  • Comment interfacer Labview avec JSON (JavaScript Object Notation) ou AMF (Action Message Format) ?

    Bonjour,
    Comment interfacer Labview avec JSON (JavaScript Object Notation) ou AMF (Action Message Format) en envoi et réception ?
    Le but est d'automatiser le test et paramètrage de nos produits.
    Nos produits possèdent une interface web utilisant le protocole AMF sur http.
    Pourriez vous m'indiquer la procédure ? 
    Si vous avez des exemples ?
    Merci d'avance,
    Seb 

    Message Edité par Jérémy Marliot le 11-13-2009 03:11 AM
    Jérémy M. | Certified LabVIEW Developer
    Design Engineer - LinkedIn - Contact
    Don't forget to give Kudos to good answers.
    N'oubliez pas de donner un compliment aux bonnes réponses.

  • Dreamweaver css3-html5 colornames

    darkgray means something to me. But honestly, #999999 ...what's that?
    Browsers all know css3-html5 colorname css syntax, but where are colornames in Dreamweaver? When I am in code view and inserting color property, the only Dreamweaver popup  is an ancient color grid. Where is the colornames popup? I have been using colornames popup in Expression Studio for years. I sure hope someone can tell me where colornames are in the dynamic Dreamweaver CSS3-html5 codeview popups.

    Color names are inconsistant.  Dark grey means nothing to me.  But Cool Grey 9 would mean a PMS color.  And based on the W3C dark gray is actually #A9A9A9, not #999999 ( source ) .  And colornames to not represent all variations of colors.  Do you see the disconnect?  I agree with you that hex codes are meaningless but I would argue that the compromise is moving to rgba for colors which is supported in CSS3.  Moving forward RGBA is something that is being used more and more by Adobe.  This is because if you go to an artist and they design something in Photoshop, Illustrator or Fireworks, dark gray is an arbitrary value whereas the coded value can be replicated across all mediums.

  • AJAX/JSON functionality for Newsletter Subscription Form

    Okay so we have Newsletter subscription form where we would like to implement this functionality using steps shown here - http://demo.businesscatalyst.com/json-form.
    We used following code and it didn't work:
    <script type="text/javascript">
                                function jqsub() {
                                var $f = $('#newsletter_signup');
                                var $m = $('#newsletter_form_result');
                                $f.find('.btn').prepend('<i class="icon-spinner icon-spin"></i>').addClass('disabled').attr('disabled', 'disabled');
                                $.ajax({
                                  type: 'POST',
                                  url: $f.attr('action') + '&amp;JSON=1',
                                  data: $f.serialize(),
                                  success: function(msg) {
                                    var formResponse = eval(msg);
                                        if (formResponse.FormProcessV2Response.success) {
                                                $f.fadeOut(function(){ //Hide the form
                                                        $m.addClass('success').fadeIn().html("<p>Thank you for signing up to receive updates and offers.</p>");
                                    error: function(msg) {
                                    alert('error'+msg);
                                    return false;
                                </script>
    Then we noticed that user gets automated message and also we can see admin area that he has subscribed to newsletter, that means although there is no movement on the page, form gets submitted. That means the "if" argument is not working. That leads us to the question what would form newsletter subscription return upon submission - would it retuern "FormProcessV2Response"? Then we took off  "var formResponse = eval(msg);  if (formResponse.FormProcessV2Response.success)" and modified code as below.
    <script type="text/javascript">
                                function jqsub() {
                                var $f = $('#newsletter_signup');
                                var $m = $('#newsletter_form_result');
                                $f.find('.btn').prepend('<i class="icon-spinner icon-spin"></i>').addClass('disabled').attr('disabled', 'disabled');
                                $.ajax({
                                  type: 'POST',
                                  url: $f.attr('action') + '&amp;JSON=1',
                                  data: $f.serialize(),
                                  success: function(msg) {
                                                $f.fadeOut(function(){ //Hide the form
                                                        $m.addClass('success').fadeIn().html("<p>Thank you for signing up to receive updates and offers.</p>");
                                    error: function(msg) {
                                    alert('error'+msg);
                                    return false;
                                </script>
    This code worked in terms of triggering fadding in and out animations, but now our concern is if this is a right way of tackling this issue. Would it be processed correctly when any error occured? Should we have any if argument similar to what we had in previous code?
    If someone can guide us on this one, then it would be really great.
    Thanks

    Dear vora,
    Its very simple, matter of adding simpel jQuery related code. I mean something like Ajax submitting form without page refresh and getting JSON response back.
    For instance have a look over this example..
    http://www.java4s.com/jquery-tutorials/submit-form-without-refreshing-page-in-javajsp-with -jquery/
    Even the newsletter they are using is based on jQuery/JSON, in fact they applied through PHP, however you can use in any technology.
    Regards

  • JSON, Javascript, PHP and JQUERY

    Hi,
    In my earlier post, I decided to go with PHP and leave
    ASP.NET 3.5 for the time being. I now need your help in charting a
    way to learn PHP.
    I am a Web Designer and I have started using JQuery
    extensively in the websites, as I love JQuery and it makes the life
    so much easier. What I want to know from you all that :
    Q1) What is JSON and do I need to learn it if I am getting
    into PHP?
    Q2) Since, I am using JQuery, do I need to learn Javascript
    from bottom to top? Does it help to master Javascript thoroughly?
    Q3) What should be my learning path? Should I start with PHP
    or Javascript first?
    There are so many things to learn and very less time. Also,
    if you all can tell me some books (apart from David's :-)) ) which
    will help me in learning.
    Thanks to all.
    Gaurav

    gaurav_ch wrote:
    > Q1) What is JSON and do I need to learn it if I am
    getting into PHP?
    JSON is JavaScript Object Notation. It's a shorthand way of
    transmitting
    data. You don't need to know it for PHP, although PHP does
    have support
    for JSON>
    > Q2) Since, I am using JQuery, do I need to learn
    Javascript from bottom to
    > top? Does it help to master Javascript thoroughly?
    No, you don't need to learn JavaScript from bottom to top to
    use jQuery.
    However, a good understanding of JavaScript will improve your
    ability to
    use jQuery or any other JavaScript framework.
    > Q3) What should be my learning path? Should I start with
    PHP or Javascript
    > first?
    I would start with PHP first. PHP is a server-side language,
    so your
    content is delivered to all users. JavaScript is normally
    used on the
    client-side (within the browser), so the small percentage of
    people who
    browse with JavaScript disabled don't see content or effects
    delivered
    by JavaScript. It's also important to realize that search
    engines don't
    spider content that is generated by JavaScript.
    > Also, if you all can
    > tell me some books (apart from David's :-)) ) which will
    help me in learning.
    I find "Programming PHP" by Kevin Tatroe and Rasmus Lerdorf
    very useful.
    "Pro PHP Security" by Chris Snyder and Michael Southwell is
    also
    essential reading.
    For jQuery, "jQuery in Action" by Bear Bibeault and Yehuda
    Katz is
    excellent.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • WL vs. WL-express and JSP vs. javascript/SQL

    folks-
    i am trying to convince a certain party to
    disband a web-based job tracking system being
    written in ASP, javascript, html, css and SQL.
    it will be hosted on MS webserver running NT.
    i am trying to convince them to use JSP and
    WL express. i have done two years of EJB
    component work on weblogic, however, i have not
    done work with JSP or thin-clients. i was mostly
    business-logic.
    anyway i have some questions and need some
    direction. i already know JSP is better than
    ASP/javascript etc. because:
    * ASP is proprietary. ditto for VBscript
    * with an IDE creating JSP is easy and JSP
    automatically creates servlets which is way
    faster than by hand
    * JSP is JAVA based and hence benefits from
    all the portability pluses of JAVA
    but here are the more difficult questions:
    * why is WL express better than an MS
    web server? (not including WL market share
    and size. after all MS can claim that)
    * since WL express does not have an EJB
    container, how do you access the database?
    via JDBC? does one just have JDBC code
    floating around?
    * since there is no EJB container how does
    one separate presentation from logic from
    data access? this is a major downside of
    javascript, html, css and SQL etc.
    * if a web app grows beyond JSP with WL express
    into the need for an EJB container, i would
    think that most of the app needs to re-written
    as business-logic must be refactored into EJBs
    and all JDBC code will be replaced by container
    managed beans. this sounds a like a lot of
    rework.
    * isn't JSP slower than javascript as the
    servlet and hmtl code is bounced back and
    force across the network?
    with respect to architecture, scalability,
    and robustness what are the downsides to an
    MS webserver and non-JSP coding?

    * since WL express does not have an EJB
    container, how do you access the database?
    via JDBC? does one just have JDBC code
    floating around?
    Use JDO or an OR-mapper or embed JDBC into your own data access classes.
    * since there is no EJB container how does
    one separate presentation from logic from
    data access? this is a major downside of
    javascript, html, css and SQL etc.
    Presentation=JSP
    Logic=Servlet
    Data access=JDO or similar
    * if a web app grows beyond JSP with WL express
    into the need for an EJB container, i would
    think that most of the app needs to re-written
    as business-logic must be refactored into EJBs
    and all JDBC code will be replaced by container
    managed beans. this sounds a like a lot of
    rework.
    You should be able to tell up front if it a tx-intensive app that requires
    WLS.
    * isn't JSP slower than javascript as the
    servlet and hmtl code is bounced back and
    force across the network?
    They aren't exclusive. For dynamic pages, use Javascript on the front end,
    JSP on the back.
    * with respect to architecture, scalability,
    and robustness what are the downsides to an
    MS webserver and non-JSP coding?
    In the real world, and for most apps, while Java has the architectural edge,
    they both have similar scalability and similar robustness. MS gives you no
    choice though, and you rewrite every time they see a new buzzword. You can't
    leave MS-land without abandoning almost everything. You can leave WLS in a
    week if you have to.
    It's an investment. Invest wisely.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "shane miller" <[email protected]> wrote in message
    news:[email protected]...
    folks-
    i am trying to convince a certain party to
    disband a web-based job tracking system being
    written in ASP, javascript, html, css and SQL.
    it will be hosted on MS webserver running NT.
    i am trying to convince them to use JSP and
    WL express. i have done two years of EJB
    component work on weblogic, however, i have not
    done work with JSP or thin-clients. i was mostly
    business-logic.
    anyway i have some questions and need some
    direction. i already know JSP is better than
    ASP/javascript etc. because:
    * ASP is proprietary. ditto for VBscript
    * with an IDE creating JSP is easy and JSP
    automatically creates servlets which is way
    faster than by hand
    * JSP is JAVA based and hence benefits from
    all the portability pluses of JAVA
    but here are the more difficult questions:
    * why is WL express better than an MS
    web server? (not including WL market share
    and size. after all MS can claim that)
    * since WL express does not have an EJB
    container, how do you access the database?
    via JDBC? does one just have JDBC code
    floating around?
    * since there is no EJB container how does
    one separate presentation from logic from
    data access? this is a major downside of
    javascript, html, css and SQL etc.
    * if a web app grows beyond JSP with WL express
    into the need for an EJB container, i would
    think that most of the app needs to re-written
    as business-logic must be refactored into EJBs
    and all JDBC code will be replaced by container
    managed beans. this sounds a like a lot of
    rework.
    * isn't JSP slower than javascript as the
    servlet and hmtl code is bounced back and
    force across the network?
    with respect to architecture, scalability,
    and robustness what are the downsides to an
    MS webserver and non-JSP coding?

  • CRX/DE failing on Publish nodes with 404 for JSON data

    I'm in the process of rebuilding our author and publish staging instances using the 2.1 service pack for CQ5.5, and now I'm seeing problems with CRX/DE on both publish nodes on two difference machines.
    We get this error whenever we try to pull up CRX/DE on these two nodes:
    11.03.2013 13:18:40.222 *INFO* [12.104.103.30 [1363022320201] GET /crx/server/crx.default/jcr%3aroot/.1.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /crx/server/crx.default/jcr:root/.1.json not found
    The app works fine on the author node, and the websites themselves still appear to serve correctly from the publish instances.
    The odd thing is that, after I saw this problem, I wiped both publish instances and restored from a backup I had made this morning and restarted them to find that the problem persists.
    Any thoughts?  I had thought myself done with this process until this issue appearing suddenly.  At the time I was rebuilding bundles on the Author node after having installed an updated content package and replicating it to the publish nodes.  I was attempting to rebuild the bundles on the Publish nodes when I saw the CRX/DE problem.

    Hi,
    It seems to be access issue to me even though you have logged in as admin. To confirm this do the below.
    1. Open a browser and log in to your author instance using admin rights.
    2. Now using same browser now access http://localhost:4502/crx/server/crx.default/jcr:root/.1.json which is actually request to access jcr respository. When you access this link you will see the proper JSON response return.
    Now
    1. Open another browser (not same as above because above browser does have your cq session) and just access http://localhost:4502/crx/server/crx.default/jcr:root/.1.json you will see a 404 because anonymous user doesnt have access to it.
    If above is true then plz try to look at your permissioning for jcr:root ("/") and if it looks good then check for authorization bundles status in felix console and check logs.
    Also try to access crx explorer, if you can see the hierarchy http://<host>:<port>/crx/explorer/browser/index.jsp
    Thanks,
    Pawan

  • Looking for best jQuery.ajax & JSON code validators for VStudio 2013 SP Dev

    Hi All,
    As a new SharePoint 2013 developer I’m looking for the best Visual Studio 2013 Intellisense Extensions or code validators for:
    1. jQuery.ajax
    2. JSON
    3. JSON.stringify
    The reason for this is I sometimes make silly syntax mistakes that take hours to correct. For example the text marked in green below show
    the small errors I made yesterday, and got no help from Visual Studio.
    ************************Start Of Code************************
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/SP.WebProxy.invoke",
    type: "POST",
    data: JSON.stringify(
    "requestInfo": {
    "__metadata": {
    "type":
    "SP.WebrequestInfo"
    },        //should be R
    "Url":
    "http://services.***********/?$format=json",
    "Method":
    "GET"
    heaaders:             
    //two a's{                                                                                                       
    "Accept":
    "application/json;odata=verbose",
    "Content-Type":
    "application/json:odata=verbose",   
       //should be ;    
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    call.done(function
    (data, textStatus, jqXHR) {                   
    if (data.d.Invoke.StatusCode == 200) {                          
    var categories = JSON.parse(data.d.Invoke.Body);
    var message = jQuery("#message");
    message.text("********* service:");
    message.append("<br/>");
    jQuery.each(categories.value(
    function (index, value) {     //should
    be ,    
    message.append(value.*********);
    message.append("<br/>");
    } else {
    var message = data.d.invoke.body;   
                //should be capital letters
    alert("Call failed. Error: " + message);
    //should be errorThrown
    call.fail(function
    (jqXHR, textStatus, errorThrow) {                     
    var response = JSON.parse(jqXHR.responseText);
    var message = response ? response.error.message.value : textStatus;
    alert("Call failed. Error: " + message);
    ************************End Of Code************************
    Visual Studio didn’t highlight any of the errors I made. The only help I got was from a message
    box with the message “invalid character” (see screenshot below).
    Even with Fiddler it was impossible to see where the errors were. Last week I had a similar problem with a much larger block of code. One syntax mistake that was not highlighted by Visual Studio cost me hours of lost time.
    I hope you can help
    CEStar

    Hi,
    As this question is more relate to Visual Studio, I suggest you post it to Visual Studio Development Forum, you will get more help and confirm answers from there.
    What’s more, I have seen a similar post from you in the link below, please check whether Crystal’s post is helpful:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/dbde39a0-18a5-4e15-9b5b-6b41cc4350d0/help-finding-the-best-intellisense-extensions-or-code-validators-for-visual-studio-2013?forum=visualstudiogeneral
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • Re: AJAX-Calling JavaScript function

    Hello!
    So i've been reading abt AJAX and i'm trying it out now. I have a problem or two.
    Take a look @ this scenario plz.
    I have a Page HTML header with the the following script
    <script language="JavaScript1.1" type="text/javascript">
    function setFocus(PageItem) {
    document.getElementById(PageItem).focus();
    function validateLogin(User,Pwd) {
    alert("Here Now.");
    if (document.getElementById(User).value == "") {
    alert("Login ID must have a value provided.");
    document.getElementById(User).focus();
    else if (document.getElementById(Pwd).value == "") {
    alert("Password must have a value provided.");
    document.getElementById(Pwd).focus();
    document.getElementById(Pwd).select();
    else {
    doSubmit('SUBMIT');
    </script>
    I have a button which is supposed to call the validateLogin function . In its' Optional URL Redirect, ive set Target=URL
    and URL Target as
    javascript:validateLogin('P4_USERNAME','P4_PASSWORD);
    however when i run the page and try to press the button, i get "Error on page" at the bottom left hand corner of my browser.
    Also, u notice i put an alert
    alert("Here Now.");
    just @ the beginning of the function to see if the function is actually called but the alert didn't even get displayed.
    Am i calling my function wrongly. Hope i've explained the scenario ok. Any ideas on this plz.
    big thnx

    Hello,
    You're missing a quote at the end of 'P4_PASSWORD.... So try
    javascript:validateLogin('P4_USERNAME','P4_PASSWORD');
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • What book would you recommend for learning Logic EXPRESS 9?

    Hello.
    I'm going to be getting Logic Express 9 in the next few days.  I was wondering if any of you can recommend a good, up-to-date, book for learning the ins and outs of Logic Express 9?  I've seen a few on Amazon.com that are for Logic PRO and Express.  My concern is that they'll spend a lot of time on talking about Pro functionality and I may be left up in the air with wanting to know what I need to know about Express.
    Please let me know why you like the book(s) that you're recommending, too.
    Thanks very much.
    p.s.  I used Opcode's "Vision" about 20 years ago.  I'm hoping that I'll be able to pick-up Logic Express 9 fairly quickly.

    Hi
    You should not be concerned about 'Pro vs Express'.: they are essentially the same program, with the same functionality. The primary differences are listed here:
    http://support.apple.com/kb/HT4229
    The general word seems to be that The Apple Pro Training Series book by David Nahmani is a very good place to start.
    http://www.amazon.com/Apple-Pro-Training-Logic-Express/dp/0321636805/ref=sr_1_1? ie=UTF8&qid=1304612428&sr=8-1
    CCT

  • Ajax without JavaScript - Is it really possible?

    I read your article Ajax Without J . Wondering Is it really possible.
    How about if i have following situations
    1) I wanna display Alert Message whenever users click on Delete button i.e. confirmDelete function using JavaScript
    2)Clearing the form fields on click of Reset button
    This can be easily accomplished using JavaScript functions. Do we have something similar in Ajax4Jsf
    Also is it possible to conditionally render buttons using Ajax4Jsf. For example whenever user selects "New" from h:selectOneMenu i dont wanna display Delete button. I am using Ajax4Jsf here with reRender attribute on h:commandButton it doesnt work
    Regards
    Bansi

    duplicate for http://forum.exadel.com/viewtopic.php?t=5943

  • AJAX : IE JavaScript errors in "Hello Ajax" example

    hi
    In this introduction to AJAX programming:
    "Hello Ajax"! How to Do the Ajax Thing with Oracle JDeveloper
    http://www.oracle.com/technology/pub/articles/nimphius-ajax.html
    I get JavaScript errors if run the "helloajax3.html" page in MS Internet Explorer, available in:
    http://www.oracle.com/technology/pub/files/helloajax.zip
    Although there seems to be no problem in Mozilla Firefox, in IE I get this JavaSript error:
    Line: 26
    Char: 11
    Error: This method cannot be called until the send method has been called.Where line 26 has this statement:
    var status = requestObject.status;If I move the "onreadystatechange" statement in the "doTheAjaxThing()" function from this:
    function doTheAjaxThing(){
      requestObject.onreadystatechange=onReadyStateChangeResponse;
      requestObject.open("Get","myajaxcontroller?"+param,true);
      requestObject.send(null);
    }to here:
    function doTheAjaxThing(){
      requestObject.open("Get","myajaxcontroller?"+param,true);
      requestObject.onreadystatechange=onReadyStateChangeResponse;
      requestObject.send(null);
    }or to here:
    function doTheAjaxThing(){
      requestObject.open("Get","myajaxcontroller?"+param,true);
      requestObject.send(null);
      requestObject.onreadystatechange=onReadyStateChangeResponse;
    }then I get another JavaScript error:
    Line: 26
    Char: 11
    Error: The data necessary to complete this operation is not yet available.Because the error is still at line 26 I modified the "onReadyStateChangeResponse()" function like this:
    function onReadyStateChangeResponse(){
      var ready = requestObject.readyState;
      //var status = requestObject.status;
      if(ready==READY_STATE_COMPLETE && requestObject.status == PAGE_SUCCESS){
    }And now it works.
    - questions
    Does anyone have an explanation why this is no problem in Firefox and it is a problem in IE?
    Are there good guidelines available about how to approach these browser differences (and maybe a better approach to solve this particular issue)?
    many thanks
    Jan Vervecken

    Jan,
    to me this looks like a race condition and - to be honest - while writing I used Firefox. I think the safe way of solving this issue is to use one of the available Ajax libraries (e.g. Dojo) that provide you a handle to the request object. I didn't yet look at who handles the browser differences, so I cannot give you a name of a library
    Maybe http://www.ajaxian.com/ is a good starting point
    Frank

  • Learning FC Express

    Does anyone have any links to any resources on learning how to get the most out of Final Cut Express? I can't find the disc that came with my copy of the program or any other documentation after my last move.
    Does FCE have a keyboard or keyboard keymap that might allow for easier editing?
    I'm just full of dumb questions today, geez.
    - J.

    Probably the best, easiest and cheapest way to learn FCE is with one of Tom's books which are available from Amazon:-
    http://www.fcpbook.com/What.html
    The FCE Help Menu Manual contains keyboard shortcuts but they are dotted around.
    Tom's books usually mention the important ones.
    Ian.

Maybe you are looking for

  • Backup ITunes in Windows Vista

    Hi, Can someone please advise the best way to backup Itunes (10.2.2.12)?  Need to backup the full thing, as i am going to windows 7 new install rather than an upgrade.  Music is easy to backup in my music folder, copy over and tell ituneds to use tha

  • Beans scope problem

    Hi I have a bean that stores the name of the user after they have logged in. It is supposed to be in session scope <jsp:useBean id="userInfo" class="beans.UserInfo" scope="session"/>But it appears to have been placed in application scope. It doesn't

  • I can't upload photo's from my Canon 100D saying due to operating system

    It will not allow me to update my canon software and I can't put my pictures onto my MAC which I need for uni!

  • Oracle Date function.

    Hi Team, I have a table with date column (16/06/1996 15:03:59) as value in the displayed format. As I have tried with the below query format I could n't able to retrive the records. select * from <table> where DATE_INSERT=SYSDATE; Could you please he

  • FCP6 adds 20 extra seconds when exporting to .FLV

    When I export a FCP6 project to .flv (File> Export> Using quicktime conversion and Format: Flash Video (FLV))it automatical adds 20 extra seconds to the end, showing the last frame, before the movie stops. How can I avoid this?