By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,216 Members | 1,032 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,216 IT Pros & Developers. It's quick & easy.

how to take imagename from image path using javascript?

P: 56
Hello
I have got image path in javascript from php code.
That is:http://localhost/fotolia/photos/9.jpg
I want to take only photos/9.jpg from that full path.How can i do that?Please help me......



Thanks...........
Sep 4 '08 #1
Share this Question
Share on Google+
3 Replies


Dormilich
Expert Mod 5K+
P: 8,639
you can use a regular expression for this.

regards
Sep 4 '08 #2

Markus
Expert 5K+
P: 6,050
PHP or JavaScript?

You say 'using javascript' but have posted this in the PHP forum...

Please clarify.
Sep 4 '08 #3

Atli
Expert 5K+
P: 5,058
Hi.

Take a look at the basename function.
Sep 4 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.