Login   Register  
PHP Classes
elePHPant
Icontem

File: js/setProdukt.js

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Vaclav Mares  >  ontoProdukt  >  js/setProdukt.js  >  Download  
File: js/setProdukt.js
Role: Auxiliary data
Content type: text/plain
Description: setProdukt.js
Class: ontoProdukt
Generate product feeds in XML formats
Author: By
Last change:
Date: 2010-12-29 15:49
Size: 16,280 bytes
 

Contents

Class file image Download
// JavaScript Document
function AddProduktXML() {
  var ni = document.getElementById('myDiv');
  var numi = document.getElementById('theValue');
  var num = (document.getElementById("theValue").value -1)+ 2;
  numi.value = num;
  var divIdName = ""+num+"";
  var newdiv = document.createElement('div');
  newdiv.setAttribute("id",divIdName);
  newdiv.innerHTML = "<fieldset><legend accesskey=\"p\">Produkt "+divIdName+"</legend><br>Kategorie:<br><select name=\"category"+divIdName+"\"  style=\"width:150px;\" class=\"required category\" onChange=\"redirecting(this.options.selectedIndex,'subcategory"+divIdName+"')\">  <option value=\"ERROR\" selected=\"selected\">------- vyberte --------</option><option value=\"Animals\" >Zvířata</option><option value=\"Arts &#38; Entertainment\" >Umění a zábava</option><option value=\"Baby &#38; Toddler\" >Děti a batolata</option> <option value=\"Business &#38; Industrial\" >Ochod a průmysl</option><option value=\"Cameras &#38; Optics\" >Fotoaparáty a optika</option><option value=\"Clothing &#38; Accessories\">Oblečení a doplňky</option><option value=\"Electronics\" >Elektronika</option><option value=\"Food &#38; Beverages\" >Jídlo a nápoje</option><option value=\"Furniture\" >Nábytek</option><option value=\"Hardware\" >Průmysl</option><option value=\"Health &#38; Beauty\" >Zdraví a krása</option><option value=\"Home &#38; Garden\" >Dům a zahrada</option><option value=\"Luggage\" >Zavazadla</option><option value=\"Media\" >Media</option><option value=\"Office Supplies\" >Kancelářské potřeby</option><option value=\"Software\" >Software</option> <option value=\"Sporting Goods\" >Sportovní potřeby</option><option value=\"Toys &#38; Games\" >Hračky a hry</option><option value=\"Vehicles &#38; Parts\" >Vozidla a příslušenství</option></select><select name=\"subcategory"+divIdName+"\"  style=\"width:150px;\" onchange=\"go()\" title=\"Prosím vyberte subkategorii!\" validate=\"required:true\"><option value=\"\">&nbsp;&nbsp;&nbsp;&nbsp;</option></select><br><br><table><tr><td>Hlavní název produktu: * &nbsp;</td><td><input type=\"text\" name=\"name"+divIdName+"\" value=\"\" class=\"required\" minlength=\"3\"></td></tr><tr><td>Název produktu včetně značky: </td><td><input type='text' value='' name='productname"+divIdName+"'/></td></tr><tr><td>Název produktu s přívlastky <br> a parametry: </td><td><input type='text' value='' name='productnameext"+divIdName+"'/></td></tr><tr><td>Cena: * &nbsp;</td><td><input type=\"text\" name=\"price"+divIdName+"\" value=\"\"  size=\"2\" class=\"required price\"></td></tr><tr><td>Sazba DPH: * </td><td><input type='text' value='' name='vat"+divIdName+"'/></td></tr><tr><td>Cena v Kč s DPH: </td><td><input type='text' value='' name='tax_rate"+divIdName+"'/></td></tr><tr><td>Poplatky: </td><td><input type='text' value='' name='dues"+divIdName+"'/></td></tr><tr><td>Dodací lhůta: </td><td><input type='text' value='' name='delivery_date"+divIdName+"'/></td></tr><tr><td>Identifikátor kamenných <br> poboček: </td><td><input type='text' value='' name='shop_depots"+divIdName+"'/></td></tr><tr><td>Firmy.cz: </td><td><input type='text' value='' name='firmy_cz"+divIdName+"'/></td></tr><tr><td>Výrobce: </td><td><input type='text' value='' name='manufacturer"+divIdName+"'/></td></tr><tr><td>Kód výrobku EAN13: </td><td><input type='text' value='' name='ean"+divIdName+"'/></td></tr><tr><td>Varianty produktů: </td><td><input type='text' value='' name='variant"+divIdName+"'/></td></tr><tr><td>Číslo výrobku:</td><td><input type='text' value='' name='code"+divIdName+"'/></td></tr><tr><td>URL prooduktu: *&nbsp;</td><td><input type=\"text\" name=\"product_url"+divIdName+"\" value=\"http://\" class=\"required url\"></td></tr><tr><td colspan=\"2\"></td></tr><tr><td>URL obrázku prooduktu:</td><td><input type=\"text\" value=\"\" name=\"image_url"+divIdName+"\" class=\"url\"/></td></tr><tr><td>Stav zboží: * </td><td><select name=\"quality"+divIdName+"\" style=\"width:100px;\"> <option value=\"New\" selected> Nové</option>  <option value=\"Used\" > Použité</option></select></td></tr><tr><td>Přednostní výpis: </td><td><input type=\"text\" value=\"\"  name=\"tollfree"+divIdName+"\" size=\"2\"/></td></tr><tr><td colspan=\"2\">Popis výrobku: *<br><textarea rows=\"10\" cols=\"40\" name=\"productDescription"+divIdName+"\" class=\"required\" minlength2=\"20\" maxlength=\"512\" ></textarea></td></tr></tbody></table> </fieldset><div align=\"right\"><a href=\"javascript:;\" onclick=\"RemoveProdukt(\'"+divIdName+"\')\">odstranit</a></div>";
  ni.appendChild(newdiv);
}

