Click here to Skip to main content
15,895,011 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: which is better Pin
Nouman Bhatti4-Oct-08 9:04
Nouman Bhatti4-Oct-08 9:04 
QuestionHow could I rebuild the whole project even there are some missing files? Pin
JUNEYT4-Oct-08 5:25
JUNEYT4-Oct-08 5:25 
AnswerRe: How could I rebuild the whole project even there are some missing files? Pin
Sandeep Akhare5-Oct-08 20:50
Sandeep Akhare5-Oct-08 20:50 
GeneralRe: How could I rebuild the whole project even there are some missing files? Pin
JUNEYT5-Oct-08 23:29
JUNEYT5-Oct-08 23:29 
GeneralRe: How could I rebuild the whole project even there are some missing files? Pin
Sandeep Akhare6-Oct-08 0:58
Sandeep Akhare6-Oct-08 0:58 
GeneralRe: How could I rebuild the whole project even there are some missing files? Pin
JUNEYT6-Oct-08 4:06
JUNEYT6-Oct-08 4:06 
Questionjavasript work good in firefox not in ie Pin
UD(IA)4-Oct-08 4:02
UD(IA)4-Oct-08 4:02 
AnswerRe: javasript work good in firefox not in ie Pin
Perspx4-Oct-08 4:32
Perspx4-Oct-08 4:32 
Why don't you use the Javascript substr function rather than incrementally adding the characters to the variable?

It takes the form:

string.substr(start, n);

where start is the starting character of the substring and n is the number of characters to return after this.

Change your code to:

var n="";
str=document.getElementById("attach").value;
m=str.lastIndexOf("\\");
m++; //Increment the position of the last \\ so it is not included in the variable n.

n = str.substr(m, str.length-m);
document.getElementById("name").innerHTML = n;

alert(document.getElementById("name").innerHTML);


Tried in FF, Opera and IE and works in all.

Regards,
--Perspx


"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer

"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds

GeneralRe: javasript work good in firefox not in ie Pin
UD(IA)4-Oct-08 4:50
UD(IA)4-Oct-08 4:50 
GeneralRe: javasript work good in firefox not in ie Pin
Perspx4-Oct-08 5:00
Perspx4-Oct-08 5:00 
AnswerCP IGNORE: Cross poster; (3 forums) habitual;y reasks questions Pin
leckey4-Oct-08 6:01
leckey4-Oct-08 6:01 
Questionfck editor server404 problem Pin
UD(IA)3-Oct-08 22:01
UD(IA)3-Oct-08 22:01 
AnswerRe: fck editor server404 problem Pin
Dilip H. Patel3-Oct-08 22:10
Dilip H. Patel3-Oct-08 22:10 
GeneralRe: fck editor server404 problem Pin
UD(IA)3-Oct-08 22:49
UD(IA)3-Oct-08 22:49 
AnswerRe: fck editor server404 problem Pin
ngohieutp23-Oct-08 0:22
ngohieutp23-Oct-08 0:22 
Questionajax auto complete extender Pin
Krazy Programmer3-Oct-08 21:56
Krazy Programmer3-Oct-08 21:56 
AnswerRe: ajax auto complete extender Pin
Andreas X3-Oct-08 22:16
professionalAndreas X3-Oct-08 22:16 
Questiondraw hierarchical structure Pin
mukesh.mr033-Oct-08 21:44
mukesh.mr033-Oct-08 21:44 
AnswerRe: draw hierarchical structure Pin
Andreas X3-Oct-08 21:55
professionalAndreas X3-Oct-08 21:55 
AnswerRe: draw hierarchical structure Pin
Abhijit Jana3-Oct-08 21:57
professionalAbhijit Jana3-Oct-08 21:57 
Questionbound a gridview with smart tag and fill Pin
UD(IA)3-Oct-08 20:35
UD(IA)3-Oct-08 20:35 
Questionajax toolkit modalpopupextender problem Pin
UD(IA)3-Oct-08 20:04
UD(IA)3-Oct-08 20:04 
AnswerRe: ajax toolkit modalpopupextender problem Pin
Andreas X3-Oct-08 21:43
professionalAndreas X3-Oct-08 21:43 
GeneralRe: ajax toolkit modalpopupextender problem Pin
UD(IA)3-Oct-08 22:09
UD(IA)3-Oct-08 22:09 
GeneralRe: ajax toolkit modalpopupextender problem Pin
Andreas X3-Oct-08 22:14
professionalAndreas X3-Oct-08 22:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.