cancel
Showing results for 
Search instead for 
Did you mean: 

How to use an image as a background for the View?

Former Member
0 Kudos

Hello,

I have a jpeg picture that I would like to use as a background for a certain View. How do I do that?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Roy,

There does not seem to be a solution available now.

I have checked with the themes .You can change images for icons and stuff but not the background. It helps you to the extent of changing the background colour.But applying a image as a background is not feasible.

regards

Bharathwaj

Former Member
0 Kudos

10X Bharathwaj

Answers (3)

Answers (3)

Former Member
0 Kudos

You may try the following hack (as far as it hack... you know...)

1. Create IFrame UI element on WD View, set it size to 1px X 1px, no border.

2. For IFrame source create the following html file:


<html>
<head>
<script  type="text/javascript">
window.onload = function()
{
  var doc  = parent.document;
  var body = doc.getElementsByTagName("BODY")[0];
  body.style.background = "url('url-to-bckg-image')";
}
</script>
</head>
<body></body>
</html>

Hope this helps,

VS

Former Member
0 Kudos

Hello Valery,

The hack code is indeed good. Unfortunately it did not work for the image.

Below is what I tried:

cco says:

<HTML>

<HEAD>

<script language="javascript">

function setImage()

{

var doc = parent.document;

var boody = doc.getElementsByTagName("BODY")[0];

boody.style.background-image = url ("file:///D:\Documents\My Documents\Cotton.jpg");

}

</HEAD>

<BODY></BODY>

</HTML>

Let me know if there is something that I missed.

Regards,

Dharmi

Former Member
0 Kudos

Hello Valery,

Forgot to mention that it did work with the color :-)meaning if I give body.style.BackgroundColor = blue; but not with the image.

Regards,

Dharmi

Former Member
0 Kudos

Hi,

I think the problem is the URL to the background file. You must set it to something the client can load directly over http. A client can't load "file:///" URLs from your server (or is the Cotton.jpg on your clients hard disk?). If so, try a path without spaces and escape the backslashes...

regards,

Markus

Former Member
0 Kudos

Hi Roy

I suppose that is possible only thr Themes where u can set the Background Colors etcc.

With Wishes

Krishna kanth

Former Member
0 Kudos

Hi,

You want to have the Jpeg as a background and over that you want to see the UIElements ??

If yes, i don't think it is possible.You can place a image and set the width&Height properties so that you can see the jepg completely on the view.

Regards, Anilkumar