function AddProduktHeureka_XML() {
  var ni = document.getElementById('myDiv');
  var numi = document.getElementById('theValue');
  var num = (document.getElementById("theValue").value -1)+ 2;
  numi.value = num;
  var divIdName = ""+num+"";
  var newdiv = document.createElement('div');
  newdiv.setAttribute("id",divIdName);
  newdiv.innerHTML = "<fieldset><legend accesskey=\"p\">Produkt "+divIdName+"</legend><br>Kategorie:<br><select name=\"category"+divIdName+"\"  style=\"width:150px;\" class=\"required category\" onChange=\"redirecting(this.options.selectedIndex,'subcategory"+divIdName+"')\">  <option value=\"ERROR\" selected=\"selected\">------- vyberte --------</option><option value=\"Animals\" >Zvířata</option><option value=\"Arts &#38; Entertainment\" >Umění a zábava</option><option value=\"Baby &#38; Toddler\" >Děti a batolata</option> <option value=\"Business &#38; Industrial\" >Ochod a průmysl</option><option value=\"Cameras &#38; Optics\" >Fotoaparáty a optika</option><option value=\"Clothing &#38; Accessories\">Oblečení a doplňky</option><option value=\"Electronics\" >Elektronika</option><option value=\"Food &#38; Beverages\" >Jídlo a nápoje</option><option value=\"Furniture\" >Nábytek</option><option value=\"Hardware\" >Průmysl</option><option value=\"Health &#38; Beauty\" >Zdraví a krása</option><option value=\"Home &#38; Garden\" >Dům a zahrada</option><option value=\"Luggage\" >Zavazadla</option><option value=\"Media\" >Media</option><option value=\"Office Supplies\" >Kancelářské potřeby</option><option value=\"Software\" >Software</option> <option value=\"Sporting Goods\" >Sportovní potřeby</option><option value=\"Toys &#38; Games\" >Hračky a hry</option><option value=\"Vehicles &#38; Parts\" >Vozidla a příslušenství</option></select><select name=\"subcategory"+divIdName+"\"  style=\"width:150px;\" onchange=\"go()\" title=\"Prosím vyberte subkategorii!\" validate=\"required:true\"><option value=\"\">&nbsp;&nbsp;&nbsp;&nbsp;</option></select><br><br><table><tr><td>Hlavní název produktu: * &nbsp;</td><td><input type=\"text\" name=\"name"+divIdName+"\" value=\"\" class=\"required\" minlength=\"3\"></td></tr><tr><td>Cena: * &nbsp;</td><td><input type=\"text\" name=\"price"+divIdName+"\" value=\"\"  size=\"2\" class=\"required price\"></td></tr><tr><td>Sazba DPH: * </td><td><input type='text' value='' name='vat"+divIdName+"'/></td></tr><tr><td>Cena v Kč s DPH: </td><td><input type='text' value='' name='tax_rate"+divIdName+"'/></td></tr><tr><td>Poplatky: </td><td><input type='text' value='' name='dues"+divIdName+"'/></td></tr><tr><td>Dodací lhůta: </td><td><input type='text' value='' name='delivery_date"+divIdName+"'/></td></tr><tr><td>Výrobce: </td><td><input type='text' value='' name='manufacturer"+divIdName+"'/></td></tr><tr><td>Kód výrobku EAN13: </td><td><input type='text' value='' name='ean"+divIdName+"'/></td></tr><tr><td>Varianta produktu: </td><td><input type='text' value='' name='variant"+divIdName+"'/></td></tr><tr><td>Parametr varianty: </td><td><input type='text' value='' size='2' name='val"+divIdName+"'/></td></tr><tr><td>Číslo výrobku:</td><td><input type='text' value='' name='code"+divIdName+"'/></td></tr><tr><td>URL prooduktu: *&nbsp;</td><td><input type=\"text\" name=\"product_url"+divIdName+"\" value=\"http://\" class=\"required url\"></td></tr><tr><td colspan=\"2\"></td></tr><tr><td>URL obrázku prooduktu: *</td><td><input type=\"text\" value=\"http://\" name=\"image_url"+divIdName+"\" class=\"required url\"/></td></tr><tr><td>Stav zboží: * </td><td><select name=\"quality"+divIdName+"\" style=\"width:100px;\"> <option value=\"New\" selected> Nové</option>  <option value=\"Used\" > Použité</option></select></td></tr><tr><td>Isbn, mpn: </td><td><input type='text' value='' name='code"+divIdName+"'/></td></tr><tr><td colspan=\"2\">Popis výrobku: *<br><textarea rows=\"10\" cols=\"40\" name=\"productDescription"+divIdName+"\" class=\"required\" minlength2=\"20\" maxlength=\"512\" ></textarea></td></tr></tbody></table> </fieldset><div align=\"right\"><a href=\"javascript:;\" onclick=\"RemoveProdukt(\'"+divIdName+"\')\">odstranit</a></div>";
  ni.appendChild(newdiv);
}

