HTML - Textbox Only Accept Numbers And Letters
Hi guys,
could anyone here tell me how to disallow anything accept numbers and letters in a textbox, say for a form, and i cant have that textbox anything but numbers and letters, how can i do this?? thanks guys! Similar TutorialsHi everyone, I'm new to this form and html I have a login portal, I want users to accept and click on the terms and conditions tick-box before he/she can click on the "Login" button. Any tips would be greatly appreciated. Cheers Tony Okay so here is the problem. My site seems to work fine with firefox and opera but when viewed with IE at the very end after all my content it is adding "er". It is at the end of the page in the footer where I have a mailto link to the webmaster, so the "er" is on a new line and is also a part of the link I have no idea where this is coming from and any help would be greatly appreciated. I have only tested with IE 6.0, Windows XP, server pack 2. link to my page I hope this is all the information that is needed. I have a floating menu and would like to add spacing between the two letters. What is the best way to do this? www.mcran.com Go to the Bennett Archives page or the In Transition archives page to see the floating menu. Thanks!! Randy HTML Code: <div id="topbar"class="center"> <a href="" onClick="(); return false"><h5>Back to top</h5></a> <a href="#a">A</a><a href="#b">B</a><br/> <a href="#c">C</a><a href="#d">D</a><br/> <a href="#e">E</a><a href="#f">F</a><br/> <a href="#g">G</a><a href="#h">H</a><br/> <a href="#i">I</a><a href="#j">J</a><br/> <a href="#k">K</a><a href="#l">L</a><br/> <a href="#m">M</a><a href="#n">N</a><br/> <a href="#o">O</a><a href="#p">P</a><br/> <a href="#q">Q</a><a href="#r">R</a><br/> <a href="#s">S</a><a href="#t">T</a><br/> <a href="#u">U</a><a href="#v">V</a><br/> <a href="#w">W</a><a href="#x">X</a><br/> <a href="#y">Y</a><a href="#z">Z</a><br/> <br/><br/><br/> <a href="http://www.mcran.com" target="_self"><b>HOME</b></a><br/> <a href="http://www.mcran.com/bio-test-page.php" target="_self"><b>BIO</b></a><br/> <a href="http://www.mcran.com/interviews.php" target="_self"><b>INTERVIEWS</b></a><br/> <a href="http://www.mcran.com/playlistsshowtable.php" target="_self"><b>PLAYLISTS</b></a><br/> <a href="http://www.mcran.com/2010-2006showstable.php" target="_self"><b>RADIO SHOWS</b></a><br/> <a href="http://www.mcran.com/favorite-sites.php" target="_self"><b>RESOURCES</b></a><br/> <a href="http://www.mcran.com/contact.php" target="_self"><b>CONTACT ME</b></a><br/> <a href="http://www.mcran.com/ihtsb.php" target="_self"><b>IHTSB</b></a><br/> <a href="http://www.mcran.com/thebennettarchives.php" target="_self"><b>BENNETT ARCHIVES</b></a><br/> </div> im creatinh a box containing a text. The box must be wide enough to fill a text. menu.style.width = tekst.length - this functioin gives the number of letters in text. So if the text is "hello" then the width is 5 pixels. But i need the widith of pixels needed to fit the text in a box. How can i do that? Hey, Anybody know how to implement a "page numbers" system like at the bottom of this page. What I want to do is - I have a gallery website with many pages of images, I want a piece of code that automatically generates a few page numbers like how it does at the bottom of this page. Can anybody help? Thanks. did not realize this was also javascript too. Please help me on this one. http://www.htmlforums.com/php-progra...eld-87724.html how to make the page automatically grab the page's url and paste it into a textfield. thanks hi i want to make some thing like this for example i have 100 pages how can i make this work i want this to happen it shows 9 or 10 numbers per page and after user goes to 9th page it will show more 5 numbers how can i make this any one?? that's how it will goes upto 100 page and i want First page and last page link too anyone can help me give me guide how can i make this???? I have a table where I want to right justify particular cells (in a column) because they contain numbers. However the column immediately to the right contains text (left justified), & so the number ends up bumping right up to the text & not being very readable. I don't want to use border lines around the cells. Using cell padding or cell spacing makes the rest of the table look bad. I tried putting the number into a string with spaces padding to the right of the number, but once that string is written to HTML it ignores the spaces. Is there a way to pad just a single cell with spaces to the right of the number? Or to get the HTML to treat the cell value as a text string & include the spaces, instead of as a number? TIA! Hello, i was wondering if anyone could tell me how i would place a textbox inside a layer (textbox with scrollbar only vertical). The textbox can only be wrote in by me to display text, not by any other user. I was also wondering then how would i position the textbox within the layer so it would be in the middle of the layer not at the top. And how i would then changed the colour of the scrollbar. Thanks I have this page that can add textbox and remove it but the problem is if I add textbox they will all have the same name as the default. How can I have different name from my textbox so that I can call them individually on the next page...Thanks <html> <head> <script language="javascript"> row_no=1; function addRow(tbl,row) { var textbox='<td height="25" align="center" valign="middle" bgcolor="#EEEEEE"><input name="textfield5" type="text" class="bodytext" size="20"></td><td height="25" align="center" valign="middle" bgcolor="#EEEEEE"><input name="textfield6" type="text" class="bodytext" size="35"></td><td height="25" align="center" valign="middle" bgcolor="#EEEEEE"><input name="textfield7" type="text" class="bodytext" size="3"></td>'; var remove= '<a href="#" onclick="removeRow(\''+ tbl +'\',\'' + row_no + '\')"/>Remove It</a>'; var tbl = document.getElementById(tbl); var rowIndex = document.getElementById(row).value; try { var newRow = tbl.insertRow(row_no); var newCell = newRow.insertCell(0); var newCell = newRow.insertCell(1); newCell.innerHTML = textbox + " " + remove; row_no++; } catch (ex) { alert(ex); } } function removeRow(tbl,num) { var table = document.getElementById(tbl); try { row_no--; table.deleteRow(num); } catch (ex) { alert(ex); } } </script> </head> <body> <form name="form1" method="post" action=""> <table width="600" border="0" cellspacing="0" cellpadding="0" id="mytable"> <tr id="myrow"> <td colspan="2" align="center"><h3>Some Text goes here</h3> </td> </tr> <tr ID="add"> <td width="177"> </td> <td width="273" align="right"><input type="button" name="Button" value="Add a new row" onClick="addRow('mytable','myrow')"></td> </tr> <tr ID="add"> <td width="177"> </td> <td width="273" align="right"> </td> </tr> </table> </form> </body> </html> Alright, I have a DIV with this as the background image: I put two textboxes over them, the first one is aligned ok but the second one is too high. How do I space them out? When I try br it goes down way too far. Here is what it looks like right now: Should I use a table? more DIVs? Or, is there a css code I could use to bring it down? How can I add textbox on a form having a button? So I can pass it's value to the next page Hi, I am trying to work out a form i.e. user was to choose from a "Yes/No" drop-down option. For example if user was to choose "NO", nothing will happen, BUT if user was to choose "YES" option, a text box will appear next to the field to allow user to enter some information. Can this be done? My code is below. Thanks HTML Code: <tr> <td bgcolor="#eeeeff"> Is it a shared device?<br> <font color='#F62817'>** If yes, please indicate the shared device </font> </td> <td bgcolor="#eeeeff"> <SELECT name="shared"> <option value="No"SELECTED>No</option> <option value="Yes">Yes</option> <INPUT type = "TEXT" name = "shared_remark" value = "NIL"> </td></tr> I am trying to put a simple text box on my form, but no matter what values I put in for the size of the textbox it reamins the same size! However, copying just the form code to a blank html document and the text box appears in what ever size I want. I didnt want to post the whole code here because a) is over 600 lines and b) im an ameatur and its rubbish code! However, I am using PHP in Dreamweaver if that makes any difference. This is driving me crazy, pleasehelp! Right...I'm in the process of creating a sample website, which takes in date data and number data...and I was wondering...as I have the option of using drop downs or textboxes....if the site does go onto a server...would it be easier (as the developer) to use drop downs or text inboxes..? I mean..when it comes to the user choosing things using the drop down or inputting into the textbox..and sending it to search in a database...which would be easier to play around with..and less complicated..? *thinks Am I making sense?* So, I have a web site I have inherited, not coded... and I know nothing about html/css etc! One string, a telephone number, should show in black, but in Safari it shows up in white (it is fine in all other browsers). However, if I change the string to text, it displays fine, so it only numbers that show up in white! Help - I have no idea what is causing this!? I've attached the html, and the relevant css for the page... I'm sure this is dead easy for someone who knows what they're doing! Thanks, in advance for your help, James I made my own local page and it's for a game's stats (Wins:Losses record), on which I have a fields with numbers. What code should I add if I want to make calculations like: Let's I have I have a field for Wins: and a field for Losses:. On another place in the page I have Total Wins, Total Losses, Win % (win:losses ratio). I dont know how to make typeable fields, so I have to type the numbers manually in TXT format, to edit the HTML code. But still, even if I have to type the numbers for fields Wins: and Losses: I want the Total fields to automatically calculate so: Total Wins = Wins (whatever number I type in Wins it appears in Total Wins) Total Losses = Losses (whatever number I type in Losses it appears in Total Losses) Win% = Total Wins/((Total wins + Total losses)/100)) Say I type 12 wins and 5 losses in the first fields. Thus, when opening the page, the same numbers should show for Total Wins = 12 and Total Losses = 5 without me having to type them in TXT format for the 'Total' fields. Win% would be 12/((12+5)/100)) = 12/0.17 =~ 70% In other words, to clarify in HTML, there where Total Wins and Total Losses have some numbers to be typed, instead of me writing manually the numbers e.g 12 and 5, can I instead write these formulas and how should they look in HTML? I'm developing a website that contains a lot of legal statutes. I'm trying to keep to html lists rather than using tables, but have come unstuck with how to display custom numbers in an ordered list. The lists usually begin with (1), then (a) is the indent, then (i) is the next level. These are easy to handle with <ol type=1>, <ol type=a> and <ol type=i>. The next level has (aa), which I've managed with <li value=27> and so on. However, I'm not certain how to handle the following types: (4A) - in between the number (4) and (5) and random numbers, such as (aE), etc. With regard to numbers like (4A), they need to be in the same bracket and can't be displayed as (4)(A) - which is a different reference in the legislation. Any help in displaying custom numbers (even user defined - e.g. for this particular bullet point display "4A") would be great. Thanks in advance. I want to save the content of a textbox in a div on button press. PHP is a possibility but I don't want to get into databases. How would this be done, |