Autor Zpráva
Peet
Profil
Dobrý den

odesílám ajaxem text z urcite textareay.. ale zjistil jsem ze pokud je tex delsi treba 3-4 odstavce ze se neodesle odesilam metodou post

ale cetl jsem zde na diskusi ze u get jsou nejake limity odesilani ale ikdyz odeslu post v konzoli se mi ukaze i tvar v GET tak si myslim ze je to kvuli tomu nevedel by nekdo jak nastavit neomezeny prenos.? predem dekuji

Moderátor Chamurappi: Tvůj projev je špatně srozumitelný, piš prosím s diakritikou a hlavně s interpunkcí.
Keeehi
Profil
Peet:
Použít POST.
Peet
Profil
používám POST a přesto se mi dlouhý text neodešle...

    $.ajax({
      url: "inc/postObsah.php",
      type: "POST",
      dataType: "JSON",
      data: {obsah.val()},
      error: function(){alert("Error")},
      success: function(output){
        if(output.status==200){
          alert(output.hlaska);
          window.location.reload();
        }
      }
    });
Keeehi
Profil
Formát dat by měl být takovýto:
data: {"promenna1=obsahPromenne1&promenna2=obsahPromenne2"},

V tvém případě ale asi nejlépe:
data: {promenna1: obsah.val()},
Peet
Profil
ale při odeslílání get ne.?

při post používám data: {obsah: obsahPromene};

a ikdyz jsem zkusil váš zápis. nic se nezměnilo


no a to právě nefunguje dám tam delší text a on se sice odešle když se podívám do konzole ale na druhé straně už se sním nic neděje..
Keeehi
Profil
Peet:
1) zkuste krátký text, klidně třeba jen 3 znaky
2) funguje vůbec správně ten script postObsah.php? zkuste na něj nasměrovat klasický formulář odeslaný postem a zjistěte, zda pracujesprávně
Peet
Profil
Při zpracování BB značek došlo k samovolnému sežrání celého příspěvku. Pardon.
Při zpracování BB značek došlo k samovolnému sežrání celého příspěvku. Pardon.
ano vím že pracuje správně protože když odešlu třeba text o 20 znacích odešle se v pořádku

ale pokud text který má třeba 200 znaků tak už se neuloží.

toto vypisuje konzole při odesílání v záložce POST


