Jump to content

[Auction House]Adding commas at the prices


  • Please log in to reply
23 replies to this topic

Poll: What Do You think? (20 member(s) have cast votes)

What Do You think?

  1. No (7 votes [25.00%])

    Percentage of vote: 25.00%

  2. Yes (21 votes [75.00%])

    Percentage of vote: 75.00%

Vote Guests cannot vote

#1 fs_williamk92

fs_williamk92
  • Guests

Posted 28 June 2008 - 16:56

Say I am looking for a decay rune and I find one with the price 20000000golds
Then I'll have to waste time counting the zeros and I hate that :?


HCS can add commas after every third digit so 20000000golds becomes 20,000,000golds and I will know it's 20M immediately
That will be much more convenient

#2 fs_sleepsalot

fs_sleepsalot
  • Guests

Posted 28 June 2008 - 17:47

Well the commas will mess up the data base but Yes this would make it easier to figure out

#3 fs_jimmyjoe

fs_jimmyjoe
  • Guests

Posted 28 June 2008 - 18:09

its an ok suggestion... but make it optional.. and also add some other common separators like '.' or ' '...

#4 Dark Archon

Dark Archon

    Veteran

  • Members
  • PipPipPip
  • 2,346 posts

Posted 28 June 2008 - 18:14

Let me make this an easier suggestion...

<form method="post" action="index.php">

>>

<form method="post" action="index.php" onSubmit="return validateMyForm();">

And add the following bit of JavaScript code...

function validateMyForm() {
  var minBid = document.forms[0].minbid.value;
  var maxBid = document.forms[0].buynow.value;
  var tokens = null;
  if (minBid.indexOf(",") > 0) {
    tokens = minBid.split(",");
    minBid = "";
    for (var i = 0; i < tokens.length; i++) {
      minBid = "" + minBid + "" + tokens[i] + "";
    }
    if (minBid == "" + parseInt(minBid) + "") {
      document.forms[0].minbid.value = parseInt(minBid);
    }
    else {
      alert("ERROR: Invalid minimum bid price!\nPlease check your minimum bid value and resubmit the form.");
      return false;
    }
  }
  else {
    if (minBid == "" + parseInt(minBid) + "") {
      document.forms[0].minbid.value  = parseInt(minBid);
    }
    else {
      alert("ERROR: Invalid minimum bid price!\nPlease check your minimum bid value and resubmit the form.");
      return false;
    }
  }
  if (maxBid != "") {
    tokens = null;
    if (maxBid.indexOf(",") > 0) {
      tokens = maxBid.split(",");
      maxBid = "";
      for (var i = 0; i < tokens.length; i++) {
        maxBid = "" + maxBid + "" + tokens[i] + "";
      }
      if maxBid == "" + parseInt(maxBid) + "") {
        document.forms[0].buynow.value = parseInt(maxBid);
      }
      else {
        alert("ERROR: Invalid buy now price!\nPlease check your buy now value and resubmit the form.");
        return false;
      }
    }
    else {
      if (maxBid == "" + parseInt(maxBid) + "") {
        document.forms[0].buynow.value  = parseInt(maxBid);
      }
      else {
        alert("ERROR: Invalid buy now price!\nPlease check your buy now value and resubmit the form.");
        return false;
      }
    }
    minBid = parseInt(minBid);
    maxBid = parseInt(maxBid);
    if (minBid > maxBid) {
      alert("Your buy now price cannot be less then your minimum bid price, please check your values and try again.");
      return false;
    }
  }
  return true;
}

Now it should be as simple as copy paste... I tested this script with actual string values for the min bid and max bid with alerts on success instead of appending the value to the form element...

#5 Dark Archon

Dark Archon

    Veteran

  • Members
  • PipPipPip
  • 2,346 posts

Posted 28 June 2008 - 18:41

Also, this can be done for MP listings, Sending gold to other players, Secure trades... and about anything else where you may end up typing a value that is greater then or equal to 1,000...

#6 fs_vampirarmy

fs_vampirarmy
  • Guests

Posted 28 June 2008 - 23:19

I've been sort of meaning to post this suggestion. To me, just putting imaginary commas hurts my head.

#7 Dark Archon

Dark Archon

    Veteran

  • Members
  • PipPipPip
  • 2,346 posts