function AddProduktRSS2() {
  var ni = document.getElementById('myDiv');
  var numi = document.getElementById('theValue');
  var num = (document.getElementById("theValue").value -1)+ 2;
  numi.value = num;
  var divIdName = ""+num+"";
  var newdiv = document.createElement('div');
  newdiv.setAttribute("id",divIdName);
  newdiv.innerHTML = "<fieldset><legend accesskey=\"p\">Produkt "+divIdName+"</legend><br>Kategorie:<br><select name=\"category"+divIdName+"\"  style=\"width:150px;\" class=\"required category\" onChange=\"redirecting(this.options.selectedIndex,'subcategory"+divIdName+"')\"> <option value=\"ERROR\" selected=\"selected\">------- vyberte --------</option><option value=\"Animals\" >Zvířata</option><option value=\"Arts &#38; Entertainment\" >Umění a zábava</option><option value=\"Baby &#38; Toddler\" >Děti a batolata</option> <option value=\"Business &#38; Industrial\" >Ochod a průmysl</option><option value=\"Cameras &#38; Optics\" >Fotoaparáty a optika</option><option value=\"Clothing &#38; Accessories\">Oblečení a doplňky</option><option value=\"Electronics\" >Elektronika</option><option value=\"Food &#38; Beverages\" >Jídlo a nápoje</option><option value=\"Furniture\" >Nábytek</option><option value=\"Hardware\" >Průmysl</option><option value=\"Health &#38; Beauty\" >Zdraví a krása</option><option value=\"Home &#38; Garden\" >Dům a zahrada</option><option value=\"Luggage\" >Zavazadla</option><option value=\"Media\" >Media</option><option value=\"Office Supplies\" >Kancelářské potřeby</option><option value=\"Software\" >Software</option> <option value=\"Sporting Goods\" >Sportovní potřeby</option><option value=\"Toys &#38; Games\" >Hračky a hry</option><option value=\"Vehicles &#38; Parts\" >Vozidla a příslušenství</option></select><select name=\"subcategory"+divIdName+"\"  style=\"width:150px;\" onchange=\"go()\" title=\"Prosím vyberte subkategorii!\" validate=\"required:true\"><option value=\"\">&nbsp;&nbsp;&nbsp;&nbsp;</option></select><br><br><table><tr><td>Hlavní název produktu: *&nbsp;</td><td><input type=\"text\" name=\"name"+divIdName+"\" value=\"\" class=\"required\" minlength=\"3\"></td></tr><tr><td>Cena: * &nbsp;</td><td><input type=\"text\" name=\"price"+divIdName+"\" value=\"\"  size=\"2\" class=\"required price\"></td></tr><tr><td>Výrobce: </td><td><input type='text' value='' name='manufacturer"+divIdName+"'/></td></tr></td></tr><tr><td>Číslo výrobku: </td><td><input type='text' value='' name='upc"+divIdName+"'/></td></tr><tr><td>Hmotnost: </td><td><input type='text' value='' name='Weight"+divIdName+"'/></td></tr></td></tr></td></tr><tr><td>Isbn, mpn: </td><td><input type='text' value='' name='code"+divIdName+"'/></td></tr><tr><td>URL prooduktu: &nbsp;</td><td><input type=\"text\" name=\"product_url"+divIdName+"\" value=\"\" class=\"url\"></td></tr><tr><td colspan=\"2\"></td></tr><tr><td>URL obrázku prooduktu: * </td><td><input type=\"text\" value=\"http://\" name=\"image_url"+divIdName+"\" class=\"required url\"/></td></tr><tr><td>Množství: </td><td><input type=\"text\" name=\"quantity"+divIdName+"\"  size=\"2\"></td><tr><td>Stav zboží: * </td><td><select name=\"quality"+divIdName+"\" style=\"width:100px;\"> <option value=\"New\" selected> Nové</option>  <option value=\"Used\" > Použité</option><option value=\"Refurbished\" > Renovované</option></select></td></tr><tr><td colspan=\"2\">Popis výrobku: *<br><textarea rows=\"10\" cols=\"40\" name=\"productDescription"+divIdName+"\" class=\"required\" minlength2=\"20\" maxlength=\"512\" ></textarea></td></tr></tbody></table> </fieldset><div align=\"right\"><a href=\"javascript:;\" onclick=\"RemoveProdukt(\'"+divIdName+"\')\">odstranit</a></div>";
  ni.appendChild(newdiv);
}