obsahcz <p> halabaa.</p> <p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COMPANY HISTORY</p> <br /> <p> The company SCB Foundry a.s. is one of the largest manufacturing companies located in the South-Bohemian city of Czech Budejovice.&nbsp; Its size and distictive buildings, which foreshadow its production, comprise an unmistakable part of the industrial region of Czech Budejovice.</p> <p> The company was founded in the year 1964 as one of the works of ŠKODA Pilsen.&nbsp; It then commenced its production activities in the year 1965 with its first glass melting.&nbsp; Its foundry gradually became one of the largest producrers of steel castings in the former Czechoslovakia.&nbsp; After development resulting from its privitization in the 1990s, it eventually started to become an integral part of the company ČKD Kutná Hora a.s. in 2002.&nbsp; It later became an independent joint-stock company in the year 2007.&nbsp;</p> <p> Individual castings ranging from 50kg to 6,000kg of carbon and low-alloy steels, including steels with mechanical values at temperatures as low as minus 60 °C, as well as their roughing and finishing machining with quality verification by means of modern methods, have prevailed in the company's manufacturing program. These castings have been primarily designated for the railway, petroleum, automobile and shipping industries. Since the year 2004, after successful AAR (Association of American Railways) certification, the company has specialized in the production of&nbsp; castings for bogies of railway wagons and over the following five years supplied parts to the USA, Canada and Australia.&nbsp; In the year 2008 it obtained authorization for Ukranian and Russian railways.&nbsp; Our company has also responded to the situation with the global crisis and dealt with the difficult period it has been going through by reorganizing its owner relationships (single shareholder) and named a new board of directors (on 21.11.2011). The company has been successfully continuing with its production program.</p>
obsahen <p> halabaa.</p> <p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COMPANY HISTORY</p> <br /> <p> The company SCB Foundry a.s. is one of the largest manufacturing companies located in the South-Bohemian city of Czech Budejovice.&nbsp; Its size and distictive buildings, which foreshadow its production, comprise an unmistakable part of the industrial region of Czech Budejovice.</p> <p> The company was founded in the year 1964 as one of the works of ŠKODA Pilsen.&nbsp; It then commenced its production activities in the year 1965 with its first glass melting.&nbsp; Its foundry gradually became one of the largest producrers of steel castings in the former Czechoslovakia.&nbsp; After development resulting from its privitization in the 1990s, it eventually started to become an integral part of the company ČKD Kutná Hora a.s. in 2002.&nbsp; It later became an independent joint-stock company in the year 2007.&nbsp;</p> <p> Individual castings ranging from 50kg to 6,000kg of carbon and low-alloy steels, including steels with mechanical values at temperatures as low as minus 60 °C, as well as their roughing and finishing machining with quality verification by means of modern methods, have prevailed in the company's manufacturing program. These castings have been primarily designated for the railway, petroleum, automobile and shipping industries. Since the year 2004, after successful AAR (Association of American Railways) certification, the company has specialized in the production of&nbsp; castings for bogies of railway wagons and over the following five years supplied parts to the USA, Canada and Australia.&nbsp; In the year 2008 it obtained authorization for Ukranian and Russian railways.&nbsp; Our company has also responded to the situation with the global crisis and dealt with the difficult period it has been going through by reorganizing its owner relationships (single shareholder) and named a new board of directors (on 21.11.2011). The company has been successfully continuing with its production program.</p>
obsahru <p> halabaa.</p> <p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COMPANY HISTORY</p> <br /> <p> The company SCB Foundry a.s. is one of the largest manufacturing companies located in the South-Bohemian city of Czech Budejovice.&nbsp; Its size and distictive buildings, which foreshadow its production, comprise an unmistakable part of the industrial region of Czech Budejovice.</p> <p> The company was founded in the year 1964 as one of the works of ŠKODA Pilsen.&nbsp; It then commenced its production activities in the year 1965 with its first glass melting.&nbsp; Its foundry gradually became one of the largest producrers of steel castings in the former Czechoslovakia.&nbsp; After development resulting from its privitization in the 1990s, it eventually started to become an integral part of the company ČKD Kutná Hora a.s. in 2002.&nbsp; It later became an independent joint-stock company in the year 2007.&nbsp;</p> <p> Individual castings ranging from 50kg to 6,000kg of carbon and low-alloy steels, including steels with mechanical values at temperatures as low as minus 60 °C, as well as their roughing and finishing machining with quality verification by means of modern methods, have prevailed in the company's manufacturing program. These castings have been primarily designated for the railway, petroleum, automobile and shipping industries. Since the year 2004, after successful AAR (Association of American Railways) certification, the company has specialized in the production of&nbsp; castings for bogies of railway wagons and over the following five years supplied parts to the USA, Canada and Australia.&nbsp; In the year 2008 it obtained authorization for Ukranian and Russian railways.&nbsp; Our company has also responded to the situation with the global crisis and dealt with the difficult period it has been going through by reorganizing its owner relationships (single shareholder) and named a new board of directors (on 21.11.2011). The company has been successfully continuing with its production program.</p>

select 1#7

