Jump to content

cha0sriderx

Members
  • Posts

    47
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cha0sriderx's Achievements

Member

Member (2/5)

0

Reputation

  1. i fixed the issue, it was because i had a textarea that had a width of 97% and in IE it made the textarea larger than the menu.
  2. no one knows how to fix it without having to use js/ajax to get the screen size?
  3. thanks for your reply, but i already tried that and all it did was make the 2 menu's smaller and min-width or max-width doesnt work for td's.
  4. im using a menu on the left and right side of my layout, they are both 180px. what would i have to set the middle width to so it would fit the screen in IE. it works fine in firefox but it seems like it doesnt want to in IE. td.left { width: 180px; width: 180px; margin:0 2px 0 2px; border-right: 1px solid #778; vertical-align: top; } td.middle { vertical-align: top; height: 400px; padding: 4px; } td.right { width: 180px; width: 180px; margin:0 2px 0 2px; border-left: 1px solid #778; vertical-align: top; }
  5. it wasnt my intentions to be a jerk about it, i was just asking how would i change just the exp to fit the new requirements. i really do appreciate your help, i just figured it was easier to reply to this post instead of making a completely new one.
  6. i was going to edit my post but i couldnt. anyways i wonder wondering how would i make the regexp also remove users that have 2 or more space in a row(ie: cha0s riderx).
  7. thanks alot for your help and it works. this is exactly how i wanted it, i wanted it to weed out the bad names.
  8. Im trying to scan through a textarea to find invalid names and then remove them. invalid names are ones that have any character that isnt a number, letter or space, but the space cant be at the beginning or end. ex: player1,player2,player3 - valid ex: player1, player2, player3 - should remove " player2" and " player2" <script type="text/javascript"> function testnames() { exp=/^[a-zA-Z0-9]+[a-zA-Z0-9\ ]+[a-zA-Z0-9]{1,}$/; box = document.forms.test.users.value; box2 = box.split("\,"); for (i=0; box2[i].length > 0; i++) { x = exp.test(box2[i]); if (!x) { } } } </script>
  9. yeah i want it to do it like that but when i have more than 1 part for that car i have what is below. after i find a fix for the reason it stops after 2 ill finish up all the other cars(11 total cars) and all the parts, the form is made for a setups page for a racing game i play online. cars[4][2] =[{text:"OEM Engine Mounts", town:"2"}, {text:"Part 2", town:"3"}];
  10. im trying to use a loop to load a list of items into a few combo boxes but it keeps stopping at 2 instead of doing all 5. php that lists the cars and towns: <? $cars = array( "1"=>"Acura Integra GS-R" , "2"=>"Mitsubishi Lancer Evolution VIII" , "3"=>"Scion tC" , "4"=>"Acura Rsx Type-S" , "5"=>"Infiniti G35 Coupe" , "6"=>"Ford Mustang GT" , "7"=>"Honda Integra Type-R" , "8"=>"Honda S2000" , "9"=>"Chevrolet Corvette" , "10"=>"Ford GT" , "11"=>"Dodge Viper"); $towns = array( "1"=>"Toreno" , "2"=>"Newburge" , "3"=>"Creek side" , "4"=>"Vista" , "5"=>"Stock"); ?> javascript part: <script type="text/javascript"> cars =new Array() cars[4] =new Object() cars[4][1] =[{text:"None", town:"1"}]; cars[4][2] =[{text:"OEM Engine Mounts", town:"2"}]; cars[4][3] =[{text:"OEM Shocks", town:"2"}]; function parts() { town = document.setups.town.value; car = document.setups.car.value; i=0; z=1; x=0; if (car != 0 && town != 0 && town != "5") { alert('aaa'); for (z=1;z<=3;z++) { var part = document.getElementById(z); part.options.length = 0; db = cars[car][z]; if (db[0].text != "None") { for (i=0;i<=db.length;i++) { x = i + 1; if (db[i].town <= town) { part.options[x] = new Option(db[i].text, x); } } } } } if (town == "5") { for (p=1;p<=44;p++) { part = document.getElementById(p); part.options.length = 0; } } } </script> the form: <form name="setups"> <table class="form" cellpadding="2" cellspacing="0"> <tr> <td> </td> <td> <select name="town" onchange="parts()"> <option value="0" selected>Select A Town</option> <? for($i=1;$i<=count($towns);$i++) { echo "<option value=\"$i\">$towns[$i]</option>\r\n"; } ?> </select> <select name="car" onchange="parts()"> <option value="0" selected>Select A Car</option> <? for($i=1;$i<=count($cars);$i++) { echo "<option value=\"$i\">$cars[$i]</option>\r\n"; } ?> </select> </td> </tr> <tr> <td style="border-bottom: 1px solid #778;"> </td> <td style="border-bottom: 1px solid #778;"><b>Chassis & Suspension</b></td> </tr> <tr> <td align="right">FWD Traction System:</td> <td> <select name="1" id="1"> <option value="">x</option> </select> </td> </tr> <tr> <td align="right">Motor Mounts:</td> <td> <select name="2" id="2"> </select> </td> </tr> <tr> <td align="right">Springs & Shocks:</td> <td> <select name="3" id="3"> </select> </td> </tr> </table> </form>
  11. im using new option() to create options in a combo box, is there anyway i can add a class or just make it so the font color is different?
  12. on my site i have my profiles in the same mysql table as the login info. if you are making a login system you need to use sessions so you can just use the sessions id that you have the username under to get the profile data from the database. also you can do it this way.. profile.php?user=(some name) - will load the profile of another user profile.php - will load their profile.
  13. personally id store there profile information inside of a mysql database instead of a file in there folder.
  14. first im not sure if u can do replace like that, i dunno for a fact since i havent been coding js for long. also try using var's instead of the long strings in the if. this could be wrong, im just using what ive learned so far:P. exp = '/^[\],:{}\s]*$/'; x = text.replace(/\\./g, '@'); x = x.replace(/"[^"\\\n\r]*""|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g, ']'); x = x.replace(/(?:^|:|,)(?:\s*\[)+/g, ''); if (exp.test(x)) { }
×
×
  • 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.