•
•
•
•
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 401,520 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 3,400 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: 1588 | Replies: 2
![]() |
•
•
Join Date: Feb 2008
Posts: 19
Reputation:
Rep Power: 1
Solved Threads: 0
Hello,
I have searched in google, but I didn't find the answer.
I want to creat something like that using javascript:
here is my try, which works fine in Firefox but the events are not working in IE.
Any idea?
I have searched in google, but I didn't find the answer.
I want to creat something like that using javascript:
<input type="text" onfocus="this.select();lcs(this);" onclick="event.cancelBubble=true;this.select();lcs(this);" />
var parent = document.getElementById(parentID);
newInputFrom = document.createElement('input');
newInputFrom.type = 'text';
newInputFrom.setAttribute("onfocus","this.select();lcs(this);");
newInputFrom.setAttribute("onclick","event.cancelBubble=true;this.select();lcs(this);");•
•
Join Date: Feb 2008
Posts: 19
Reputation:
Rep Power: 1
Solved Threads: 0
hi,
I ve found a solution for the ie
but it's not working in Firefox
to get the desired result in both ie and ff :
do you have any better solution?
I ve found a solution for the ie
newInputFrom.onfocus = function () { this.select(); lcs(this); };
newInputFrom.onclick = function () { event.cancelBubble=true; this.select(); lcs(this); };to get the desired result in both ie and ff :
if( document.all){
newInputFrom.onfocus = function () { this.select(); lcs(this); };
newInputFrom.onclick = function () { event.cancelBubble=true; this.select(); lcs(this); };
}
else{
newInputFrom.setAttribute("onfocus","this.select();lcs(this);");
newInputFrom.setAttribute("onclick","event.cancelBubble=true;this.select();lcs(this);");
}![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
access activation api blogger blogging blogs code combo cross-browser javascript menu with few lines of code dani daniweb data debugging development dreamweaver dropdownlist equivalent code of messagebox in asp.net firefox gdata google gpl html innovation javascript javascript smooth scrolling scroll smoothly window document position javascript tab menu with rounded corners generator key linux microsoft module net news openbsd prevent javascript menu from getting hidden under flash movies preventing the delay when src attribute of the images set via javascript product programming reuse rss serial source tags vista web wysiwyg xml
- Problem with ASP.Net control or JavaScript ??? (ASP.NET)
- How to set attribute to the controls in datagrid? (ASP.NET)
- problem in javascript coding in asp page (ASP)
- Simple Math + Javascript (JavaScript / DHTML / AJAX)
- Help modify some JavaScript/HTML (JavaScript / DHTML / AJAX)
- Looking for Good Stats Program (Search Engine Optimization)
- How to get auto calculated expiry date on lost focus event of registration date (ASP.NET)
- Javascript Arrays (JavaScript / DHTML / AJAX)
- Javascript: Go To Line Number (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Debugging in Firefox
- Next Thread: I need HTML Dropdown Buttons to freeze Flash animation below it! urgent!please help!


Linear Mode