Zdroj
obsahcz=%3Cp%3E%0A%09SCB+Foundry+a.s.%3C%2Fp%3E%0A%3Cp%3E%0A%09%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B+COMPANY+HISTORY%3C%2Fp%3E%0A%3Cbr+%2F%3E%0A%3Cp%3E%0A%09The+company+SCB+Foundry+a.s.+is+one+of+the+largest+manufacturing+companies+located+in+the+South-Bohemian+city+of+Czech+Budejovice.%26nbsp%3B+Its+size+and+distictive+buildings%2C+which+foreshadow+its+production%2C+comprise+an+unmistakable+part+of+the+industrial+region+of+Czech+Budejovice.%3C%2Fp%3E%0A%3Cp%3E%0A%09The+company+was+founded+in+the+year+1964+as+one+of+the+works+of+%C5%A0KODA+Pilsen.%26nbsp%3B+It+then+commenced+its+production+activities+in+the+year+1965+with+its+first+glass+melting.%26nbsp%3B+Its+foundry+gradually+became+one+of+the+largest+producrers+of+steel+castings+in+the+former+Czechoslovakia.%26nbsp%3B+After+development+resulting+from+its+privitization+in+the+1990s%2C+it+eventually+started+to+become+an+integral+part+of+the+company+%C4%8CKD+Kutn%C3%A1+Hora+a.s.+in+2002.%26nbsp%3B+It+later+became+an+independent+joint-stock+company+in+the+year+2007.%26nbsp%3B%3C%2Fp%3E%0A%3Cp%3E%0A%09Individual+castings+ranging+from+50kg+to+6%2C000kg+of+carbon+and+low-alloy+steels%2C+including+steels+with+mechanical+values+at+temperatures+as+low+as+minus+60+%C2%B0C%2C+as+well+as+their+roughing+and+finishing+machining+with+quality+verification+by+means+of+modern+methods%2C+have+prevailed+in+the+company's+manufacturing+program.+These+castings+have+been+primarily+designated+for+the+railway%2C+petroleum%2C+automobile+and+shipping+industries.+Since+the+year+2004%2C+after+successful+AAR+(Association+of+American+Railways)+certification%2C+the+company+has+specialized+in+the+production+of%26nbsp%3B+castings+for+bogies+of+railway+wagons+and+over+the+following+five+years+supplied+parts+to+the+USA%2C+Canada+and+Australia.%26nbsp%3B+In+the+year+2008+it+obtained+authorization+for+Ukranian+and+Russian+railways.%26nbsp%3B+Our+company+has+also+responded+to+the+situation+with+the+global+crisis+and+dealt+with+the+difficult+period+it+has+been+going+through+by+reorganizing+its+owner+relationships+(single+shareholder)+and+named+a+new+board+of+directors+(on+21.11.2011).+The+company+has+been+successfully+continuing+with+its+production+program.%3C%2Fp%3E%0A&obsahru=%3Cp%3E%0A%09SCB+Foundry+a.s.%3C%2Fp%3E%0A%3Cp%3E%0A%09%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B
Peet
Profil
tak jsem se někde dočetl že je prý ajax omezen na 48 znaků.. to se mi zdá ale divný..
_es
Profil
Peet:
data: {obsah.val()},
Z akej krištáľovej gule máme zistiť, čo je asi tak v premennej(?) obsah?

ale pokud text který má třeba 200 znaků tak už se neuloží.
To ale môže byť aj chyba na strane serverového skriptu.

tak jsem se někde dočetl že je prý ajax omezen na 48 znaků
Kde?
Chamurappi
Profil
Reaguji na _es:
Z akej krištáľovej gule máme zistiť, čo je asi tak v premennej(?) obsah?
Myslím, že je to jedno, protože do chlupatých závorek patří dvojice klíč:hodnota — z {obsah.val()} kouká jen syntaktická chyba.


Reaguji na Peeta:
tak jsem se někde dočetl že je prý ajax omezen na 48 znaků
Kde někde? Je to nesmysl.
Peet
Profil
_es:
Ten obsah té promene je o článek víše odesílám tři promené obsacz,obsahru,obsahen
jak zjistím zda je chyba na serverovém skriptu.? vše se uložit dá ale jakmile je text dlouhý jako ve článku #7
tak ne

Chamurappi:
četl jsem to někde zde na diskusi ale nakonec se zjistilo že je to nesmysl.

už vůbec nevím co dělat.. prostě a jednoduše to nejde :D zkoušel jsem snad všechno..
_es
Profil
Peet:
obsah té promene je o článek víše odesílám tři promené obsacz,obsahru,obsahen
?
Keď budeš písať nezrozumiteľné dotazy, tak ti nikto zrozumiteľne neporadí. Nevieme, čo odosielaš, aj tak tam máš syntaktickú chybu, no tvrdíš, že to vraj niekedy funguje, ...
Peet
Profil
odesílám proměnou obsah

obsah:

<p> halabaa.</p> <p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COMPANY HISTORY</p> <br /> <p> The company SCB Foundry a.s. is one of the largest manufacturing companies located in the South-Bohemian city of Czech Budejovice.&nbsp; Its size and distictive buildings, which foreshadow its production, comprise an unmistakable part of the industrial region of Czech Budejovice.</p> <p> The company was founded in the year 1964 as one of the works of ŠKODA Pilsen.&nbsp; It then commenced its production activities in the year 1965 with its first glass melting.&nbsp; Its foundry gradually became one of the largest producrers of steel castings in the former Czechoslovakia.&nbsp; After development resulting from its privitization in the 1990s, it eventually started to become an integral part of the company ČKD Kutná Hora a.s. in 2002.&nbsp; It later became an independent joint-stock company in the year 2007.&nbsp;</p> <p> Individual castings ranging from 50kg to 6,000kg of carbon and low-alloy steels, including steels with mechanical values at temperatures as low as minus 60 °C, as well as their roughing and finishing machining with quality verification by means of modern methods, have prevailed in the company's manufacturing program. These castings have been primarily designated for the railway, petroleum, automobile and shipping industries. Since the year 2004, after successful AAR (Association of American Railways) certification, the company has specialized in the production of&nbsp; castings for bogies of railway wagons and over the following five years supplied parts to the USA, Canada and Australia.&nbsp; In the year 2008 it obtained authorization for Ukranian and Russian railways.&nbsp; Our company has also responded to the situation with the global crisis and dealt with the difficult period it has been going through by reorganizing its owner relationships (single shareholder) and named a new board of directors (on 21.11.2011). The company has been successfully continuing with its production program.</p>


