server path is correct but not applied as a background to div

Posted by Kasibabu under JavaScript on 9/13/2011 | Points: 10 | Views : 905 | Status : [Member] | Replies : 2
-------------source------------------------
<div style="display: none;" id="divselectImage">
</div>
------------------------javascript-----------------------
document.getElementById("divselectImage").style.display = 'inline';
// document.write(src);

document.getElementById("divselectImage").style.backgroundImage = url(src); // not applied server path here


my server src path is:

https://s3.amazonaws.com:443/BackfeediPad/1325_30_634508313946875000.gif?AWSAccessKeyId=0DYCX1JVYSQS3QBFN1R2&Expires=1315920527&Signature=23uys4dwL8JoBkVzxAAbheMDE6w%3d
------------------ urgent

Regards,
Kasi babu



Responses

Posted by: Godly77 on: 10/19/2011 [Member] Starter | Points: 25

Up
0
Down


var uriPath="https://s3.amazonaws.com:443/BackfeediPad/1325_30_634508313946875000.gif?AWSAccessKeyId=0DYCX1JVYSQS3QBFN1R2&Expires=1315920527&Signature=23uys4dwL8JoBkVzxAAbheMDE6w%3d "

document.getElementById("divselectImage").style.backgroundImage = url( + "'" +encodeURI(uriPath) +"'" + )

Godly Mathew

Kasibabu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hmanjarawala on: 10/19/2011 [Member] Bronze | Points: 25

Up
0
Down
if this image in your Image filder then write down url("~/Image/...")

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Kasibabu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response