Adding a background image in "pop up" page.

I would like to add an image as background to an .htm page created in Dreamweaver. I have a button in Flash MX with this actionscript on it.


on (release) {
     getURL("javaScript:window.open('3yr_am_daily.htm','3yr_am_daily','width=400 height=450')")
}


3yr_am_daily.htm is the page that needs a background image. I actually did add an image in the properties panel in the dreamweaver document but when I view the page online my image does not show up.

What else do I need to do?
pamelagillieAsked:
Who is Participating?
 
krishnaprathabConnect With a Mentor Commented:
Hi,

Dreamweaver tiles (repeats) the background image if it does not fill the entire window, just as browsers do. (To prevent the background image from tiling, use Cascading Style Sheets to disable image tiling. Use should use CSS to define the no-repeat option.

The syntax in CSS is :

'background-repeat'
Value:   repeat | repeat-x | repeat-y | no-repeat | inherit  
Initial:   repeat  
Applies to:   all elements  

If a background image is specified, this property specifies whether the image is repeated (tiled), and how. All tiling covers the content and padding areas of a box. Values have the following meanings:

repeat
The image is repeated both horizontally and vertically.
repeat-x
The image is repeated horizontally only.
repeat-y
The image is repeated vertically only.
no-repeat
The image is not repeated: only one copy of the image is drawn.

Example(s):


BODY {
  background-repeat: no-repeat;
}

If you still have doubts refer to the below URL:

http://www.w3.org/TR/REC-CSS2/colors.html#background-properties

Thanks,
KP
0
 
ZefferCommented:
you don't need the sub-window parameter

try..

on (release) {
    getURL("javaScript:window.open('3yr_am_daily.htm','width=400 height=450')")
}

if there is still no background..the problem will be with your htm page..not the call

Z

0
 
pamelagillieAuthor Commented:
Z,

I deleted the sub-window parameter and now the page doesn't show up at all. Maybe the problem is with my htm page. Do you know what it might be?  The page is just a simple page with text only and an image that I added in the "properties panel" in the dreamweaver document.

Any ideas?
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
krishnaprathabCommented:

Hi,
 
There may be two reasons why this is happening.

1) If the HTML and the image are not in the same directory.
2) If the HTML pages are not in the same folder as the HTML page with the embedded Flash object(swf).

Possible solution is try placing the swf and the html (both the calling html and the html with background) in the same folder. Also place the background image in the same folder.

Try and use relative path (../) if your swf , html and/or images are in different directory.

In my flash movie iam using the action :

on (release) {
      getURL("javascript:window.open('imagehtml.htm','image','width=400 height=450');void(0);");
}

and all my HTML's , iamge and swf are in the same directory and it wrks for me.

I have uplodaed a set of test files (htmlproblme.zip) to :

http://s6.invisionfree.com/flashmx/index.php?showtopic=5

Unzip the file into a folder and open the main.htm file and then click on the black button in that page.

Hope this helps !

Thanks,
KP
0
 
pamelagillieAuthor Commented:
okay, my background is showing up now but it is tiled and I can see it repeating on the top and bottom of my window that opens up. How do I stop the repeating image?
0
 
pamelagillieAuthor Commented:
KP,

I got the image to stop tiling, but now my window that pops up is not the sze that i want it to be.

In the code for the button in Flash MX, I specify the size for the page based on the table/cell size in Dreamweaver. When the window pops up it automatically has a scroll bar on it and doesn't display the whole page as intended.

You can view what I'm talking about at www.colonialhousepreschool.org. go to CURRICULUM, then TWO YEAR OLDS, then at the bottom of the page, the first link to the class schedule 12:00-2:15.

Pleaase help!

PG
0
 
krishnaprathabCommented:
Hi,

In the 2yr_epm_daily.htm file i found an unwated tr portion which is :

  <tr>
    <td width="371" height="20">&nbsp;</td>
  </tr>

Remove this and set the left and right margin of this file to 0. It will work. By the way the site looks very good and the color combinations are too good.

In my computer Ima not able to see the scrollbar!!

If still you have problems then istead of opening a window from within flash call a javascript function written in your html and from you HTML open the window with specifictions such as scrollbar=no etc..

In your getURL method use some function like:

getURL("javascript:openSmallWin();");

and in your HTML write a function with the same name :

function openSmallWin()
{
      MM_openBrWindow('2yr_epm_daily.htm','name','scrollbars=no,width=300,height=460');
}

Cheers !!
KP
0
 
krishnaprathabCommented:
Hi pamelagillie,

 If my answer has solved your problem please close this question.

Many Thanks,
KP
0
 
pamelagillieAuthor Commented:
I have removed the tr portion that you said to remove and nothing has changed.

I'm a little lost when you talk about "calling a javascript functio written in your html". Are you saying to put this (getURL(javascript:openSmallWin();"); as actionscript on the button in flash? And then put the following in dreamweaver?:

function openSmallWin()
{
     MM_openBrWindow('2yr_epm_daily.htm','name','scrollbars=no,width=300,height=460');
}

Can you please be more specific?  I tested this site on a PC, (I have a mac) and the scrollbar does not show up, but instead the window is just too small and cuts off information. (The last item in the window should be "Good-bye!")

PG
0
 
krishnaprathabCommented:
Did you set the left and right , top and bottom margins to 0?

Thanks,
KP
0
 
pamelagillieAuthor Commented:
this just isn't working for me and there seems to be so many inconsistencies depending on what browser the user is using.

i've decided to create the pop-up window in flash. to do this would i create a flash document at the correct size 380 x 380 and create a .swf file that i will then link to?

how do i link to this .swf file?

0
 
krishnaprathabCommented:
Can you upload the files somewhere and let me know. I will fix it when iam free.

Thanks,
kp
0
 
pamelagillieAuthor Commented:
kp,

i ended up creating a .swf in flash with all elements in place, rather than putting it all together in dreamweaver. then i imported the .swf file into a dreamweaver doc and this seemed to work.

thanks for all of your help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.