tot byl obsah té proměné, ten to neodešle prostě ho nezapíše tam kam bych potřeboval,

ale pokud je kratší. třeba jen 50 znaků tak ho uloží bez problémů


není na to nějaké nastavení při volání toho ajaxu.?

jako se dá třeba nastavit cachovaní tak něco podobného.?
_es
Profil
Peet:
Je to s tebou márne.
Zamyslíš sa vôbec pred napísaním dotazu:
Či to je zrozumiteľné?
Či si dal dostatok údajov pre prípadných radcov?
Už si tu dal tých dotazov veľa, aby si vedel, čo je živá ukážka.
Tvoje dotazy sú veľmi podobné na Lopikův třicátý osmý problém s TinyMCE, tentokrát s pozadím a iné vlákna od toho istého člena a ak to nezlepšíš, tak budú asi reakcie podobné.
Peet
Profil
Omlouvám se.

Pouze jsem od Vás chtěl vedět jestli se u odesílání ajaxu dá nastavit nějaké toto omezení nebo jestli to není problém který řeší více lidí a tudíž je jasná odpověď. Chybu se již pokusím najít sám všem děkuji za snahu
_es
Profil
Peet:
Pokiaľ niečo niekam odosielaš, tak to nebude cez kód v [#3], lebo tam máš syntaktickú chybu ([#10] Chamurappi) a teda ten kód nebude vôbec spustený. A asi ti ťažko môže niekto opraviť chybu v preňho nejakom neznámom odoslaní dát.
Peet
Profil
jaká syntatická chyba.?

jde o to že používám CKEDITOR vytáhnu z něho data ale teď jsem přišel na to že pokud napíšu sám miliony řádků tak se přidají v pořádku ale například tento článek se nepřidá který je zkopírovaný z wordu tot je zobrazený zdroj v ckeditoru.

tento článek se NEODEŠLE !


<p>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nadpis</p>
<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COMPANY HISTORY</p>
<br />
<p>
The company SCB Foundry a.s. is one of the largest manufacturing companies located in the South-Bohemian city of Czech Budejovice.&nbsp; Its size and distictive buildings, which foreshadow its production, comprise an unmistakable part of the industrial region of Czech Budejovice.</p>
<p>
The company was founded in the year 1964 as one of the works of ŠKODA Pilsen.&nbsp; It then commenced its production activities in the year 1965 with its first glass melting.&nbsp; Its foundry gradually became one of the largest producrers of steel castings in the former Czechoslovakia.&nbsp; After development resulting from its privitization in the 1990s, it eventually started to become an integral part of the company ČKD Kutná Hora a.s. in 2002.&nbsp; It later became an independent joint-stock company in the year 2007.&nbsp;</p>
<p>
Individual castings ranging from 50kg to 6,000kg of carbon and low-alloy steels, including steels with mechanical values at temperatures as low as minus 60 °C, as well as their roughing and finishing machining with quality verification by means of modern methods, have prevailed in the company's manufacturing program. These castings have been primarily designated for the railway, petroleum, automobile and shipping industries. Since the year 2004, after successful AAR (Association of American Railways) certification, the company has specialized in the production of&nbsp; castings for bogies of railway wagons and over the following five years supplied parts to the USA, Canada and Australia.&nbsp; In the year 2008 it obtained authorization for Ukranian and Russian railways.&nbsp; Our company has also responded to the situation with the global crisis and dealt with the difficult period it has been going through by reorganizing its owner relationships (single shareholder) and named a new board of directors (on 21.11.2011). The company has been successfully continuing with its production program.&nbsp;</p>

nevím jestli tomu nevadí nějaké vložené znaky který vložil ckeditor ale pokud vložím třeba jiný tak ten jde v pohodě
_es
Profil
Peet:
jaká syntatická chyba.?
data: {obsah.val()},

jde o to že používám CKEDITOR
Hurá! Konečne niečo k veci. A kód v [#3] je úplne od veci. Takže používaj metódy, ktoré tento editor na prácu s ním poskytuje, ktoré sa dozvieš v jeho oficiálnej dokumentácii. Lebo dopadneš s CKEditorom ako lopik007 s TinyMCE.
Peet
Profil
jo ano to je syntatická chyba.

nojo jenže to budu muset překopat zase celý js..

a naučit se ckeditor api.. takže nevíte proč to nelze udělat tímto způsobem.?
_es
Profil
Peet:
nevíte proč to nelze udělat tímto způsobem.?
Nevieme ani, ako to posielaš, aký spôsob to vlastne je, možno nejako prerušíš normálne odoslanie cez ten editor, čo by možno vysvetlilo príznaky.

a naučit se ckeditor api..
To je veľmi dobrý nápad.
Peet
Profil
co je myšleno pod '

_es:
možno nejako prerušíš normálne odoslanie cez ten editor
_es
Profil
Peet:
co je myšleno pod
„možno nejako prerušíš normálne odoslanie cez ten editor“
Že sa to snaží chudák editor poslať, no ty mu to nejakými záškodníckymi kódmi, ako napríklad v [#3], prekazíš. No možno to je len zlý tip. V každom prípade bude najlepšie, ak to necháš odoslať normálne.
Peet
Profil
asi máš pravdu.. ale je to divné mě přijde že se spíš zasekne někde před uložením do db protože po vložení do db vracím status=200 a jen tehdy mi zahlásí přidáno.. a on spustí tu hlášku přidáno ale do db se neuloží

// JS
$("button#okey").click(function(){
var select=$("select#li_id");
var obsahcz=CKEDITOR.instances['obsahcz'].getData();
var obsahru=CKEDITOR.instances['obsahru'].getData();
var obsahen=CKEDITOR.instances['obsahen'].getData(); 

  if(obsahcz!="" && obsahru!="" && obsahen!=""){
    $.ajax({
      url: "inc/postObsah.php",
      type: "POST",
      dataType: "JSON",
      data: {obsahcz: obsahcz,obsahru: obsahru,obsahen: obsahen, select: select.val()},
      error: function(){alert("Error")},
      success: function(output){
        if(output.status==200){
          alert(output.hlaska);
          window.location.reload();
        }
      }
    });
  }
});

// PHP
$obsahcz=(isset($_POST['obsahcz'])) ? $_POST['obsahcz']:NULL;
$obsahen=(isset($_POST['obsahen'])) ? $_POST['obsahen']:NULL;
$obsahru=(isset($_POST['obsahru'])) ? $_POST['obsahru']:NULL;

$rubric_id=17;

$lng=(isset($_SESSION['lng'])) ? $_SESSION['lng']:"en";

if($obsahcz!="" && $obsahru!="" && $obsahen!=""){
  $result=mysql_query("INSERT INTO subobsahy(cz,ru,en,rubric_id) VALUES('$obsahcz','$obsahru','$obsahen','$rubric_id')");
  $json['status']=200;
  $json['hlaska']="Přidáno";
}
else $json['status']=400;

echo json_encode($json);
_es
Profil
Peet:
window.location.reload() spôsobí ukončenie a znovunačítanie celej stránky, teda budú ihneď ukončené a zrušené aj všetky JS skripty.
Peet
Profil
i bez něho, nefunguje :(


a dokonce ikdyž odešlu formulář normálně bez pomocí ajaxu tak to nefunguje


Takže nakonec jsem zjistil že je to asi pouze tím jedním dokumentem který je nejspíše poškozený když ho kopíruji z wordu protože všechno ostatní jde v pořádku.

Buďto je to tím že je to anglicky a třeba jsou tam nějaká klíčová slova která dělají neplechu a nebo je to prostě špatný dokument protože když jsem to zkopíroval do wordu tak se to uplně rozházelo.. takže díky moc měj se ;-)

Vaše odpověď

Mohlo by se hodit

Neumíte-li správně určit příčinu chyby, vkládejte odkazy na živé ukázky.
Užíváte-li nějakou cizí knihovnu, ukažte odpovídajícím, kde jste ji vzali.

Užitečné odkazy:

Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm: