Remove base_url() from whole URL |
[eluser]Zimooon[/eluser]
Hey guys, I have an onclick copy ( i display images and user can click on them and the URL of the image written into a textfield) . The problem is : i just want siteurl not the full url. f.e.: image url: www.example.com/images/asd.jpg this url get copied into my textfield and saved like this into my DB. Now i want only this part: /images/asd.jpg get saved to my DB. Is there any way to substract the base_url() from the full url? this is my js function: [removed] function clicked(address) { document.getElementById('copy_img').value = address.src; }[removed] and i call it via: onclick="clicked(this)" best regards |
Messages In This Thread |
Remove base_url() from whole URL - by El Forum - 05-10-2011, 08:49 AM
Remove base_url() from whole URL - by El Forum - 05-10-2011, 08:54 AM
|