Dooling Posted January 12, 2007 Report Share Posted January 12, 2007 (edited) Lieta tāda, izveidoju meklēšanas formu. Viss darbojas. Ir tik viena problēma uz IE ievadot meklējamo input laukā un nospiežot Enter nekas nenotiek, bet uz FF viss notiekās, bet nospiežot pogu "Meklēt" IE, viss darbojas. Kā šo problēmu atrisina? P.S. Blakus input laukam vēl ir selects, kur norādām, kur meklēt. Edited January 12, 2007 by Dooling Link to comment Share on other sites More sharing options...
andrisp Posted January 12, 2007 Report Share Posted January 12, 2007 (edited) Ja fokus ir uz selekta, tad enter nestrādās. Kā arī - vai tev ir form tags pareizi noformēts ? ar visiem method un action ? Edited January 12, 2007 by andrisp Link to comment Share on other sites More sharing options...
Dooling Posted January 12, 2007 Author Report Share Posted January 12, 2007 Fokus man ir uz input lauka. Un Form tags man pareizi noformēts ar visiem method, action un pat name ;) Link to comment Share on other sites More sharing options...
andrisp Posted January 12, 2007 Report Share Posted January 12, 2007 Varbūt iemet iekš paste.php.lv. Link to comment Share on other sites More sharing options...
Dooling Posted January 12, 2007 Author Report Share Posted January 12, 2007 http://paste.php.lv/4963 Link to comment Share on other sites More sharing options...
andrisp Posted January 12, 2007 Report Share Posted January 12, 2007 Nez, laikam tev IE ne tāds, jo man viss nostrādāja. Link to comment Share on other sites More sharing options...
Dooling Posted January 12, 2007 Author Report Share Posted January 12, 2007 Nu es izmēģīnāju uz trim dažādiem IE 5.5, 6.0 un 7.0 un neviens nestrādā tā kā nākas :( Link to comment Share on other sites More sharing options...
hmnc Posted January 12, 2007 Report Share Posted January 12, 2007 netēmā, bet noderīgi - atvieglo darbu, izmanto funkciju: function getpost($var, $default = ''){ return ( isset($_POST[$var]) ? $_POST[$var] : $default ); } un to pašu ar get :) priekšrocības: + nevajag taisīt dubulto pārbaudi (isset + not empty) + strādā ar if ( getpost('var') ), bez papildus empty,isset,utt + var uzlikt defaulto atbildi, ja nav setots + mazāk jāraksta, lai nočekotu vērtību Link to comment Share on other sites More sharing options...
Dooling Posted January 12, 2007 Author Report Share Posted January 12, 2007 Atradu risinājumu. Link to comment Share on other sites More sharing options...
andrisp Posted January 12, 2007 Report Share Posted January 12, 2007 (edited) Nu tad varbūt arī pastāsti, kas par vainu bija. Edited January 12, 2007 by andrisp Link to comment Share on other sites More sharing options...
Dooling Posted January 12, 2007 Author Report Share Posted January 12, 2007 Pieliku klāt if nosacījumam $_POST['text']!=NULL ... if($_POST['find']=="Meklēt!" || $_POST['text']!=NULL || $_GET['search']!=null) ... Link to comment Share on other sites More sharing options...
hmnc Posted January 12, 2007 Report Share Posted January 12, 2007 drausmas!!!! paskaties pāris postus uz augšu, ko es tev biju adresējis Link to comment Share on other sites More sharing options...
andrisp Posted January 12, 2007 Report Share Posted January 12, 2007 Dooling, tātad tu nepareizi noformulēji jautājumu sākumā - nevis tev nenopostojas forma, bet gan vienkārši meklēšana nestrādā nepareiza koda dēļ. Link to comment Share on other sites More sharing options...
Recommended Posts