Re: How to change value of input on form from iframe?
| From: | Dezider Góra | Date: | Tue, 15 May 2001 07:50:59 +0000 |
| Subject: | Re: How to change value of input on form from iframe? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52812@lists.php.net to get a copy of this message | ||
Hi, thanks for the effort.
The only thing I need is to store the value of the second combo that is inside
of the iframe to the hidden textbox which is in the main form so I can send
it's value with the main form for further processing.
I just can't seem to find the correct syntax for this.
Anybody can help?
tia
Dezider.
> > the main page:
> >
> > <HEAD>
> > <?
> > echo "<SCRIPT LANGUAGE=\"JAVASCRIPT\">";
> > echo "function requery(country_id)";
> > echo "{";
> > echo "document.all.operator.src=\"getoperators.php?id=\" +
> > country_id;";
> >
> > echo "}";
> > echo "</SCRIPT>";
> > ?>
> > </HEAD>
> > <BODY>
> > .
> > .
> > .
> > <TD WIDTH="150"><B>Operátor</B></TD>
> > <TD>:</TD>
> > <TD><IFRAME name="operator" "id="operator"
> > SRC="getoperators.php" FRAMEBORDER=NO SCROLLING=NO HEIGHT="22"
> > WIDTH="200"></IFRAME></td>
> > </TR>
> > <TR>
> > <TD COLSPAN="3">
> > <INPUT TYPE="HIDDEN" NAME="operatorid"
> > id="operatorid"
> > VALUE="0">
> > <input type="SUBMIT" value="Send">
> > </td>
> > </TR>
> >
> > getoperators.php is:
> >
> > <HTML>
> > <HEAD>
> > <SCRIPT language="Javascript">
> > function savevalue(oper_id)
> > {
> > alert (oper_id)
> > document.forms["newphone"].operatorid.value=oper_id;
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > PLEASE how to correct this?
> > }
> > </SCRIPT>
> > </HEAD>
> > <?
> > include "../../include/data_mysql.php";
> > $objData = new mysql_db;
> > $objData->init();
> > $sqlstring = "select * from cell_operators where country = $id";
> > $obj_str = "<SELECT NAME=\"operid\" TABINDEX=\"1\"
> > SIZE=\"1\"
> > style=\"position: absolute; top: 0px; left: 0px\"
> > onChange=\"savevalue(this.value)\"><OPTION VALUE=\"0\">nie
> > je</OPTION>";
> >
> > if ( $objData->query($sqlstring) ):
> > # Create a list from results
> > while ( $objData->movenext() == False ){
> > $obj_str .= "<OPTION VALUE=\"" . $objData->value(
> > "id" ) .
> > "\">" . $objData->value( "cell_prefix" ) . ' - '
> > . $objData->value(
> > "description" ) . "</OPTION>";
> > }
> > endif;
> > $obj_str .= "</SELECT>";
> > echo $obj_str;
> > ?>
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net