1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    4
    Vote Rating
    0
    rgoff is on a distinguished road

      0  

    Default A little help getting started...

    A little help getting started...


    I'm a web designer/programmer that didn't survive the crash, but I still dabble a bit. I'm going a bit cross-eyed looking at the examples and documentation, and I wonder if someone would give me some high-level suggestions for getting started in my application. I don't want anyone to write my code for me, or read the docs for me, just give me a little focus in this sea of information I find myself in. Something like "use this object to do this, then approach this in this manner..."

    I'm starting an application that I want to design with AJAX principles - smaller amounts of data round-tripping to the server more frequently, usually transparent to the user. As part of the configuration, there will be SQL commands stored that server-side scripts use to fetch predefined datasets. Each stored SQL command will have a name for reference and a set of parameters that each have a name, datatype, and default value. Here's the problem statement: develop a page that displays command names, the associated strings, and the set of parameters with their attributes. Allow editing, deleting, and adding. Here's a mock-up page:

    http://magpierising.com/QueryConfigProto.png

    With traditional techniques, I'd use the recordset in the server script to write the HTML code for tables containing the information. I'd have buttons or checkboxes for deleting, and maybe a blank input form for adding. To edit, I'd probably select a table row and either reload the page with the data populated in an input form or open a new page for the form. How would you approach this with YUI and YUI.ext? Thanks for your time.

    (As an aside, if anyone knows where I can learn how to reliably pass parameters to a Jet query in ASP/ADO, I'd be grateful if you'd tell me. I've spent the last two days and various amounts of time in the last two years trying to figure this out, and none of the techniques I've found work for me. This is the reason for the stored SQL command kludge.)

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    The route you want to take is the right one. It will take a bit of learning and a different mindset. You will need to get very comfortable working with JavaScript and learn about event driven programming.

    The example you put up is a common layout. If you look here: http://www.jackslocum.com/forum2/, I am in the process of doing a similar layout with this forum software. While it doesn't feature an editor grid, adding editing support is pretty easy. This article should give you all the info you need to make it editable.

    If you have any specific questions as your work progresses, feel free to ask. I'd be happy to help.

    Jack

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    4
    Vote Rating
    0
    rgoff is on a distinguished road

      0  

    Default


    /forum2 looks really promising, with the drag/drop, splitter, etc. Lots of features I'd like to incorporate and I'm having to force myself to just work on basic AJAX to start with. Thanks for the update.

    Bob

  4. #4
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    That's not a bad idea.

    The UpdateManager in the library that can make Ajax much easier. Here's an example code snip:

    Load html from foo.php into div element with id "myDiv".
    Code:
    var myDiv = getEl('myDiv');
    myDiv.getUpdateManager().update('foo.php');
    You can also auto refresh:

    Code:
    var myDiv = getEl('myDiv');
    // auto refresh div every 60 seconds
    myDiv.getUpdateManager().startAutoRefresh(60, 'foo.php');
    Three diff ways to pass parameters to your script:

    Code:
    var myDiv = getEl('myDiv');
    // 1 - GET
    myDiv.getUpdateManager().update('foo.php?foo=1&bar=2');
    // 2 - POST
    myDiv.getUpdateManager().update('foo.php', 'foo=1&bar=2');
    // 3 - POST and auto created query string
    myDiv.getUpdateManager().update('foo.php', {foo: 1, bar: 2});
    Get notified when it loads:

    Code:
    var myDiv = getEl('myDiv');
    var um = myDiv.getUpdateManager();
    um.onLoad.subscribe(yourFunction);
    or use a callback:

    Code:
    var myDiv = getEl('myDiv');
    myDiv.getUpdateManager().update('foo.php', {foo: 1, bar: 2}, myFunction);
    All those examples assume you just want to stick returned HTML into the div. What if you were getting JSON data back?

    Code:
    var MyRenderer= {
          render: function(el, o){
               var myObj = eval('(' + o.responseText + ')');
               // do something with the object returned by your server
          }
    };
    var myDiv = getEl('myDiv');
    var um = myDiv.getUpdateManager();
    um.setRenderer(MyRenderer);
    um.update('foo.php', {foo: 1, bar: 2});
    Hopefully these examples are useful.

  5. #5
    Ext User
    Join Date
    Mar 2007
    Posts
    4
    Vote Rating
    0
    rgoff is on a distinguished road

      0  

    Default


    Perfect examples to start with, thanks. Still working on the server-script to spit back XML. I'll get a client working RSN. (Day jobs are so demanding...)

    Bob

Similar Threads

  1. Getting started with ASP.NET
    By abolotnov in forum Ext 1.x: Help & Discussion
    Replies: 9
    Last Post: 10 Mar 2007, 12:52 PM
  2. Getting started with YUI
    By ssmith in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 8 Mar 2007, 4:01 PM
  3. Getting Started with YUI
    By fthamura in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 15 Jan 2007, 9:17 AM
  4. getting started
    By mcdavis941 in forum Ext 1.x: Help & Discussion
    Replies: 12
    Last Post: 23 Nov 2006, 3:29 AM
  5. Could not get started.
    By harunhasdal in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 14 Nov 2006, 5:13 AM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi