Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by adninja

  1. adninja

    Can someone look at this code?

    Actually, the reaonly should not affect the rest of the textarea, but instead that one "2d4+2: 9" or whatever they rolled.
  2. adninja

    Can someone look at this code?

    Actually, when it comes to the problem with the line: else if (Mod<0) {doInsert (Num+"d"+Sides+Mod+": "+Roll); The result is "3d5-2: 10" because the + sign just tells the script that it is part of a string of values. THe only way for the script to add them together (I learned this the hard way...
  3. adninja

    Can someone look at this code?

    //Dice Button function tag_dice() { var FoundErrors = ''; var Num = prompt("Please enter the number of dice", "1"); var Sides = prompt("Please enter the number of sides","2"); var Mod = prompt ("Please enter any modifiers","0"); var a = (Num*Sides)-Num; var Rand =...
  4. adninja

    Codebutton function

    I have been asking about this in the javascript forum and I was told that I should ask here. I have a funtion for my forum that simulates dice rolling. I would like to know how to make the results read only. Here is my funtion so far: //Dice Button function tag_dice() { var FoundErrors =...
  5. adninja

    Javascript & Math

    One problem I see right away is the (1 + J). I tried something similar, and all it did was put them next to each other in a string. You might have to do: (Number(1) + Number(J)) That is what I had to do for my dice roller.
  6. adninja

    readonly codebutton functions

    I hav tried all of the solutions set forth by the far more qualified members here, but none of them work. I just reallised how stupid I was being, because I forgot to specify that I need this to work for a code button that exectues an funtion from an external js library file. That is why I have...
  7. adninja

    doInsert readonly

    I guess I need to mention that the button us a codebutton.
  8. adninja

    doInsert readonly

    Weel, this is only for a play by post RPG that I am working on. I already have a routine that generates the number and posts it once they input the necessary values. I can always check their posts to see if the result was read only (once I make it that way that is).
  9. adninja

    doInsert readonly

    I was wondering if there was a way to make the text a js button puts in the text area of my forum readonly, and maybe in another font? I am just looking for a way to keep people from cheating when using my dice roller. I can always check their posts to see if they actualy used the button or if...
  10. adninja

    Textbox in a Textarea

    Actually, what stormbird suggested is about what I need. The reroll would not be a problem, because refreshing the page would mean they would have to input all of the text again. A reroll like that would not matter that much since the player would not be able to change the result outright, but...
  11. adninja

    Textbox in a Textarea

    Hello, I am very new to JavaScript and I was wondering if it is possible to have a function place a textbox in the textarea of a forum I administrate. The purpose of this is for the dice roller I coded. It currently does a doInsert of the roll results that my members can easily edit to suit...

Part and Inventory Search

Back
Top