![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi Guys! I am using Javascript in Dreamweaver to create a small app that allows a use to enter a text message into a prompt and see it scroll (using marquee attribute). The user can then select button to format the text (font /colour). I basically want to replace the form buttons with my own creations and I thought it would be as simple as inserting an image field and attaching the Javascript ?format? function with ?onclick?. However, when the user clicks the ?gif button? I made, instead of the scrolling text changing colour or font the prompt pops up again for them to retype their message. Can anyone help? Script: body script language="JavaScript" type="text/javascript" !-- function message(usermsg){ document.getElementById('wibble').innerHTML = '<span style="font-family:arial;font-size:28px">'+usermsg+'</span>'; } var usermsg = prompt ("Enter your scrolling text message and click 'OK' (200 characters Max)", ""); message(usermsg); //-- function times(){ document.getElementById('wibble').innerHTML = '<span style="font-family:times;font-size:28px">'+usermsg+'</span>'; } function arial(){ document.getElementById('wibble').innerHTML = '<span style="font-family:arial;font-size:28px">'+usermsg+'</span>'; } function monospace(){ document.getElementById('wibble').innerHTML = '<span style="font-family:monospace;font-size:28px">'+usermsg+'</span>'; } function black(){ document.fgColor='#000000' } //end of function "black()" function red(){ document.fgColor='red' } //end of function "red()" function blue(){ document.fgColor='#0101B0' } //end of function "blue()" function green(){ document.fgColor='#cccc99"' } //end of function "green()" /script input name="monospace" type="image" src="../images/gifs/submit.gif" width="60" height="25" border="0" onclick="monospace()" value="monospace"/ /body |
#3
| |||
| |||
|
#4
| |||
| |||
|
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |