SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 33 of 33
  1. #26
    Non-Member
    Join Date
    Aug 2007
    Posts
    494
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pmw57 View Post
    What does var_dump show you for $_GET and $_POST ?

    Code php:
    echo '<pre>', var_dump($_GET), '</pre>';
    echo '<pre>', var_dump($_POST), '</pre>';
    echo '<pre>', var_dump($_GET), '</pre>'; always with the same sID (28)
    echo '<pre>', var_dump($_POST), '</pre>'; all sID: 28, 29, 30, 31, 32.....

  2. #27
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    You may need to send me a link to a demo page - so that I may investigate deeper as to the cause.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #28
    Non-Member
    Join Date
    Aug 2007
    Posts
    494
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pmw57 View Post
    You may need to send me a link to a demo page - so that I may investigate deeper as to the cause.
    Sorry but I working in localhost...

    I send complete page htm:
    Code:
    <link type="text/css" rel="stylesheet" href="css/style.css">
    <div id="someList">
    
    <script language="javascript" type="text/javascript">
    <!--
    
    function uncheckAllExceptThis(input) {
        var table = input.parentNode,
            els,
            el,
            i;
        while (table.nodeName !== 'TABLE' && table.nodeName !== 'BODY') {
            table = table.parentNode;
        }
        if (table.nodeName === 'BODY') {
            return;
        }
        els = table.getElementsByTagName('input');
        for (i = 0; i < els.length; i += 1) {
            el = els[i];
            if (el.type === 'checkbox' && el !== input) {
                //console.log(el.checked);
                el.checked = false;
                updateRowColour(el);
            }
        }
    }
    function updateRowColour(input) {
        var checked = '';
        if (input.checked) {
            checked = 'checked';
        } else {
            input.checked = null;
        }
        input.parentNode.parentNode.className = checked;
    }
    
    var list = document.getElementById('someList');
    list.onclick = function (evt) {
        evt = evt || window.event;
        var targ = evt.target || evt.srcElement;
        if (!(targ && targ.nodeName && targ.nodeName === 'INPUT' && targ.type === 'checkbox')) {
            return;
        }
        
        uncheckAllExceptThis(targ);
        updateRowColour(targ);
        
        if (targ.checked) {
        
        var w = 1000
        var h = 400
        var left = (screen.width/2)-(w/2);
        var top  = (screen.height/2)-(h/2);
        window.open ('somePage.php?sID=51', '', 'location=no, directories=no, status=no, menubar=no, scrollbars=yes, toolbar=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);        
        
        }
    };
    
    
    //-->
        </script>
    
    
    
    <br>
    <div align=center>
    <center>
    <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 style="border: 1px Solid #6699CC;">
    <tr>
    <td>
    <TABLE BORDER=0 CELLPADDING=2 CELLSPACING=2 style="font-size=11px;font-family:tahoma;" width="100&#37;" BGCOLOR=WHITE>
    <tr bgcolor=#dcdcdc>
    <td align=center></td>
    <td align=center><b>DTR</b></td>
    <td align=center><b>DATA<br>EVENTO</b></td>
    <td align=center><b>HH:MM</b></td>
    <td align=center><b>NOME<br>IMPIANTO</b></td>
    <td align=center><b>DATI<br>EVENTO C.O.</b></td>
    <td align=center><b>STRALCIO<br>PROT.SERV.</b></td>
    <td align=center><b>CODICE<br>MA.RE</b></td>
    <td align=center><b>SCHEDA<br>EVENTO</b></td>
    <td align=center><b>ANALISI<br>PROT.</b></td>
    <td align=center><b>ATT.<BR>RIPR.</b></td>
    <td align=center><b>ATT.<BR>PIAN.</b></td>
    <td align=center><b>REL.<BR>TEC.</b></td>
    <td align=center><b>STATO<br>EVENTO</b></td>
    <td align=center><b>DOWN<br>LOAD</b></td>
    
    <tr bgcolor=#F6F6F6>
    <td align=center>
    <input type=checkbox name=C1 value=ON></td>
    <td align=right>TOU</td>
    <td align=right>08/02/2010</td>
    <td align=center>18:00</td>
    <td align=left>PORTOFERRAIO</td>
    <td align=center>
    <a href="javascript:void(0);"onClick="if(confirm('Confermi?'))Popup(950,200,'inc_descrizione_dettaglio_evento_co.asp?id=51&Q=2');return false;"><img border=0 src=/mac/images/mostra_icon.gif alt='VISUALIZZA DATI EVENTO CARICATI DA C.O.'></a></td>
    <td align=center><a href="javascript:void(0);"onClick="if(confirm('Confermi?'))location.href=' http://weblaz.risorse.enel//MAC/Agip/UploadFolder/Archivio/10009/portoferraio.doc'; return false;"><img border=0 src=/mac/images/download.gif alt='VISUALIZZA STRALCIO PROTOCOLLO ALLEGATO'></a></td>
    <td align=center><B><font color=#FF0000>Da inserire</font></B></td>
    <td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td>
    <td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td>
    <td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td>
    <td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td>
    <td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td>
    <td align=center>
    <a href="javascript:void(0);" onClick="if(confirm('Confermi?')) Popup(700,650,'inc_modifica_stato.asp?id=51&a=2&x=zzz&s=0');return false;">
    <img border=0 src=/mac/images/bullett/greybul.gif alt='DA ANALIZZARE'></a></td>
    <td align=center><a href="javascript:void(0);" onClick="if(confirm('Confermi?')) location.href='inc_xls_evento.asp?ID=51'; return false;"><img border=0 src=/mac/images/download.gif alt='CONSULTA EVENTO COMPLETO'></a></td>
    </div>
    
    <tr bgcolor=#F6F6F6>
    <td align=center>
    <input type=checkbox name=C1 value=ON></td><td align=right>CMP</td><td align=right>07/02/2010</td><td align=center>06:43</td><td align=left>SALERNO NORD</td><td align=center><a href="javascript:void(0);"onClick="if(confirm('Confermi?'))Popup(950,200,'inc_descrizione_dettaglio_evento_co.asp?id=50&Q=2');return false;"><img border=0 src=/mac/images/mostra_icon.gif alt='VISUALIZZA DATI EVENTO CARICATI DA C.O.'></a></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><B><font color=#FF0000>Da inserire</font></B></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><a href="javascript:void(0);" onClick="if(confirm('Confermi?')) Popup(700,650,'inc_modifica_stato.asp?id=50&a=2&x=zzz&s=0');return false;"><img border=0 src=/mac/images/bullett/greybul.gif alt='DA ANALIZZARE'></a></td><td align=center><a href="javascript:void(0);" onClick="if(confirm('Confermi?')) location.href='inc_xls_evento.asp?ID=50'; return false;"><img border=0 src=/mac/images/download.gif alt='CONSULTA EVENTO COMPLETO'></a></td>
    
    </div>
    
    <script type="text/javascript">
    
    var list = document.getElementById('someList');
    list.onclick = function (evt) {
        evt = evt || window.event;
        var targ = evt.target || evt.srcElement;
        if (!(targ && targ.nodeName && targ.nodeName === 'INPUT' && targ.type === 'checkbox')) {
            return;
        }
        uncheckAllExceptThis(targ);
        updateRowColour(targ);
        
        if (targ.checked) {
        
        var w = 1000
        var h = 400
        var left = (screen.width/2)-(w/2);
        var top  = (screen.height/2)-(h/2);
        window.open ('somePage.php?sID=50', '', 'location=no, directories=no, status=no, menubar=no, scrollbars=yes, toolbar=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);        
        
    
        }
    };
    
    </script>
    
    <tr bgcolor=#F6F6F6><td align=center><input type=checkbox name=C1 value=ON></td><td align=right>LAM</td><td align=right>16/01/2010</td><td align=center>10:38</td><td align=left>CARSOLI</td><td align=center><a href="javascript:void(0);"onClick="if(confirm('Confermi?'))Popup(950,200,'inc_descrizione_dettaglio_evento_co.asp?id=40&Q=2');return false;"><img border=0 src=/mac/images/mostra_icon.gif alt='VISUALIZZA DATI EVENTO CARICATI DA C.O.'></a></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><B><font color=#FF0000>Da inserire</font></B></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><a href="javascript:void(0);" onClick="if(confirm('Confermi?')) Popup(700,650,'inc_modifica_stato.asp?id=40&a=2&x=zzz&s=0');return false;"><img border=0 src=/mac/images/bullett/greybul.gif alt='DA ANALIZZARE'></a></td><td align=center><a href="javascript:void(0);" onClick="if(confirm('Confermi?')) location.href='inc_xls_evento.asp?ID=40'; return false;"><img border=0 src=/mac/images/download.gif alt='CONSULTA EVENTO COMPLETO'></a></td>
    
    </div>
    
    <script type="text/javascript">
    
    var list = document.getElementById('someList');
    list.onclick = function (evt) {
        evt = evt || window.event;
        var targ = evt.target || evt.srcElement;
        if (!(targ && targ.nodeName && targ.nodeName === 'INPUT' && targ.type === 'checkbox')) {
            return;
        }
        uncheckAllExceptThis(targ);
        updateRowColour(targ);
        
        if (targ.checked) {
        
        var w = 1000
        var h = 400
        var left = (screen.width/2)-(w/2);
        var top  = (screen.height/2)-(h/2);
        window.open ('somePage.php?sID=40', '', 'location=no, directories=no, status=no, menubar=no, scrollbars=yes, toolbar=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);        
        
        }
    };
    
    </script>
    
    
    <tr bgcolor=#F6F6F6><td align=center><input type=checkbox name=C1 value=ON></td><td align=right>CMP</td><td align=right>15/01/2010</td><td align=center>02:32</td><td align=left>PINETAMARECP</td><td align=center><a href="javascript:void(0);"onClick="if(confirm('Confermi?'))Popup(950,200,'inc_descrizione_dettaglio_evento_co.asp?id=29&Q=2');return false;"><img border=0 src=/mac/images/mostra_icon.gif alt='VISUALIZZA DATI EVENTO CARICATI DA C.O.'></a></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><B><font color=#FF0000>Da inserire</font></B></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><a href="javascript:void(0);" onClick="if(confirm('Confermi?')) Popup(700,650,'inc_modifica_stato.asp?id=29&a=2&x=zzz&s=0');return false;"><img border=0 src=/mac/images/bullett/greybul.gif alt='DA ANALIZZARE'></a></td><td align=center><a href="javascript:void(0);" onClick="if(confirm('Confermi?')) location.href='inc_xls_evento.asp?ID=29'; return false;"><img border=0 src=/mac/images/download.gif alt='CONSULTA EVENTO COMPLETO'></a></td>
    
    </div>
    
    <script type="text/javascript">
    
    var list = document.getElementById('someList');
    list.onclick = function (evt) {
        evt = evt || window.event;
        var targ = evt.target || evt.srcElement;
        if (!(targ && targ.nodeName && targ.nodeName === 'INPUT' && targ.type === 'checkbox')) {
            return;
        }
        uncheckAllExceptThis(targ);
        updateRowColour(targ);
        
        if (targ.checked) {
        
        var w = 1000
        var h = 400
        var left = (screen.width/2)-(w/2);
        var top  = (screen.height/2)-(h/2);
        window.open ('somePage.php?sID=29', '', 'location=no, directories=no, status=no, menubar=no, scrollbars=yes, toolbar=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);        
        
        }
    };
    
    </script>
    
    
    <tr bgcolor=#F6F6F6><td align=center><input type=checkbox name=C1 value=ON></td><td align=right>LAM</td><td align=right>15/01/2010</td><td align=center>12:56</td><td align=left>ROCCARASO</td><td align=center><a href="javascript:void(0);"onClick="if(confirm('Confermi?'))Popup(950,200,'inc_descrizione_dettaglio_evento_co.asp?id=39&Q=2');return false;"><img border=0 src=/mac/images/mostra_icon.gif alt='VISUALIZZA DATI EVENTO CARICATI DA C.O.'></a></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><B><font color=#FF0000>Da inserire</font></B></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><a href="javascript:void(0);" onClick="if(confirm('Confermi?')) Popup(700,650,'inc_modifica_stato.asp?id=39&a=2&x=zzz&s=0');return false;"><img border=0 src=/mac/images/bullett/greybul.gif alt='DA ANALIZZARE'></a></td><td align=center><a href="javascript:void(0);" onClick="if(confirm('Confermi?')) location.href='inc_xls_evento.asp?ID=39'; return false;"><img border=0 src=/mac/images/download.gif alt='CONSULTA EVENTO COMPLETO'></a></td>
    
    </div>
    
    <script type="text/javascript">
    
    var list = document.getElementById('someList');
    list.onclick = function (evt) {
        evt = evt || window.event;
        var targ = evt.target || evt.srcElement;
        if (!(targ && targ.nodeName && targ.nodeName === 'INPUT' && targ.type === 'checkbox')) {
            return;
        }
        uncheckAllExceptThis(targ);
        updateRowColour(targ);
        
        if (targ.checked) {
        
        var w = 1000
        var h = 400
        var left = (screen.width/2)-(w/2);
        var top  = (screen.height/2)-(h/2);
        window.open ('somePage.php?sID=39', '', 'location=no, directories=no, status=no, menubar=no, scrollbars=yes, toolbar=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);        
        
        }
    };
    
    </script>
    
    
    <tr bgcolor=#F6F6F6><td align=center><input type=checkbox name=C1 value=ON></td><td align=right>CMP</td><td align=right>14/01/2010</td><td align=center>21:01</td><td align=left>SORRENTO</td><td align=center><a href="javascript:void(0);"onClick="if(confirm('Confermi?'))Popup(950,200,'inc_descrizione_dettaglio_evento_co.asp?id=28&Q=2');return false;"><img border=0 src=/mac/images/mostra_icon.gif alt='VISUALIZZA DATI EVENTO CARICATI DA C.O.'></a></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><B><font color=#FF0000>Da inserire</font></B></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><img border=0 src=/mac/images/elimina_icon.gif alt='NON DISPONIBILE'></td><td align=center><a href="javascript:void(0);" onClick="if(confirm('Confermi?')) Popup(700,650,'inc_modifica_stato.asp?id=28&a=2&x=zzz&s=0');return false;"><img border=0 src=/mac/images/bullett/greybul.gif alt='DA ANALIZZARE'></a></td><td align=center><a href="javascript:void(0);" onClick="if(confirm('Confermi?')) location.href='inc_xls_evento.asp?ID=28'; return false;"><img border=0 src=/mac/images/download.gif alt='CONSULTA EVENTO COMPLETO'></a></td>
    
    </div>
    
    <script type="text/javascript">
    
    var list = document.getElementById('someList');
    list.onclick = function (evt) {
        evt = evt || window.event;
        var targ = evt.target || evt.srcElement;
        if (!(targ && targ.nodeName && targ.nodeName === 'INPUT' && targ.type === 'checkbox')) {
            return;
        }
        uncheckAllExceptThis(targ);
        updateRowColour(targ);
        
        if (targ.checked) {
        
        var w = 1000
        var h = 400
        var left = (screen.width/2)-(w/2);
        var top  = (screen.height/2)-(h/2);
        window.open ('somePage.php?sID=28', '', 'location=no, directories=no, status=no, menubar=no, scrollbars=yes, toolbar=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);        
        
        }
    };
    
    </script>
    
    
    </tr></table></td></tr></table>

  4. #29
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    I don't see any form tags in the code that you posted. Did you remove them from your code?

    I also see that you have JavaScript code above the HTML code. Move it down to just before the </body> tag, and remove duplicates that you have there.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #30
    Non-Member
    Join Date
    Aug 2007
    Posts
    494
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pmw57 View Post
    I don't see any form tags in the code that you posted. Did you remove them from your code?
    This is the original page htm, with metod GET:

    Code:
    window.open ('somePage.php?sID=51', '', 'location=no, directories=no, status=no, menubar=no, scrollbars=yes, toolbar=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
    The same error with method GET or method POST ( your suggestions )

    In this case I select checkbox with sID=51 value GET and I have in the somePage.php always sID=28 ( last value of last checkbox ).

  6. #31
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    I might have to admit defeat here. I'm having a hard time trying to understand the information you provide, I don't know how your pages are supposed to work with each other, and I don't know what information needs to be passed from one page to the next.

    I feel like a blind man groping strange parts of an elephant.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  7. #32
    Non-Member
    Join Date
    Aug 2007
    Posts
    494
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your help.
    Very appreciate

    It's not difficult:

    1) When select the checkbox, the line should change color and open a window popup.
    2) I need go in the window popup the sID for each checkbox.

    The problem is sID go in the window popup always 28 ( last value of last checkbox )

    In the source of page htm the checkbox value is correct, not understand why not go in querystring the correct value in the page open in window popup:

    PHP Code:
    window.open ('somePage.php?sID=51''''location=no, directories=no, status=no, menubar=no, scrollbars=yes, toolbar=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); 

  8. #33
    Non-Member
    Join Date
    Aug 2007
    Posts
    494
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I understand the problem!

    In the page I don't have only one id="someList": I have as those generated form the dynamic page.

    With this change now everything works !

    Code:
    <input type=checkbox name=C1 value=ON id=someList_" & objRS("sID") & ">
    .....
    var list = document.getElementById('someList_<&#37;=objRS("sID")%>');
    .....
    window.open ('somePage.php?sID=<%=objRS("sID")%>', '',..... )


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •