|
Posted by shimmyshack on 09/05/07 20:31
On Sep 5, 7:43 pm, Ulf Kadner <dr_lo...@gmx.net> wrote:
> ame...@iwc.net wrote:
> > I cannot get this stupid Javascript code to embed properly in my PHP.
> > It does not show the 'select' button. I believe it is my quotes,
> > maybe Javascript does not like something.......
>
> > Anyhow, can someone help me with the syntax?? I'd really appreciate
> > it. The code works fine in just plain HTML......
>
> Rik gives you some usefull informations. I will show you only a way for
> doing better:
>
> PHP (and other languages) give you a construct, named Heredoc
>
> echo <<<TXT
> <TABLE><TR>
> <TD><input type=text name='partydate' value='$party_date'>
> ... and so on...
> TXT;
>
> Thats it.
>
> So long, Ulf
>
> --
> _,
> _(_p> Ulf [Kado] Kadner
> \<_)
> ^^
yeah use Ulf's method - job done.
just do this
$html = '';
$html = <<<HTML
<!-- cut and paste your html below this line and before the HTML;
line-->
HTML;
echo $html;
by the way not sure if you got what Rick was saying there, it's the
double quotes on your document write line:
echo " document.write(\"<input type=button
onclick='popUpCalendar(this, editparty.partydate, \"mm/dd/yyyy\")'
value='select' style='font-size:11px'>\") }\n";
should be
echo " document.write('<input type=button
onclick=\"popUpCalendar(this, editparty.partydate, \'mm/dd/yyyy\')\"
value=\"select\" style=\"font-size:11px\">') }\n";
[Back to original message]
|