•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 397,809 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,509 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 901 | Replies: 2
![]() |
•
•
Join Date: Jan 2007
Posts: 8
Reputation:
Rep Power: 0
Solved Threads: 0
Hi, I really need help with text field with css image.
I have wrote code, this code is works great but I could not figure out how to write the rest of code, there is a text field that are relate to email address, for sample if person enter email of hotmail such as (username@hotmail.com) then it will change the email domain name to image using css and insert into the text field after user name so it will be look like(username + image) together in text field and the value of text filed will be (username@hotmail.com) so basically to use z-order statment for image in CSS!
currently this code's works great when select doamin name and insert into the text field after user name, but my problme is that trying to figure how to insert image instead of domain name!
please see code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<script language="JavaScript" type="text/javascript">
<!--
function EMailComplete(obj){
var eles=obj.form.elements;
for (var zxc0=0;zxc0<eles.length;zxc0++){
if (eles[zxc0]==obj&&zxc0>0){
if (eles[zxc0-1].type=='text'){
var index=eles[zxc0-1].value.indexOf('@')
if (index>-1){ eles[zxc0-1].value=eles[zxc0-1].value.replace(eles[zxc0-1].value.substring(index),''); }
eles[zxc0-1].value+=eles[zxc0].value;
break
}
}
}
}
//-->
</script>
<link href="gamefile.css" rel="stylesheet" type="text/css">
</head>
<body>
<form>
<input = "value" >
<select onchange="EMailComplete(this);">
<option value="id=game" >Provider</option>
<option value="@" >@another</option>
<option value="@ntlworld.com" >@ntlworld.com</option>
<option value="@hotmail" >@hotmail.com</option>
<option value="@yahoo.com" >@yahoo.com</option>
</select>
</form>
</body>
</html>
how can i write that code in javascript and CSS to allow me to select domain name and auctomatic insert the image into the text field after user name!
please help thanks.
I have wrote code, this code is works great but I could not figure out how to write the rest of code, there is a text field that are relate to email address, for sample if person enter email of hotmail such as (username@hotmail.com) then it will change the email domain name to image using css and insert into the text field after user name so it will be look like(username + image) together in text field and the value of text filed will be (username@hotmail.com) so basically to use z-order statment for image in CSS!
currently this code's works great when select doamin name and insert into the text field after user name, but my problme is that trying to figure how to insert image instead of domain name!
please see code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<script language="JavaScript" type="text/javascript">
<!--
function EMailComplete(obj){
var eles=obj.form.elements;
for (var zxc0=0;zxc0<eles.length;zxc0++){
if (eles[zxc0]==obj&&zxc0>0){
if (eles[zxc0-1].type=='text'){
var index=eles[zxc0-1].value.indexOf('@')
if (index>-1){ eles[zxc0-1].value=eles[zxc0-1].value.replace(eles[zxc0-1].value.substring(index),''); }
eles[zxc0-1].value+=eles[zxc0].value;
break
}
}
}
}
//-->
</script>
<link href="gamefile.css" rel="stylesheet" type="text/css">
</head>
<body>
<form>
<input = "value" >
<select onchange="EMailComplete(this);">
<option value="id=game" >Provider</option>
<option value="@" >@another</option>
<option value="@ntlworld.com" >@ntlworld.com</option>
<option value="@hotmail" >@hotmail.com</option>
<option value="@yahoo.com" >@yahoo.com</option>
</select>
</form>
</body>
</html>
how can i write that code in javascript and CSS to allow me to select domain name and auctomatic insert the image into the text field after user name!
please help thanks.
There's no need to hide email addresse in a <form>
no robots can read this !
hide the email in your html with a php script and gd or fixed image.
no robots can read this !
hide the email in your html with a php script and gd or fixed image.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
access activation ajax api asp blogger blogging blogs code combo dani daniweb data debugging developer development dreamweaver dropdownlist firefox gdata google gpl home html innovation internet javascript key linux microsoft module msdn net news office openbsd product programming reuse rss serial site software source sql tags vista web wysiwyg xml
- Code 19 Registry Error (Windows NT / 2000 / XP / 2003)
- Why won't this code work? (VB.NET)
- Need help with DirectX code (C)
- Tutorials & Code Submissions - Questions? (DaniWeb Community Feedback)
- Some Basic Code Hopefully (Help Needed) (HTML and CSS)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Can't open a javascript on a PDA
- Next Thread: Help with my Navigation bar


Linear Mode