Hi Steve, thanks for that. I've added the code but can't seem to get it
to work.
I added the script and put it on the top of my page:
<script>
function setBackground(obj,mode)
{
if (mode == "blur")
{obj.style.backgroundImage =
"URL('[smshouses_form_background.gif]')";}
else
{obj.style.backgroundImage =
"URL('[smshouses_form_background.gif]')";}
}
</script>
and the text field is below:
<td align="left"><cfinput name="StreetName" type="text"
onblur="setBackground(this,'blur');"
onfocus="setBackground(this,'focus');" style="background-image:
URL('[smshouses_form_background.gif]');"></td>
I put the image file in to the same folder as my code.
Any ideas? At the moment no picture is being displayed.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve
Onnis
Sent: 22 January 2004 15:02
To: CFAussie Mailing List
Subject: [cfaussie] RE: onFocus form
Stuart
Something like this should do you
<script>
function setBackground(obj,mode)
{
if (mode == "blur")
{obj.style.backgroundImage =
"URL('[imagePath]')";}
else
{obj.style.backgroundImage = "";}
}
</script>
<input type="Text" onblur="setBackground(this,'blur');"
onfocus="setBackground(this,'focus');"
style="background-image:URL('[imagePath]');">
Regards
Steve Onnis
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Stuart Kidd
Sent: Thursday, 22 January 2004 10:20 PM
To: CFAussie Mailing List
Subject: [cfaussie] onFocus form
If anyone has the Google desktop bar you'll notice that in the textbox
is a Google image and when you click into the textbox the image
disappears, anyone know how to do that?
I remember seeing this on the list and can get that to work no problem
but I'd like it to load an image instead of text. I can automatically
have an image load through the stylesheet but don't know how to get rid
of it when a mouse clicks into the textbox.
<input type="text" name="email" value="[EMAIL PROTECTED]" size="24"
onFocus="this.value=''">
Thanks,
Saturday
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004