Show ASCII Code - HTML / Javascript Tutorials
 
  Buy Ebooks, Video Games, DVDs, Electronics and more !
Home | Help Forums | Web Design Tutorials | Free Swishmax Downloads Make Money Online Blog . Free Image and Photo Sharing and Hosting

 

 

Company

Home

Nework Details

Tutorials

SWiSH 2

SWiSHMax

Flash MX

PHP & MySQL

HTML / JScript

Adobe Photoshop

Corel Draw

Gimp

Miscellaneous

Downloads

Templates

Plugins

Fonts

Wallpapers

Free Images

Scripts and Codes

Products

E-Books

SWiSH BB

SWiSH Templates

SWiSH-DB Newsletter
Subscribe to our newsletter : GO
  Partners / Affiliates

   Free image hosting
   Web Design Pakistan
   Swish Templates
   SWiSH Climax
   Talkfreelance Community
   Template Desire
   Lite boards
   Script Sector
   GimpTalk
   13dots
   Idea Designs
   PHP Cafe
   Sposatoettore
   Free swishmax templates
   Swishzone

Manage your site with Flax Article Content Management System
Show ASCII Code
Category : HTML / Javascript | Level : Beginner | Language : English
Ask Question | Read Comments | Post tutorial | Previous | Next

Web www.swish-db.com

Okay, here is another tutorial to follow, pretty simple and basic for you all to follow wink.gif

Ok, big thanks to Javascript Source, as this wouldn't be possible



OKEY, LETS GET STARTED!

Step1: Open Notepad or WYSIWYG program, if you're not familar with notepad and dont have a Editor, eg: Dreamweaver, Frontpage...

Then i suggest copy/paste this into notepad now and save as Yourname.html :::

CODE
<html>
<head>
<title>JAMIE BARTON RULES!!</title>
</head>
<body>

</body>
>/html>


Ok, thats the basics for a browser to regonnise your web page.

Now the fun stuff smile.gif

Enter this between the "<head>" section inside your page smile.gif

CODE
<!-- Begin
function showKeyCode()
{
var character = document.characterCode.character.value.substring(0,1);
var code = document.characterCode.character.value.charCodeAt(0);
var msg = "ASCII = "+code+"";
alert(msg);
}
//  End -->
</script>


Which inside the "<html>" sections, it should look similar to this:

CODE
<head><script LANGUAGE="JavaScript">

<!-- Begin
function showKeyCode()
{
var character = document.characterCode.character.value.substring(0,1);
var code = document.characterCode.character.value.charCodeAt(0);
var msg = "ASCII = "+code+"";
alert(msg);
}
//  End -->
</script>
</head>


Right, look below all your head junk and scan for "<body>", body is the actual place you put things and will see in your browser, so i suggest adding something sensible tongue.gif laugh.gif

Ok, for this tutorial, add the code below into your "<body>" section wink.gif

CODE
<form name="characterCode">
 <center>Enter some sort of character here (eg: A,B,C,H)<br>
 <br>
&nbsp;<input type="text" name="character" size="15"> <br>
 <br>
 <input type="button" value="Show Key Code" onClick="showKeyCode();">
 </center>
</form>


Which inside both "<body>" and "</body>" it should look similar to this:

CODE
<body><form name="characterCode">
 <center>Enter some sort of character here (eg: A,B,C,H)<br>
 <br>
&nbsp;<input type="text" name="character" size="15"> <br>
 <br>
 <input type="button" value="Show Key Code" onClick="showKeyCode();">
 </center>
</form>

</body>


My work is always messy, so dont expect to see me sorting the code all out into little examples and FAQ inside it huh.gif

Ok, bobs your uncle, its done, now again, you're wondering what on earth is this man talking about, but infact, finding the ASCII code for a character can be fun smile.gif It can also help with big projects using major html and php functions (heavy stuff)

Now, i really do hope this helps you a lot with what ever you're doing in the future and its something to remember. It took me 15 minutes to memorise the <head> section code, but its gone now tongue.gif

So, have a play around and see what you can do, the outcome is up to you smile.gif

Here is my example:

http://www.host-media.co.uk/chara.htm


Enjoy!
Any problems, just let me know, post back in here and i'll get it working for you laugh.gif laugh.gif



Ok.....


- Jamie smile.gif
Regards...


© 2002-2005 Flaxweb Network | Article Manager | Gimp Tutorials Library | RAD C++ Library | Free C/C++ Sourcecode |
Sites of interest : Web Design Blog | Swish Templates | Swishmax Ebook | Photoshop Templates | Gimp Tutorials | Text Forum | Make Money Online