Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

134
Views
Ajax Jquery .get dynamical generating Content from .CSV

I've generated content from a .csv file and everything works fine in Chrome. But as soon as I'm using IE nothing happens. I'm using $.get('file.csv', function(data_unformed) { ... } to get the content from the .csv file.

/* Create Price Tag */
var steuersatz_string = thisRow.split(";")[12, 13]; /* Find Steuersatz in Table */
var preis_netto_string_unformed = thisRow.split(";")[15, 16]; /* Find Price in Table */ 
var preis_netto_string = preis_netto_string_unformed.replace(/\,/g, '.');  /* Replace all "," to "." */

var steuersatz = parseFloat(steuersatz_string); /* String to Float */
var preis_netto = parseFloat(preis_netto_string); /* String to Float */

var preis_brutto_ungerunden = preis_netto*(steuersatz/100+1); 
var preis_brutto = (Math.round(preis_brutto_ungerunden * 100)/100).toFixed(2); 	
var preis_big = preis_brutto.split('.')[0]; 	
var preis_small = preis_brutto.split('.').slice(1).join('.');	

var aktion_on = thisRow.split("#")[3]; /* Display if On */

if (aktion_on==1) { 
if (Object.keys(preis_small).length < 1) /* Create 2xZero if integer */
{build += '<div class="angebot_preisbox aktionspreis_on"><span class="angebot_preis"><span class="preis_big">' + preis_big + '.' + '</span><span class="preis_small">' + '00' + '</span></span></div>\n';}

Error: Object.keys: argument is not an Object

Does anyone have a solution? Thanks

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Solution: formed (Object.keys(preis_small).length < 1) to ((preis_small).length < 1) and encoded my .csv file to UTF-8 via Notepad.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!