Pagina de start a forumului Forum PHP Romania - Discutii despre PHP, MySQL, Javascript, AJAX, etc Forum PHP Romania - Discutii despre PHP, MySQL, Javascript, AJAX, etc
Comunitatea PHP Romania
 

butonul submit de tip imagine
Vezi mesajul original

 
       Pagina de start a forumului Forum PHP Romania - Discutii despre PHP, MySQL, Javascript, AJAX, etc -> HTML/JavaScript/CSS
Subiectul anterior :: Subiectul următor  
Autor Mesaj
nemo



Data înscrierii: 04/Mai/2004
Mesaje: 31

Trimis: Mar Oct 12, 2004 12:19 pm    Titlul subiectului: butonul submit de tip imagine  

cum fac ca in loc de <input type=button name=trimite..> sa pun unul de tip imagine. am dat un view source si am vazut un <input type=image name=..>. am facut si eu si imi afiseaza butonul insa cind apas pe el nimic. in manualul php ne spune ca va fi trimis impreuna cu doi parametrii aux. coord. imaginii, insa mie nu imi merge.
inainte faceam if (isset($_POST['trimite'])){...
acum cum voi mai verifica daca s-a apasat butonul?
Sus  
Radical



Data înscrierii: 16/Feb/2004
Mesaje: 327
Locație: Bucuresti

Trimis: Mar Oct 12, 2004 1:06 pm    Titlul subiectului: INPUT type='image' name='RAMANE_LA_FEL' src='E_IN_PLUS'  

Citat: 17.4.1 Control types created with INPUT
The control type defined by the INPUT element depends on the value of the type attribute:

.... [removed] ....

image
Creates a graphical submit button. The value of the src attribute specifies the URI of the image that will decorate the button. For accessibility reasons, authors should provide alternate text for the image via the alt attribute.
When a pointing device is used to click on the image, the form is submitted and the click coordinates passed to the server. The x value is measured in pixels from the left of the image, and the y value in pixels from the top of the image. The submitted data includes name.x=x-value and name.y=y-value where "name" is the value of the name attribute, and x-value and y-value are the x and y coordinate values, respectively.

If the server takes different actions depending on the location clicked, users of non-graphical browsers will be disadvantaged. For this reason, authors should consider alternate approaches:

Use multiple submit buttons (each with its own image) in place of a single graphical submit button. Authors may use style sheets to control the positioning of these buttons.
Use a client-side image map together with scripting.

Una peste alta... atributul name TREBUIE sa ramana la locul lui...
Se modifica doar type si ia valoare image.
Apare atributul src ce ia ca valoare un URI catre imagine...

Manualul PHP (re)spune ce spune HTML-ul...

Daca nu pui atributul name unele browsere nu prea transmit valorile...
Sus  
togetorr



Data înscrierii: 25/Oct/2004
Mesaje: 9
Locație: Galati

Trimis: Mar Oct 26, 2004 3:03 pm    Titlul subiectului:  

Sa inteleg ca tu vrei sa ai un buton submit care de fapt e o imagine.
incearca asta
PHP:
an style="color: #000000"><?php <form name="form1" target="<? echo $_SERVER['PHP_SELF']; ?>">  <input type="hidden" name="login" value="yes">  <a href="#" onClick="submit()"><img src="buton1.jpeg"></a>  </form> 
Sus  
PHPRomania Bot
Bot Member


Data înscrierii: 27/Dec/2007
Mesaje: 1
Locaţie: Server Google
Trimis: Mie Dec 26, 2007 7:01 pm   Titlul subiectului: Ad  

Sus  
 
       Pagina de start a forumului Forum PHP Romania - Discutii despre PHP, MySQL, Javascript, AJAX, etc -> HTML/JavaScript/CSS
Pagina 1 din 1


Powered by phpBB 2.0.22 © 2001, 2002 phpBB Group
Varianta în limba română: Romanian phpBB online community