GUI for PHP?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob

    GUI for PHP?

    Suggestions for a GUI for PHP?

    Actually where I am heading with this is, occasionally I think a
    thicker client would be called for than the typical browser interface.

    What do you use?

    Particularly the problem is I am doing a sales order entry form, and
    I'd like to be able to add additional line items to the screen as
    needed. The only way I can think to do it is to make a round trip to
    the server, which I'd rather not do, or list or 10 or 20 blank form
    lines for line item orders.

    thanks
    BobC
  • Rick

    #2
    Re: GUI for PHP?

    Bob wrote:[color=blue]
    > Particularly the problem is I am doing a sales order entry form, and
    > I'd like to be able to add additional line items to the screen as
    > needed. The only way I can think to do it is to make a round trip to
    > the server, which I'd rather not do, or list or 10 or 20 blank form
    > lines for line item orders.[/color]

    You could use javascript to build the order lines part of the form

    Rick

    Comment

    • Alvaro G Vicario

      #3
      Re: GUI for PHP?

      *** Bob wrote/escribió (30 Sep 2004 07:16:30 -0700):[color=blue]
      > Suggestions for a GUI for PHP?[/color]

      You have these:

      PHP-GTK - http://gtk.php.net
      WinBinder - http://winbinder.sourceforge.net/
      [color=blue]
      > Particularly the problem is I am doing a sales order entry form, and
      > I'd like to be able to add additional line items to the screen as
      > needed. The only way I can think to do it is to make a round trip to
      > the server, which I'd rather not do, or list or 10 or 20 blank form
      > lines for line item orders.[/color]

      That's called DHTML (Dynamic HTML). It's a combination of JavaScript and
      DOM (Document Object Model) and it's fairly common.


      --
      -- Álvaro G. Vicario - Burgos, Spain
      -- Thank you for not e-mailing me your questions
      --

      Comment

      • Justin Koivisto

        #4
        Re: GUI for PHP?

        Rick wrote:
        [color=blue]
        > Bob wrote:
        >[color=green]
        >>Particularl y the problem is I am doing a sales order entry form, and
        >>I'd like to be able to add additional line items to the screen as
        >>needed. The only way I can think to do it is to make a round trip to
        >>the server, which I'd rather not do, or list or 10 or 20 blank form
        >>lines for line item orders.[/color]
        >
        > You could use javascript to build the order lines part of the form[/color]

        I can see this working, each entry row would look something like this:

        <tr>
        <td><input type="text" size="4" name="quantity[]"></td>
        <td><input type="text" size="35" name="item[]"></td>
        <td><input type="text" size="4" name="price[]"></td>
        </tr>

        Then you could store that same string in a javascript variable. Make a
        "Add another row" link that would fire the JS function to add the
        additional row in the appropriate place.

        Then when you process your form on the PHP side, you'd have;

        Row 1:
        quantity[0], item[0], price[0]
        Row 2:
        quantity[1], item[1], price[1]
        ....

        <sarcasm>Make s for a lot of fun!</sarcasm>

        The only thing you have to worry about then is that the client has JS
        enabled, but by the sounds of it, you have some control on the
        environment anyway.

        --
        Justin Koivisto - spam@koivi.com

        Comment

        • Ken

          #5
          Re: GUI for PHP?

          On Thu, 30 Sep 2004 14:44:59 GMT, Justin Koivisto <spam@koivi.com >
          wrote:
          [color=blue][color=green]
          >>
          >> You could use javascript to build the order lines part of the form[/color]
          >
          >I can see this working, each entry row would look something like this:
          >
          ><tr>
          > <td><input type="text" size="4" name="quantity[]"></td>
          > <td><input type="text" size="35" name="item[]"></td>
          > <td><input type="text" size="4" name="price[]"></td>
          ></tr>
          >
          >Then you could store that same string in a javascript variable. Make a
          >"Add another row" link that would fire the JS function to add the
          >additional row in the appropriate place.
          >[/color]

          When would you have it fire?

          Ken

          Comment

          • filesiteguy

            #6
            Re: GUI for PHP?

            Ken scratched out in the sand
            [color=blue]
            > On Thu, 30 Sep 2004 14:44:59 GMT, Justin Koivisto <spam@koivi.com >
            > wrote:
            >[color=green][color=darkred]
            >>>
            >>> You could use javascript to build the order lines part of the form[/color]
            >>
            >>I can see this working, each entry row would look something like this:
            >>
            >><tr>
            >> <td><input type="text" size="4" name="quantity[]"></td>
            >> <td><input type="text" size="35" name="item[]"></td>
            >> <td><input type="text" size="4" name="price[]"></td>
            >></tr>
            >>
            >>Then you could store that same string in a javascript variable. Make a
            >>"Add another row" link that would fire the JS function to add the
            >>additional row in the appropriate place.
            >>[/color]
            >
            > When would you have it fire?[/color]

            I've done this in both PHP and ASP. I cannot currently find my PHP code but
            I have the ASP example. It allows for a new row to be entered by clicking a
            button...

            <input type="button" tabindex="11" value="Add Secondary APN"
            onclick="addRow ('tblBatch')" id=button1 name=button1>

            ....which fires off some javascript...


            function addRow(id){
            var tbody = document.getEle mentById(id).ge tElementsByTagN ame("TBODY"
            [0];
            var row = document.create Element("TR");
            var td1 = document.create Element("TD");
            td1.align = 'right';
            td1.appendChild (document.creat eTextNode("Seco ndary APN:"));
            var td2 = document.create Element("TD");
            td2.align = 'left';

            var myinput = document.create Element("<INPUT name='txt2APNNo '
            id='txt2APNNo' size='20' onBlur=validReq uired(this,\"Se condary-APN\")>");
            td2.appendChild (myinput);
            row.appendChild (td1);
            row.appendChild (td2);
            tbody.appendChi ld(row);
            myinput.focus() ;

            }

            ...and adds an item to an array. You just then parse the array when you get
            your form submitted. I even have an onBlur event to ensure that the new
            field got filled-out before submitting.

            This works fine in Netscape and IE.
            --
            kai - kai at 3gproductions dot com
            www.gamephreakz.com || www.filesite.org
            "friends don't let friends use windows xp"

            Comment

            Working...