|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
||||
|
||||
|
JavaScript - Add url to string
Hi, i need to add the current url to a string, my problem is, i think
with the concatenating, i've tried different methods but nothing works, so i guess it's more than that that i am doing wrong.. here's the code: (the line that needs current url is in red) Code:
this.container = $(container);
this.container.setStyles({
position: 'relative',
overflow: 'hidden',
background: 'url(images/borders/photo_500.png)'
i found out that location.href=url will give the current url, so i tried: Code:
background: 'url('+location.href=url+'images/borders/photo_500.png)'
with a number of variations, where am i going wrong? Thanks Shem
__________________
Everyone has a photographic memory. Some don't have film. I am a nobody, nobody is perfect, therefore I am perfect.
|
|
#2
|
||||
|
||||
|
fixed up
got it working with this:
Code:
background: 'url(http://'+location.hostname+'/images/borders/photo_500.png)' Shem |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > JavaScript - Add url to string |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|