Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 17
  1. #1
    Utente di HTML.it
    Registrato dal
    Nov 2001
    Messaggi
    184

    Passaggio da PopUp a campo particolare di form "opener"

    Allora se ho un textbox che si chiama Pippo[0], e apro un PopUp, che mi da la possibilità di cambiare il valore a quel campo, nella funzione di passaggio document.opener.nome_form.Pippo[0].value=XXX,
    mi da l'errore.
    Come posso rimediare ?

  2. #2
    Utente di HTML.it
    Registrato dal
    Aug 2002
    Messaggi
    8,013
    e

    window.opener.... ?
    <´¯)(¯`¤._)(¯`»ANDREA«´¯)(_.¤´¯)(¯`>
    "The answer to your question is: welcome to tomorrow"

  3. #3
    Utente di HTML.it
    Registrato dal
    Nov 2001
    Messaggi
    184

    Si è lui!

    Si è lui!
    Si tramite il window.opener, hai ragione, scusami ho sbagliato a trascrivere!

  4. #4
    Utente di HTML.it
    Registrato dal
    Aug 2002
    Messaggi
    8,013
    cioè adesso dici che funziona, oppure che anche prima era window.opener e non funzionava lo stesso?
    <´¯)(¯`¤._)(¯`»ANDREA«´¯)(_.¤´¯)(¯`>
    "The answer to your question is: welcome to tomorrow"

  5. #5
    Utente di HTML.it
    Registrato dal
    Nov 2001
    Messaggi
    184
    con lo window.opener nn funziona cmq.

  6. #6
    Utente di HTML.it
    Registrato dal
    Aug 2002
    Messaggi
    8,013
    posta un po' più di codice
    <´¯)(¯`¤._)(¯`»ANDREA«´¯)(_.¤´¯)(¯`>
    "The answer to your question is: welcome to tomorrow"

  7. #7
    Utente di HTML.it
    Registrato dal
    Nov 2001
    Messaggi
    184
    Questa è la text che richiama:
    <INPUT TYPE=\"Text\" MAXLENGTH=\"15\" SIZE=\"16\" NAME=\"CntDare[0]\" VALUE=\"$CodCntCli\" OnFocus=\"pos=this.name;variabili='&Pdc=$Pdc&NomeC ampo='+this.name+'&Mt=MtCli';pagina='selclifor';\" ONBlur=\" ONBLur=\"PopUPFinte('clicnt.php',this.value,'Pdc=$ Pdc&NomeC=C_Dare&CodConto','N','C_Dare','RegAdd'); \">


    Questo lo script nell'HEAD
    var isNav=false
    if (parseInt(navigator.appVersion)>=4){
    if (navigator.appName == \"Netscape\"){
    window.captureEvents(Event.ONKEYPRESS)
    window.onkeypress = tasti
    isNav = true
    }
    else
    document.onkeydown = tasti
    }

    var pos=null
    var variabili=null
    var pagina=null

    function tasti(e){
    nome = pos;
    if (nome != null){
    if (isNav){
    if (e.keyCode == 120){
    WinPers(pagina+'.php?Form=$Nome_Form&DBNAME=$DBNAM E&Cl=$Cl&CodDit=$CodDit'+variabili,'new_win',625,3 75)
    }
    }
    else{
    if (window.event.keyCode == 120){
    WinPers(pagina+'.php?Form=$Nome_Form&DBNAME=$DBNAM E&Cl=$Cl&CodDit=$CodDit'+variabili,'new_win',625,3 75)
    }
    }
    pos = null;
    }
    }

  8. #8
    Utente di HTML.it
    Registrato dal
    Nov 2001
    Messaggi
    184

    Ops, lo script nella pagina che apro

    function SelConto(Conto){
    window.opener.document.$Form.$NomeCampo.value=Cont o;
    window.close();
    }

  9. #9
    Utente di HTML.it
    Registrato dal
    Aug 2002
    Messaggi
    8,013
    ok, vedo che c'è php misto ad altro. a me intressa quello che si legge nel codice html preso da una pagina, ossia quello che vedi nel broswer, che, necessariamente sarà diverso da quello che vedi in notepad (ossia il sorgente della pagina php che hai postato).
    <´¯)(¯`¤._)(¯`»ANDREA«´¯)(_.¤´¯)(¯`>
    "The answer to your question is: welcome to tomorrow"

  10. #10
    Utente di HTML.it
    Registrato dal
    Nov 2001
    Messaggi
    184
    Questa la pagina "madre"

    <html>
    <head>
    <title>.: PrimaNota OnLine by Initweb :.</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript">

    function WinPers(url,name,w,h)
    {
    lt = (screen.width - w)/2;
    tp = (screen.height - h)/2 - 50;

    popupWin = window.open(url,name,'left='+lt+', top='+tp+', scrollbars=yes, titlebar=yes, menubar=yes, status=yes , resizable=yes, width='+w+',height='+h)
    }

    function onlynum(e)
    {
    if(e.which){
    if(e.which!=46 && e.which!=8 && (e.which<48 || e.which>57))
    return false;
    }
    else if(e.keyCode){
    if(e.keyCode!=46 && e.keyCode!=8 && (e.keyCode<48 || e.keyCode>57))
    return false;
    }
    return true;
    }


    function PopUP(pagina,valore,variabile)

    {

    if (valore != '')

    {

    window.open( pagina+'?'+variabile+'='+valore+'&CodDit=0001&DBNA ME=PrimaNota', 'miaPop', 'scrollbars=yes, titlebar=yes, menubar=yes, status=yes , resizable=yes, width=400, height=300');

    }

    }


    function PopUPFinte(pagina,valore,variabile, obbli, nomecampo, nomeform)

    {

    if ((obbli == 'S') && (valore == ''))
    {
    alert('Campo Obbligatorio');
    }

    if (valore != '')

    {

    lt = screen.width;
    tp = screen.height;
    window.open( pagina+'?'+variabile+'='+valore+'&CodDit=0001&DBNA ME=PrimaNota', 'miaPop', 'scrollbars=no, titlebar=no, menubar=no, status=no , resizable=no, width=1, height=1, left=lt;, top=tp');

    }

    }


    var isNav=false
    if (parseInt(navigator.appVersion)>=4){
    if (navigator.appName == "Netscape"){
    window.captureEvents(Event.ONKEYPRESS)
    window.onkeypress = tasti
    isNav = true
    }
    else
    document.onkeydown = tasti
    }

    var pos=null
    var variabili=null
    var pagina=null

    function tasti(e){
    nome = pos;
    if (nome != null){
    if (isNav){
    if (e.keyCode == 120){
    WinPers(pagina+'.php?Form=Contabile&DBNAME=PrimaNo ta&Cl=cl_kekko&CodDit=0001'+variabili,'new_win',62 5,375)
    }
    }
    else{
    if (window.event.keyCode == 120){
    WinPers(pagina+'.php?Form=Contabile&DBNAME=PrimaNo ta&Cl=cl_kekko&CodDit=0001'+variabili,'new_win',62 5,375)
    }
    }
    pos = null;
    }
    }

    </script>
    </script>
    <style>
    body {font-family:verdana; font-size: 12pt; background-color: #D0D0D0; }
    hr {color:#FF9900}
    td {
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    }

    input {font-family:verdana; font-size: 10pt}
    a:link, a:visited{text-decoration: none;}
    </style>
    </head>
    <body >
    <table align = "center" width = "100%">
    <tr>
    <td valign="top">
    [img]img/home.png[/img]
    </td>
    <td colspan="3" align="right">
    [img]img/logo_pn.png[/img]
    </td>
    </tr>
    <tr>
    <td colspan="4" valign="top">
    <hr>
    </td>
    </tr></TABLE>

    <TABLE width="95%" Align="center">
    <tR>
    <th>Conto D.</th>
    <th>Conto A.</th>
    <th>Des. Conto</th>
    <th>Imp.</th>
    <th>Des. Mov.</th>
    </tr>
    <form action="" NAME="Contabile" METHOD="POST"><tr>
    <td align="right">
    <INPUT TYPE="Text" MAXLENGTH="7" SIZE="8" NAME="CntDare[0]" VALUE="" OnFocus="pos=this.name;variabili='&Pdc=0&NomeCampo ='+this.name+'&Mt=MtFor';pagina='selclifor';" ONBlur=" ONBLur="PopUPFinte('clicnt.php',this.value,'Pdc=0& NomeC=C_Dare&CodConto','N','C_Dare','RegAdd');">
    </td>
    <td align="right">
    <INPUT TYPE="Text" MAXLENGTH="7" SIZE="8" NAME="CntAvere[0]" VALUE="0600001" OnFocus="pos=this.name;variabili='&Pdc=0&NomeCampo ='+this.name+'&Mt=MtFor';pagina='selclifor';" ONBlur=" ONBLur="PopUPFinte('clicnt.php',this.value,'Pdc=0& NomeC=C_Dare&CodConto','N','C_Dare','RegAdd');">
    </td>
    <td><INPUT TYPE="Text" READONLY Name="DesCnt[0]" VALUE="Fabio Simplicio da Silva" SIZE="23"></td><td align="right"><INPUT TYPE = "Text" NAME="Importo[0]" Value="1200"></td><td>Fatture Acquisto</td></tr><tr>
    <td colspan="5">
    <hr>
    </td>
    </tR>
    <tR>
    <td colspan="5">
    <iframe src="gstcont.php?DBNAME=PrimaNota&IDMov=15&CodDit= 0001&DesMov=Fatture Acquisto&Pdc=0" width="100%" height="200">
    </td>
    </tr>

    Questa la "figlia":





    <html>
    <head>
    <title>.: PrimaNota OnLine by Initweb :.</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript">

    function WinPers(url,name,w,h)
    {
    lt = (screen.width - w)/2;
    tp = (screen.height - h)/2 - 50;

    popupWin = window.open(url,name,'left='+lt+', top='+tp+', scrollbars=yes, titlebar=yes, menubar=yes, status=yes , resizable=yes, width='+w+',height='+h)
    }

    function onlynum(e)
    {
    if(e.which){
    if(e.which!=46 && e.which!=8 && (e.which<48 || e.which>57))
    return false;
    }
    else if(e.keyCode){
    if(e.keyCode!=46 && e.keyCode!=8 && (e.keyCode<48 || e.keyCode>57))
    return false;
    }
    return true;
    }



    function SelConto(Conto){
    window.opener.document.Contabile.CntAvere[0].value=Conto;
    window.close();
    }
    </script>
    <style>
    body {font-family:verdana; font-size: 12pt; background-color: #D0D0D0; }
    hr {color:#FF9900}
    td {
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    }

    input {font-family:verdana; font-size: 10pt}
    a:link, a:visited{text-decoration: none;}
    </style>
    </head>
    <body >
    <table align = "center" width = "100%">
    <tr>
    <td valign="top">
    [img]img/home.png[/img]
    </td>
    <td colspan="3" align="right">
    [img]img/logo_pn.png[/img]
    </td>
    </tr>
    <tr>
    <td colspan="4" valign="top">
    <hr>
    </td>
    </tr></TABLE>
    <table align = "center" width = "85%"><tr>
    <td>

    </td>
    <td>
    0600001
    </td>
    <td>
    Fabio Simplicio da Silva
    </td>
    </tr><tr>
    <td>

    </td>
    <td>
    0600002
    </td>
    <td>
    MedicalCreatin's Spa
    </td>
    </tr>

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.