Fill dropdown on demand from script

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

    Fill dropdown on demand from script

    Hi !

    I have a page with a large amount of dropdowns, which are quite big
    sometimes. All these are generated with PHP. Some timing tests tell me
    that the problem is not the database, but the sheer data.

    So, I would like to do something to fill the dropdown-box on demand. I
    thought of maybe opening a Pop-Up window (maybe even an IE dialog box)
    and copying the information from there into the select box.

    How would you guys do that? Use a popup window, IE dialog or a hidden
    frame?

    Would you store the information in that popup? In a javascript array
    or HTML form or something else?

    Thanks for any idea.

    Jochen
    --
    Jochen Daum - CANS Ltd.
    PHP DB Edit Toolkit -- PHP scripts for building
    database editing interfaces.
    Download PHP DB Edit Toolkit for free. PHP DB Edit Toolkit is a set of PHP classes makes the generation of database edit interfaces easier and faster. The main class builds tabular and form views based on a data dictionary and takes over handling of insert/update/delete and user input.

  • Peter Hurford

    #2
    Re: Fill dropdown on demand from script

    If I were guaranteed an MS browser, I'd look at using javascript to
    "CreateActiveXO bject", and look at Microsoft's XMLHTTP object (part of
    MSXML 3 or 4).

    Post an xml doc to the server and receive server's response as an xml
    doc. Server code can be php I guess, if that's what you like. Can do all
    this asynchronously on the client if you wish.

    HTH


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!

    Comment

    • Richard Cornford

      #3
      Re: Fill dropdown on demand from script

      "Peter Hurford" <peter.hurford@ microcrest.com> wrote in message
      news:3f5353cf$0 $62081$75868355 @news.frii.net. ..[color=blue]
      >If I were guaranteed an MS browser, I'd look at using javascript
      >to "CreateActiveXO bject", and look at Microsoft's XMLHTTP object
      >(part of MSXML 3 or 4).[/color]
      <snip>

      And if you were interested in authoring for non-Microsoft Windows
      browsers (in their default configuration) you would know that
      Mozilla/Gecko browsers offer a parallel mechanism for doing exactly the
      same:-

      <URL: http://jibbering.com/faq/#FAQ4_38 >

      Though the only cross-browser method would involve re-loading the pages
      and having the server scripts fill in the required information. Given
      that the stated problem is the size of the resulting HTML the best
      solution might be to split the page up over several pages (a wizard
      style interface instead of a single form).

      Richard.


      Comment

      • Jochen Daum

        #4
        Re: Fill dropdown on demand from script

        Hi Richard, Peter!

        On Mon, 1 Sep 2003 16:26:49 +0100, "Richard Cornford"
        <Richard@litote s.demon.co.uk> wrote:
        [color=blue]
        >"Peter Hurford" <peter.hurford@ microcrest.com> wrote in message
        >news:3f5353cf$ 0$62081$7586835 5@news.frii.net ...[color=green]
        >>If I were guaranteed an MS browser, I'd look at using javascript
        >>to "CreateActiveXO bject", and look at Microsoft's XMLHTTP object
        >>(part of MSXML 3 or 4).[/color]
        ><snip>
        >
        >And if you were interested in authoring for non-Microsoft Windows
        >browsers (in their default configuration) you would know that
        >Mozilla/Gecko browsers offer a parallel mechanism for doing exactly the
        >same:-
        >
        ><URL: http://jibbering.com/faq/#FAQ4_38 >
        >
        >Though the only cross-browser method would involve re-loading the pages
        >and having the server scripts fill in the required information. Given
        >that the stated problem is the size of the resulting HTML the best
        >solution might be to split the page up over several pages (a wizard
        >style interface instead of a single form).
        >[/color]

        This sound actually much more complicated than opening a new page and
        copying the content of an array into a select tag. I think I keep
        sticking to that.

        Jochen
        --
        Jochen Daum - CANS Ltd.
        PHP DB Edit Toolkit -- PHP scripts for building
        database editing interfaces.
        Download PHP DB Edit Toolkit for free. PHP DB Edit Toolkit is a set of PHP classes makes the generation of database edit interfaces easier and faster. The main class builds tabular and form views based on a data dictionary and takes over handling of insert/update/delete and user input.

        Comment

        • Peter Hurford

          #5
          Re: Fill dropdown on demand from script

          You're right, it is more complicated our way. But what you get is the
          ability to load things dynamically - potentially only as and when
          they're needed - rather than having to load everything at the start.

          If your users can handle the delay when the page first shows, stick with
          your original. Your right it'll be less complex code-wise.

          P



          *** Sent via Developersdex http://www.developersdex.com ***
          Don't just participate in USENET...get rewarded for it!

          Comment

          • Jochen Daum

            #6
            Re: Fill dropdown on demand from script

            Hi Peter!

            On 02 Sep 2003 08:22:34 GMT, Peter Hurford
            <peter.hurford@ microcrest.com> wrote:
            [color=blue]
            >You're right, it is more complicated our way. But what you get is the
            >ability to load things dynamically - potentially only as and when
            >they're needed - rather than having to load everything at the start.
            >[/color]
            That exactly what I want as well, but I don't quite see, why I need
            XML for that.
            [color=blue]
            >If your users can handle the delay when the page first shows, stick with
            >your original. Your right it'll be less complex code-wise.[/color]

            Ok, so does IE load this asynchronously, without the javascript event?


            Jochen
            --
            Jochen Daum - CANS Ltd.
            PHP DB Edit Toolkit -- PHP scripts for building
            database editing interfaces.
            Download PHP DB Edit Toolkit for free. PHP DB Edit Toolkit is a set of PHP classes makes the generation of database edit interfaces easier and faster. The main class builds tabular and form views based on a data dictionary and takes over handling of insert/update/delete and user input.

            Comment

            • Sean Jorden

              #7
              Re: Fill dropdown on demand from script

              Jochen Daum <jochen.daum@ca ns.co.nz> wrote in
              news:g2aalv0th8 ue6esgbjupmt7ks fuvd01b3q@4ax.c om:
              [color=blue]
              > Hi Peter!
              >
              > On 02 Sep 2003 08:22:34 GMT, Peter Hurford
              > <peter.hurford@ microcrest.com> wrote:
              >[color=green]
              >>You're right, it is more complicated our way. But what you get is the
              >>ability to load things dynamically - potentially only as and when
              >>they're needed - rather than having to load everything at the start.
              >>[/color]
              > That exactly what I want as well, but I don't quite see, why I need
              > XML for that.
              >[color=green]
              >>If your users can handle the delay when the page first shows, stick with
              >>your original. Your right it'll be less complex code-wise.[/color]
              >
              > Ok, so does IE load this asynchronously, without the javascript event?
              >
              >
              > Jochen[/color]

              you might also want to look at remote scripting with an IFRAME which is
              more cross browser that the process described previously.

              Build the skills your teams need. Give them the O'Reilly learning platform and equip them with the resources that drive business outcomes.



              basically you use an invisible IFRAME (pre-created or created dynamically)
              and use it to load pages that will output javascript statements to perform
              whatever action you wish, such as filling a drop down with values.

              --
              Sean Jorden
              Norada Corp.

              Comment

              Working...