function AddProduktRDF_OP() {
  var ni = document.getElementById('myDiv');
  var numi = document.getElementById('theValue');
  var num = (document.getElementById("theValue").value -1)+ 2;
  numi.value = num;
  var divIdName = ""+num+"";
  var newdiv = document.createElement('div');
  newdiv.setAttribute("id",divIdName);
  newdiv.innerHTML = "<fieldset><legend accesskey=\"p\">Produkt "+divIdName+"</legend><br>Kategorie:<br><select name=\"category"+divIdName+"\"  style=\"width:150px;\" class=\"required category\" onChange=\"redirecting(this.options.selectedIndex,'subcategory"+divIdName+"')\"><option value=\"ERROR\" selected=\"selected\">------- vyberte --------</option><option value=\"Animals\" >Zvířata</option><option value=\"Arts &#38; Entertainment\" >Umění a zábava</option><option value=\"Baby &#38; Toddler\" >Děti a batolata</option> <option value=\"Business &#38; Industrial\" >Ochod a průmysl</option><option value=\"Cameras &#38; Optics\" >Fotoaparáty a optika</option><option value=\"Clothing &#38; Accessories\">Oblečení a doplňky</option><option value=\"Electronics\" >Elektronika</option><option value=\"Food &#38; Beverages\" >Jídlo a nápoje</option><option value=\"Furniture\" >Nábytek</option><option value=\"Hardware\" >Průmysl</option><option value=\"Health &#38; Beauty\" >Zdraví a krása</option><option value=\"Home &#38; Garden\" >Dům a zahrada</option><option value=\"Luggage\" >Zavazadla</option><option value=\"Media\" >Media</option><option value=\"Office Supplies\" >Kancelářské potřeby</option><option value=\"Software\" >Software</option> <option value=\"Sporting Goods\" >Sportovní potřeby</option><option value=\"Toys &#38; Games\" >Hračky a hry</option><option value=\"Vehicles &#38; Parts\" >Vozidla a příslušenství</option></select><select name=\"subcategory"+divIdName+"\"  style=\"width:150px;\" onchange=\"go()\" title=\"Prosím vyberte subkategorii!\" validate=\"required:true\"><option value=\"\">&nbsp;&nbsp;&nbsp;&nbsp;</option></select><br><br><table><tr><td>Název: * &nbsp;</td><td><input type=\"text\" name=\"name"+divIdName+"\" value=\"\" class=\"required\" minlength=\"3\"></td></tr><tr><td>Cena[Kč]: * &nbsp;</td><td><input type=\"text\" name=\"price"+divIdName+"\" value=\"\"  size=\"2\" class=\"required price\"></td></tr><tr><td>Kód výrobku: </td><td><input type='text' value='' name='code"+divIdName+"'/></td></tr><tr><td>URL produktu: *&nbsp;</td><td><input type=\"text\" name=\"product_url"+divIdName+"\" value=\"http://\" class=\"required url\"></td></tr><tr><td colspan=\"2\"></td></tr><tr><td>URL obrázku produktu: </td><td><input type=\"text\" value=\"\" name=\"image_url"+divIdName+"\" class=\"url\"/></td></tr><tr><td>Množství: </td><td><input type=\"text\" name=\"quantity"+divIdName+"\" size=\"2\"></td><tr><td>Stav: * </td><td><select name=\"quality"+divIdName+"\" style=\"width:100px;\"> <option value=\"New\" selected> Nové</option>  <option value=\"Used\" > Použité</option><option value=\"Refurbished\" > Renovované</option></select></td></tr><tr><td colspan=\"2\">Popis nabízeného zboží: *<br><textarea rows=\"10\" cols=\"40\" name=\"productDescription"+divIdName+"\" class=\"required\" minlength2=\"20\" maxlength=\"512\" ></textarea></td></tr></tbody></table> </fieldset><div align=\"right\"><a href=\"javascript:;\" onclick=\"RemoveProdukt(\'"+divIdName+"\')\">odstranit</a></div>";
  ni.appendChild(newdiv);
}
                                        
function RemoveProdukt(divNum) {
  var d = document.getElementById('myDiv');
  var olddiv = document.getElementById(divNum);
  d.removeChild(olddiv);
}