Jump to content

jholstein

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

About jholstein

  • Birthday 06/03/1972

Contact Methods

  • Website URL
    http://www.trueplayer.net

Profile Information

  • Gender
    Male
  • Location
    Quad Cities, USA

jholstein's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. So you can see where this code is functioning: http://www.rcreader.com/index.php?option=com_wrapper&Itemid=332 you can use - user=justintest, pass=password to log into a test account, then clilck on 'post an ad', select category and ad type, then you will come to the screen that is displaying the post.php file. I took your altered post.php file and your altered javascript.js file and wrote them over the old ones, but I'm still not getting the 'character count down' that should be happening.
  2. Still not functioning but I noticed that I had a form name in the javascript, but no form tags in the php code. I changed it to this: PHP File <tr> <td>{$Languages['account']['adsscreendesc']}:</td><td><textarea name="newDesc" rows="4" cols="25" wrap onKeyPress="characterLimit()">$newDesc</textarea> <br> <input type="text" name="counter" size="32" value="Remaining characters: 300"><br> <br> <input type="reset" value="clear"> </td> </tr> JAVASCRIPT FILE function characterLimit() { var characters = document.newDesc.value if (characters.length <= 299) {<br> document.newDesc.counter.value = "Remaining characters: " + (299 - characters.length) } else { document.newDesc.counter.value = "Over Limit by: " + (characters.length - 299) + " characters" } } .....but it still didn't work. I also tried putting a form name in the php code but it makes the submit button at the bottom of the page not function
  3. Thanks for the help. I attached the php file and the javascript.js file (zipped together). The added code in the post.php file starts at line 370 and the corallating javascript code is at line 178 in the javascript.js file. [attachment deleted by admin]
  4. I am trying to modify a piece of classifieds software called BosClassifieds by taking a regular text box and altering it to use this 'Key in 10 characters' form at the top of this page. http://jennifermadden.com/javascript/stringmaxLength.html I placed the 'textarea' code within the php file and I'm trying to get it to receive its javascript action from a external javascript.js file. I'm a novice at javascript and php, so although the form appears ok and works within the page by recording the data, the 'word count' function isn't pulling its javascript action. Could someone look at the code snipets that I'm using below and see if they know what I need to change to make this work? Or..is it possible to place the neccessary javascript within the php file to acomplish this without pulling from an external javascript.js file? PHP FILE $adDef .=<<<ENDITEM <tr> <td>{$Languages['account']['adsscreendesc']}:</td><td><textarea name="newDesc" rows="4" cols="25" wrap onKeyPress="characterLimit()">$newDesc</textarea> <br> <input type="text" name="counter" size="32" value="Remaining characters: 300"><br> <br> <input type="reset" value="clear"> </td> </tr> ENDITEM; JAVASCRIPT.JS FILE function characterLimit() { var characters = document.newDescform.text.value if (characters.length <= 299) {<br> document.newDescform.counter.value = "Remaining characters: " + (299 - characters.length) } else { document.newDescform.counter.value = "Over Limit by: " + (characters.length - 299) + " characters" } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.