User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Jan 2007
Posts: 8
Reputation: andy3250 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
andy3250 andy3250 is offline Offline
Newbie Poster

Need help with this code

  #1  
Jan 28th, 2007
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2006
Location: Canada
Posts: 11
Reputation: theonlydrayk is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
theonlydrayk's Avatar
theonlydrayk theonlydrayk is offline Offline
Newbie Poster

Re: Need help with this code

  #2  
Jan 29th, 2007
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.
Reply With Quote  
Join Date: Jan 2007
Posts: 8
Reputation: andy3250 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
andy3250 andy3250 is offline Offline
Newbie Poster

Re: Need help with this code

  #3  
Jan 29th, 2007
I have tried that way, it didn't works at all. any other idea!

AM
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 6:20 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC