JUNILSTYLE NEW-FORUM COMMUNITIY
You'll need to login in order to fully use all
the featured and view all the sectionsof this site.

Please register if you're not yet a member.

JUNILSTYLE NEW-FORUM COMMUNITIY


 
HomeHome  GalleryGallery  RegisterRegister  Log inLog in  PortalPortal  
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» Three Six Mafia Neighborhood Hoe Instrumental
Wed Feb 19, 2014 6:41 am by gilaifeele

» Glass House The Good Mother
Sun Feb 16, 2014 12:51 am by gilaifeele

» Hanna In A Choppa 2 Revenge Of The Button
Wed Jul 10, 2013 2:03 pm by Admin

» FFSNG TWEAKING
Sun Apr 22, 2012 12:12 pm by Admin

» NEW TIPS (Rename Facebook Those already limit)
Thu Sep 08, 2011 8:06 am by Admin

» Change nick name facebook
Thu Sep 08, 2011 7:58 am by Admin

» Quote with emoji and Symbol's
Sat Aug 27, 2011 12:28 pm by Admin

» Want Your status in your favorite friend with one click
Sat Aug 27, 2011 12:19 pm by Admin

» FBML W/ DESIGN XD
Sat Aug 20, 2011 8:13 am by linuj

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Forum
::Affiliates::
::RADIO STATION::

::LIKE US::


::Flag Counter::
free counters



Share | 
 

 Flashing form element

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin
avatar

Posts : 44
Points : 129
Reputation : 0
Join date : 2011-05-16
Age : 27
Location : Philppines

PostSubject: Flashing form element   Mon Aug 08, 2011 2:22 pm

Note: Script rewritten Dec 15th, 02' for increased efficiency and NS6+

Description: Use this DHTML script to make certain form elements flash with glee. It's a great way to draw attention to "important" fields, such as the submit button, etc.


Simply insert the below code to the END of your document, right above the </body> tag:

Code:
<script language="JavaScript1.2">

/*
Flashing form element Script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, visit http://www.dynamicdrive.com/
This credit MUST stay intact for use
*/

var flashcolor="red"
var flashinterval=1000 //flash interval in miliseconds (1000=1 sec)

var formcollect=document.getElementsByTagName? document.getElementsByTagName("FORM") : document.all? document.all.tags("FORM") : new Array()
var flashcollect=new Array()

for (i=0; i<formcollect.length; i++){
for (e=0; e<formcollect[i].elements.length; e++){
if (formcollect[i].elements[e].className=="flashit")
flashcollect[flashcollect.length]=formcollect[i].elements[e]
}
}

function flashelements(){
for (f=0; f<flashcollect.length; f++){
if (flashcollect[f].style.color=='')
flashcollect[f].style.color=flashcolor
else
flashcollect[f].style.color=""
}
}

if (flashcollect.length>0)
setInterval("flashelements()",flashinterval)

</script>


Having done the above, you're now ready to give any form element a flashing personality. Just add:

class="flashit"

inside the element's tag you wish to flash. Here's an example:

Quote :
<form>
<input type="submit" value="Submit" class="flashit">
</form>

Follow the same procedure to apply this flashing trait to multiple form elements, whether they're from the same form or not. The script is robust enough to adopt, and browsers other than IE 4+ and NS6+ will simply see nothing (the effect, that is!).
Back to top Go down
http://junilstyle.new-forum.net
 

Flashing form element

View previous topic View next topic Back to top 

 Similar topics

-
» Element set
» Element Water OTK Deck List
» my first light novel, A Rogue Element
» Five Element Ninjas [1982]
» easier future changing of the heating element in an Andrew James HO
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
JUNILSTYLE NEW-FORUM COMMUNITIY :: Discussion Lounge :: Tutorial's :: JavaScript Codes-
Free forum | © phpBB | Free forum support | Contact | Report an abuse | Free forum
POWERED BY : JUNILSTYLE