Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > probs with javascript popup windows

probs with javascript popup windows
Thread Tools
Fresh-Faced Recruit
Join Date: Oct 2001
Status: Offline
Reply With Quote
Nov 18, 2001, 03:34 PM
 
i'm new to javascript and hence i'm trying to learn it by reverse engineering other scripts ie i'm nickin someone else's freeware script

i'm using dreamweaver 4 trialware as my main development environment -

this is the site in question:

my site

the problems start on the next page :
image page.

basically all i want is a simple image popup - i tried using dw's built in behaviour to launch a popup window containing a specified url - works ok for html page but images appear to give a thick white border to the top and the left of the image in the window

so i tried using a javascript found on a demo site - it appears to work fine and flawlessly on my set up - using ie 5 and netscape 6 on my mac - my pc owning friends inform me that the images get tiled when viewing the site - wtf is goin on?

thnx in advance for any forthcomin help

[ 11-18-2001: Message edited by: frogbat ]
     
Forum Regular
Join Date: Aug 2001
Status: Offline
Reply With Quote
Nov 18, 2001, 11:21 PM
 
What's going on your site is that you're using the image as a background on the popup. When you popup the window on a mac, it checks out the size you tell it and pops a window that size just like it should.

Windows however, puts scrollbars on everything, but if theres nothing to scoll, it takes them away, but doesn't take away the space for the scrollbars. Am I even making sense? Basically, the windows browser pops up a window bigger than you tell it to. It's stupid.

An idea for a workaround would be instead of making the picture a background image (which is why it's tiling), do something like this:

<table border=0 cellspacing=0 cellpadding=0 width=100% height=100%>
<tr>
<td width=100% height=100% valign=center align=center>
<img src="whaterver.jpg">
</td>
</tr>
</table>

and in the body tag you need:
<body marginwidth=0 marginheight=0 leftmargin=0 rightmargin=0 topmargin=0 bottommargin=0>

That will make it stay in the center even if the thing is a little off.
It's a bunch of crap in my opinion, that stuff should all be default. Some of it is, I guess. Oh well.

That's what I've done to overcome those ob-stackles.

By the way, those pictures rock.
     
frogbat  (op)
Fresh-Faced Recruit
Join Date: Oct 2001
Status: Offline
Reply With Quote
Nov 19, 2001, 06:45 AM
 
thnx for your help - i appear to have solved the prob a little using another script - appears to work fine in ie browsers but netscape's another matter

*slants eyes at javascript

:o @ your comment
     
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Nov 19, 2001, 11:19 AM
 
Originally posted by ford prefect:
[QB]
Windows however, puts scrollbars on everything, but if theres nothing to scoll, it takes them away, but doesn't take away the space for the scrollbars. Am I even making sense? Basically, the windows browser pops up a window bigger than you tell it to. It's stupid.
[QB]

Actually all you have to do is disable scrollbars and you won't get any. You should on a Mac, too, even if the Mac's version of IE behaves differently.

The scrollbar placeholder is there so it doesn't break your flow when someone resizes it to requre a scrollbar.


lookup window.open() in your MM dreamweaver trialware - it's all right there.
-Raman
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:02 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2