Web Analytics Made Easy -
StatCounter Poll/process of elimination? - CodingForum

Announcement

Collapse
No announcement yet.

Poll/process of elimination?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Poll/process of elimination?

    Hi

    I'm not sure if this is even possible.

    I have a page set up with a series of pictures, I want people to be able to select multiple pictures and take to another page

    (my thought radio buttons and a submit button that would then bring all the pictures they selected to a new page)

    then From there I'd like them to be able to arrange them in order of favorite to least favorite

    And send the results

    Is this even remotely possible??

    Laura

  • #2
    Yes... here's a start for what you might need (see also attachment for full example)

    first page:
    PHP Code:
    <html>
    <
    head>
    </
    head>
    <
    body>
    <
    form>
    <
    input name="r0" type="radio">
    pict 00<br>
    <
    input name="r1" type="radio">
    pict 01<br>
    <
    input name="r2" type="radio">
    pict 02<br>
    <
    input type="button" value="Go" onclick="window.open('new.html','_blank')">
    </
    form>
    </
    body>
    </
    html
    second page:
    PHP Code:
    <html>
    <
    head>
    <
    script>
    var 
    = new Array()
    p[0] = '<img src="00.jpg">';
    p[1] = '<img src="01.jpg">';
    p[2] = '<img src="02.jpg">';
    function 
    bring(){
    tt window.opener.document.getElementsByTagName('input');
    j=0;
    pp='';
    var 
    = new Array()
    for(
    i=0;i<tt.length;i++){
    if(
    tt[i].type == 'radio'){
    t[j] = window.opener.document.getElementsByTagName('input')[i];
    if(
    t[j].checked){
    pp pp+p[j];
    }
    j++;
    }
    }
    document.body.innerHTML pp;
    }
    </
    script>
    </
    head>
    <
    body onload="bring()">
    </
    body>
    </
    html
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

    Comment


    • #3
      forgot about the attach...
      Attached Files
      KOR
      Offshore programming
      -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

      Comment


      • #4
        small correction (stylish...)

        replace
        t[j] = window.opener.document.getElementsByTagName('input')[i];

        with
        t[j] = tt[i];
        KOR
        Offshore programming
        -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

        Comment


        • #5
          awesome

          Awesome thats exactly what I was looking for.

          Now can we arrange them too from the new page?
          like drop down menus to number them 1-12?

          and then send them to a 3rd page?

          and what would even be better is to then from the 3rd page be able to confirm them and submit the results to an email

          I'm not asking for much am I!

          thanks very much though - this step alone has been very helpful

          Comment


          • #6
            [quote]
            I'm not asking for much am I!
            /quote]
            nope... just time (GMT+2 here ) I'll try to solve that tomorrow, my time

            yet... not very clear to me what...
            [quote]
            Now can we arrange them too from the new page?
            like drop down menus to number them 1-12?
            [quote]
            means... Can u detail a bit?
            KOR
            Offshore programming
            -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

            Comment


            • #7
              sorry keyboard error

              Sorry, my keyboard broked, I replaced it

              so:

              I'm not asking for much am I!
              nope... just time (GMT+2 here ) I'll try to solve that tomorrow, my time

              yet... not very clear to me what...
              Now can we arrange them too from the new page?
              like drop down menus to number them 1-12?
              means... Can u detail a bit?
              KOR
              Offshore programming
              -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

              Comment


              • #8
                <SELECT id="State" style="WIDTH: 174px" size=1 name="State">
                <OPTION value="AK - Alaska" selected>AK -
                Alaska</OPTION><OPTION value="AL - Alabama">AL -
                Alabama</OPTION></SELECT>

                just one of those... simple thingy with numbers so the person could identify which is #1, which is #2

                with the results being placed in order

                so that the 3 picts you used as examples could be placed in order
                2,3,1 or 1,3,2 or 321 etc

                Comment


                • #9
                  KOR

                  any ideas yet?

                  Comment


                  • #10
                    Threre are two separate problems here. First was the easiest to solve - to pass information from an opener to a popup window back and forth.

                    The second is to re-order, on will, some objects on the page. I still think of it. The normal way would be using DOM methods. If a single page, it would have been not very intricate, but your case the objects are already "virtual" on the new page, so I think how to re-create them as DOM objects... Maybe I should modify the way from the beggining, maybe to create the objects as DOM objects from the first page, and move them later... I am still thinking how to do that.
                    KOR
                    Offshore programming
                    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

                    Comment


                    • #11
                      Thank you so much

                      I really appreciate it

                      Comment


                      • #12
                        trying to use script

                        Hi,

                        Finally trying to use this script you provided.

                        It doesn't seem to be working





                        would appreciate if you could take a look and see if I messed something up?

                        Strangely also your new and index files in your zip file don't work either???

                        thanks so much

                        Comment


                        • #13
                          You missunderstood one of my thread with replacements.

                          The function should be:

                          PHP Code:
                          function bring(){
                          tt window.opener.document.getElementsByTagName('input');
                          j=0;
                          pp='';
                          var 
                          = new Array()
                          for(
                          i=0;i<tt.length;i++){
                          if(
                          tt[i].type == 'radio'){
                          t[j] = tt[i];
                          if(
                          t[j].checked){
                          pp pp+p[j];
                          }
                          j++;
                          }

                          KOR
                          Offshore programming
                          -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

                          Comment


                          • #14
                            AH --- OOPS..

                            Thanks for your patience and assitance

                            Comment

                            Working...
                            X