Posted 29 June 2008 - 00:32

its an ok suggestion... but make it optional.. and also add some other common separators like '.' or ' '...


The difference between that and what I posted in code, while you were posting your reply is so minor, I can just edit my last post in a quote with the change...

Let me make this an easier suggestion...

<form method="post" action="index.php">

>>

<form method="post" action="index.php" onSubmit="return validateMyForm();">

And add the following bit of JavaScript code...

function validateMyForm() {
  var minBid = document.forms[0].minbid.value;
  var maxBid = document.forms[0].buynow.value;
  var tokens = null;
  var tokenizer = new Array();
  tokenizer[0] = ",";
  tokenizer[1] = ".";
  tokenizer[2] = " ";
  var userTokenPref = getUserTokenizer(); // returns a val of 0, 1, or 2...
  var strKey = tokenizer[userTokenPref];
  if (minBid.indexOf(strKey) > 0) {
    tokens = minBid.split(strKey);
    minBid = "";
    for (var i = 0; i < tokens.length; i++) {
      minBid = "" + minBid + "" + tokens[i] + "";
    }
    if (minBid == "" + parseInt(minBid) + "") {
      document.forms[0].minbid.value = parseInt(minBid);
    }
    else {
      alert("ERROR: Invalid minimum bid price!\nPlease check your minimum bid value and resubmit the form.");
      return false;
    }
  }
  else {
    if (minBid == "" + parseInt(minBid) + "") {
      document.forms[0].minbid.value  = parseInt(minBid);
    }
    else {
      alert("ERROR: Invalid minimum bid price!\nPlease check your minimum bid value and resubmit the form.");
      return false;
    }
  }
  if (maxBid != "") {
    tokens = null;
    if (maxBid.indexOf(strKey) > 0) {
      tokens = maxBid.split(strKey);
      maxBid = "";
      for (var i = 0; i < tokens.length; i++) {
        maxBid = "" + maxBid + "" + tokens[i] + "";
      }
      if maxBid == "" + parseInt(maxBid) + "") {
        document.forms[0].buynow.value = parseInt(maxBid);
      }
      else {
        alert("ERROR: Invalid buy now price!\nPlease check your buy now value and resubmit the form.");
        return false;
      }
    }
    else {
      if (maxBid == "" + parseInt(maxBid) + "") {
        document.forms[0].buynow.value  = parseInt(maxBid);
      }
      else {
        alert("ERROR: Invalid buy now price!\nPlease check your buy now value and resubmit the form.");
        return false;
      }
    }
    minBid = parseInt(minBid);
    maxBid = parseInt(maxBid);
    if (minBid > maxBid) {
      alert("Your buy now price cannot be less then your minimum bid price, please check your values and try again.");
      return false;
    }
  }
  return true;
}

Now it should be as simple as copy paste... I tested this script with actual string values for the min bid and max bid with alerts on success instead of appending the value to the form element...


Code edited to allow for the preference idea that JJ wanted...

#8 Dumdude

Dumdude

    Member

  • Members
  • PipPip
  • 285 posts

Posted 29 June 2008 - 00:53

Let me make this an easier suggestion...

<form method="post" action="index.php">

>>

<form method="post" action="index.php" onSubmit="return validateMyForm();">

And add the following bit of JavaScript code...

function validateMyForm() {
  var minBid = document.forms[0].minbid.value;
  var maxBid = document.forms[0].buynow.value;
  var tokens = null;
  if (minBid.indexOf(",") > 0) {
    tokens = minBid.split(",");
    minBid = "";
    for (var i = 0; i < tokens.length; i++) {
      minBid = "" + minBid + "" + tokens[i] + "";
    }
    if (minBid == "" + parseInt(minBid) + "") {
      document.forms[0].minbid.value = parseInt(minBid);
    }
    else {
      alert("ERROR: Invalid minimum bid price!\nPlease check your minimum bid value and resubmit the form.");
      return false;
    }
  }
  else {
    if (minBid == "" + parseInt(minBid) + "") {
      document.forms[0].minbid.value  = parseInt(minBid);
    }
    else {
      alert("ERROR: Invalid minimum bid price!\nPlease check your minimum bid value and resubmit the form.");
      return false;
    }
  }
  if (maxBid != "") {
    tokens = null;
    if (maxBid.indexOf(",") > 0) {
      tokens = maxBid.split(",");
      maxBid = "";
      for (var i = 0; i < tokens.length; i++) {
        maxBid = "" + maxBid + "" + tokens[i] + "";
      }
      if maxBid == "" + parseInt(maxBid) + "") {
        document.forms[0].buynow.value = parseInt(maxBid);
      }
      else {
        alert("ERROR: Invalid buy now price!\nPlease check your buy now value and resubmit the form.");
        return false;
      }
    }
    else {
      if (maxBid == "" + parseInt(maxBid) + "") {
        document.forms[0].buynow.value  = parseInt(maxBid);
      }
      else {
        alert("ERROR: Invalid buy now price!\nPlease check your buy now value and resubmit the form.");
        return false;
      }
    }
    minBid = parseInt(minBid);
    maxBid = parseInt(maxBid);
    if (minBid > maxBid) {
      alert("Your buy now price cannot be less then your minimum bid price, please check your values and try again.");
      return false;
    }
  }
  return true;
}

