[ This topic is solved ]
Joao Correa
19 December 08 / 17:30
Changed at 19 December 08 / 19:29
Is possible to add a image button to open a popup?
The button may not submit the form .
Example:
<?php
$form -> imageButton ( "images/autocomplete_leftcap.gif" , "" ,
"onClick=\"window.open('cid.php?c=cid_pri_cod&d=cid_pri','Cid','width=500,height=300,scrollbars=yes,menubar = no,toolbar = no')\"" );
?>
Thanks!
Johan Wiegel (Admin)
19 December 08 / 18:44
How about:
<?php
$form -> imageButton ( "images/autocomplete_leftcap.gif" , "" ,
"onClick=\"window.open('cid.php?c=cid_pri_cod&d=cid_pri','Cid','width=500,height=300,scrollbars=yes,menubar = no,toolbar = no')\";return false;" );
?>
Joao Correa
19 December 08 / 19:32
Sorry for my English.
The button may not submit the form.
imageButton submit the form by default.
I would like this to be disabled, and only the link work.
return false dont solve.
Regards.
Johan Wiegel (Admin)
19 December 08 / 20:04
Changed at 19 December 08 / 20:04
your english isn't the problem my code was the problem.
return false solves your problem of submitting, but it should be on the other side of the quote:
<?php
$form -> imageButton ( "images/autocomplete_leftcap.gif" , "" ,
'onClick="window.open(' cid . php ? c = cid_pri_cod & d = cid_pri ',' Cid ',' width = 500 , height = 300 , scrollbars = yes , menubar = no , toolbar = no ');return false;";' );
?>
this one is tested and works.
Joao Correa
19 December 08 / 23:36
Thanks Johan, works fine!