Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  yordan : (19 June 2013 - 02:28 PM) Long Life To Asta New Era
@  agyat : (19 June 2013 - 01:58 PM) New Era Start At Asta Or Asta Start In New Era. :unsure:
@  yordan : (16 June 2013 - 05:41 PM) You're Welcome, Agyat!
@  agyat : (16 June 2013 - 07:38 AM) Thanks Yordan...
@  velma : (16 June 2013 - 12:06 AM) I Have Asked Opa To Check For A Backup.. He'll Let Me Know Soon :)
@  velma : (16 June 2013 - 12:05 AM) T_T It Seems That Someone Has Deleted That Topic Since I Found The Url Of The Topic But It Gives Me An Error
@  yordan : (15 June 2013 - 10:31 PM) @velma : It's A Tuto On How To Create A Login Program.
@  yordan : (15 June 2013 - 10:31 PM) Happy Birthday To Youuuuuu Agyat!
@  yordan : (15 June 2013 - 10:31 PM) Ba$
@  agyat : (15 June 2013 - 04:41 PM) :(
@  agyat : (15 June 2013 - 04:41 PM) Where The Hall I Were? 15Th Is Almost At End And No-One Wished Me "happy Birthday"!!!
@  velma : (14 June 2013 - 10:39 AM) Which Tutorial Is He Searching For?
@  velma : (14 June 2013 - 10:38 AM) Which Tutorial Is He Searching For?
@  yordan : (14 June 2013 - 07:47 AM) Ok, Have A Look Tomorrow.
@  yordan : (13 June 2013 - 03:19 PM) @velma, Can You Have A Look At Feelay's Problem? Seems That His Tutorial Is Not Searchable Today.
@  Feelay : (13 June 2013 - 08:11 AM) Oh, Haha
@  velma : (12 June 2013 - 05:39 PM) T_T Lately My Levels Of Procrastination..... **sigh**
@  velma : (12 June 2013 - 05:38 PM) I'll Do It Later
@  velma : (12 June 2013 - 05:38 PM) Procrastinators.. People Who Keep Saying "i'll Do This In A Bit"
@  Feelay : (12 June 2013 - 02:05 PM) Deal Punishments To What?

- - - - -

Fun With Javascript And Forms


2 replies to this topic

#1 Guest_Aldo_*

Guest_Aldo_*
  • Guests

Posted 22 November 2007 - 10:21 AM

I will post here every week with new and exciting things to do in javascript!
After i finish 10 of them , ill do Ajax(real-time)
-
1.Alerting and documenting Forms
Ever seen those dynamic sites where if you hove your mouse or type something bad..etc , it popups up or dynamically gets written onto the page? Well i am here to teach or rather help with all that stuff!

Step 1:Get notepad out and make a form

<form name='test'>
<input type='text' name='field1'>
Text displays here:
<div id='r'>


</div>

Step 2:
Add the javascript Bit

<script type="text/javascript">
function onKeyDown() {
document.GetElementById('r').innerHTML=document.test.field1.value;
}
</script>

Step 3 :CONCLUSION
We join both of them

<script type="text/javascript">
function onKeyDown() {
document.GetElementById('r').innerHTML=document.test.field1.value;
}
</script>
<form name='test'>
<input type='text' onKeyDown='onKeyDown()' name='field1'>
Text displays here:
<div id='r'>


</div>


Result:
Suppose you type Astahost, letter by letter, tehn in that div area, it will come letter by letter too.
A
A
As
As
Ast
Ast
like that

Hope this helped!
Will get a good one next time~

#2 TavoxPeru

TavoxPeru

    Super Member

  • [HOSTED]
  • 876 posts
  • Gender:Male
  • Location:Lima - Peru
  • Interests:Web and Software development, Internet, Computers, Electronic music, music, soccer.
  • myCENTs:13.21

Posted 25 November 2007 - 01:26 AM

I will post here every week with new and exciting things to do in javascript!
After i finish 10 of them , ill do Ajax(real-time)
-
1.Alerting and documenting Forms
Ever seen those dynamic sites where if you hove your mouse or type something bad..etc , it popups up or dynamically gets written onto the page? Well i am here to teach or rather help with all that stuff!

Step 1:Get notepad out and make a form

<form name='test'>
<input type='text' name='field1'>
Text displays here:
<div id='r'>
</div>

Step 2:
Add the javascript Bit

&lt;script type="text/javascript">
function onKeyDown() {
document.GetElementById('r').innerHTML=document.test.field1.value;
}
</script>

Step 3 :CONCLUSION
We join both of them

&lt;script type="text/javascript">
function onKeyDown() {
document.GetElementById('r').innerHTML=document.test.field1.value;
}
</script>
<form name='test'>
<input type='text' onKeyDown='onKeyDown()' name='field1'>
Text displays here:
<div id='r'>
</div>
Result:
Suppose you type Astahost, letter by letter, tehn in that div area, it will come letter by letter too.
A
A
As
As
Ast
Ast
like that

Hope this helped!
Will get a good one next time~

Thanks, i think that i would use it in my last project.

BTW, i hope that you post soon all the other stuff not in 9 weeks :rolleyes:

Best regards,

#3 Guest_rraallvv_*

Guest_rraallvv_*
  • Guests

Posted 08 January 2008 - 03:20 PM

Hi, it would be interesting to see those tutorials.
Go ahead



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users