Now it should be as simple as copy paste... I tested this script with actual string values for the min bid and max bid with alerts on success instead of appending the value to the form element...



OMG Dark your a genius. Can i please buy your brain for 1 gold ?..




LOL





This is a very good suggestion

#9 fs_bladeboss

fs_bladeboss
  • Guests

Posted 29 June 2008 - 18:31

This could be very useful. :)

#10 DarthViper

DarthViper

    Veteran

  • Members
  • PipPipPip
  • 2,425 posts

Posted 29 June 2008 - 18:39

Would help you decide if its the price you want faster.

Did you know that there are likely over 2000 rouge black holes in our galaxy alone. Each of them can reach very high speeds, even in space terms, are each capable of destroying anything in their path, and are invisible. Well, goodnight!


#11 Dumdude

Dumdude

    Member

  • Members
  • PipPip
  • 285 posts

Posted 29 June 2008 - 21:14


OMG Dark your a genius. Can i please buy your brain for 1 gold ?..




LOL





This is a very good suggestion


DA, you did something wonderful. Ignore the posts like Dumdude's -- they're jealous idiots.


How am i an idiot ?

To me it seems like your an idiot for posting crap on the forum and trying to turn this into an FLAMING THREAD

#12 fs_greggacam

fs_greggacam
  • Guests

Posted 30 June 2008 - 04:37

its an ok suggestion... but make it optional.. and also add some other common separators like '.' or ' '...


Yes, the period is used in all Latin American countries and more

#13 fs_onemember

fs_onemember
  • Guests

Posted 30 June 2008 - 08:24

Commas: 1,000,000

Or space: 1 000 000


I would be happy both ways.

#14 Dark Archon

Dark Archon

    Veteran

  • Members
  • PipPipPip
  • 2,346 posts

Posted 30 June 2008 - 20:33

Yes, adding this with the option of commas, periods, or spaces as separators is not easy... I even attached code to help with the change... I see no reason for this to not be added to the game...

#15 fs_williamk92

fs_williamk92
  • Guests

Posted 02 July 2008 - 00:17

Bump

#16 Dark Archon

Dark Archon

    Veteran

  • Members
  • PipPipPip
  • 2,346 posts

Posted 05 July 2008 - 18:58

How do good suggestions like this get to page 2 :? :x

#17 Dark Archon

Dark Archon

    Veteran

  • Members
  • PipPipPip
  • 2,346 posts

Posted 11 July 2008 - 00:59

As easy as it is to add... this suggestion would take about 30 secs...

#18 Dark Archon

Dark Archon

    Veteran

  • Members
  • PipPipPip
  • 2,346 posts

Posted 14 July 2008 - 15:32

rawr

#19 Dark Archon

Dark Archon

    Veteran

  • Members
  • PipPipPip
  • 2,346 posts

Posted 16 July 2008 - 16:04

Nothing from those cows...

#20 Dark Archon

Dark Archon

    Veteran

  • Members
  • PipPipPip
  • 2,346 posts

Posted 03 August 2008 - 01:27

1 minute game patch... which would make it convenient for thousands of people... wtf?! why didn't they add this D:


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Font:
Arial | Calibri | Lucida Console | Verdana
 
Font Size:
9px | 10px | 11px | 12px | 10pt | 12pt
 
Color: