473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

MM_swapImage and Safari

Hi,
I've used the MM_SwapImage function from Dreamweaver to make a roll
over gallery for a photography website. The only problem is when I use
safari it changes the aspect ratio of the images.

Here's the link:
http://www.lizethsantos.com/fineart/.../abstract.html

Any solutions? Any idea on modifying the function so I can pass it at
width variable?
Thanks

Apr 10 '07 #1
5 1903
On 10 abr, 13:36, biggio.cr...@gmail.com wrote:
Hi,
I've used the MM_SwapImage function from Dreamweaver to make a roll
over gallery for a photography website. The only problem is when I use
safari it changes the aspect ratio of the images.

Here's the link:http://www.lizethsantos.com/fineart/.../abstract.html
Broken link.
Any solutions? Any idea on modifying the function so I can pass it at
width variable?
Thanks
Peter

Apr 11 '07 #2
On Apr 10, 10:18 pm, "Peter Michaux" <petermich...@gmail.comwrote:
On 10 abr, 13:36, biggio.cr...@gmail.com wrote:
Hi,
I've used the MM_SwapImage function from Dreamweaver to make a roll
over gallery for a photography website. The only problem is when I use
safari it changes the aspect ratio of the images.
Here's the link:http://www.lizethsantos.com/fineart/.../abstract.html

Broken link.
Any solutions? Any idea on modifying the function so I can pass it at
width variable?
Thanks

Peter
thanks
http://www.lizethsantos.com/fineart/.../abstract.html

Apr 11 '07 #3
On Apr 10, 1:36 pm, biggio.cr...@gmail.com wrote:
Hi,
I've used the MM_SwapImage function from Dreamweaver to make a roll
over gallery for a photography website. The only problem is when I use
safari it changes the aspect ratio of the images.

Here's the link:http://www.lizethsantos.com/fineart/.../abstract.html

Any solutions? Any idea on modifying the function so I can pass it at
width variable?
Thanks
http://www.lizethsantos.com/fineart/.../abstract.html

Apr 11 '07 #4
bi**********@gmail.com a écrit :
On Apr 10, 10:18 pm, "Peter Michaux" <petermich...@gmail.comwrote:
>On 10 abr, 13:36, biggio.cr...@gmail.com wrote:
>>Hi,
I've used the MM_SwapImage function from Dreamweaver to make a roll
over gallery for a photography website. The only problem is when I use
safari it changes the aspect ratio of the images.
Here's the link:http://www.lizethsantos.com/fineart/.../abstract.html
Broken link.
>>Any solutions? Any idea on modifying the function so I can pass it at
width variable?
Thanks
Peter

thanks
http://www.lizethsantos.com/fineart/.../abstract.html
Lizeth,
I went to your webpage and your webpage took forever to load. That's
unacceptable.

You've got more important issues to fix.

First, just stop slicing images.

MainSide.jpg
MainTopL.jpg
MainTopM.jpg
MainTopR.jpg
abstracttitle.jpg
etc, etc,etc

1- It's not unneeded, not necessary and
2- it increases the number of http requests, so, in the end, it slows
down the rendering in the browser and that, for the same amount of file
size (one image without being sliced)
3- by slicing images unneededlessly, you need more markup code to
position the sliced images: so, with a table, table rows, table cells,
the DOM tree increases also unneededlessly.
4- your table (table, table rows, table cells) are coded to be
overconstrained (width, height, colspan, rowspan attributes defined and
specified in many places or everywhere) too: that too slows down the
rendering because the parsing is more complex. Unneededlessly. Unnecessary.
5- By having coded more sliced images, more coded, more
over-constrained, increased DOM tree, you make the maintenance of your
webpage more complex, longer, more difficult to review/understand/figure
out by others, etc.

Just stop slicing images unless *_you know what you're doing_* and *_you
know you have to slice images_*.

Second, just stop using javascript functions that you do not understand.
Simple as that. I've never used any DW functions and I know they are not
efficient, not well written, not made to make the ordinary web author
understand how to best use it. I am absolutely convinced that a wide
majority of expert scripters in this discussion forum would not
recommend those DW functions.
Start from scratch. Ask for help on creating, doing *your* rollover
functions. Define your own functions instead of being dependent on DW.
Again, understand what you're doing.

Third,
at the very least, make your secondary windows all accessible.

function openWindow(x) {
popupWin = window.open(x, 'imagepop', 'width=380,height=560')
}
function openWindowWide(x) {
popupWin = window.open(x, 'imagepopwide', 'width=560,height=380')
}

I don't have a viewing area long enough to render a 560px high window as
I am forcing all of the toolbars on secondary windows. Your code makes
the secondary windows all non-resizable and without scrollbar(s) when I
will need a vertical one. Stop doing that and visit
Mozilla Developer Center: DOM:window.open
http://developer.mozilla.org/en/docs/DOM:window.open
for recommendable examples.

Gérard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs...your_Web_Pages
Apr 12 '07 #5
Gérard Talbot said the following on 4/12/2007 4:02 PM:

<snip>
Second, just stop using javascript functions that you do not understand.
Simple as that. I've never used any DW functions and I know they are not
efficient, not well written, not made to make the ordinary web author
understand how to best use it. I am absolutely convinced that a wide
majority of expert scripters in this discussion forum would not
recommend those DW functions.
For a simple rollover, the DW functions are way over kill and at that
they are needlessly inefficient at best and junk normally.
Start from scratch. Ask for help on creating, doing *your* rollover
functions. Define your own functions instead of being dependent on DW.
Again, understand what you're doing.
function swapImage(imgEl,imgSrc){
document.images[imgEl].src = imgSrc;
}

Starting point :)
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 12 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Adam | last post by:
Maybe this is a simple question, but what Arguments can be used with the familiar MM_swapImage? I can get it to work no problem, in this way: MM_swapImage('THE NAME OF OLD IMAGE...
1
by: Allen | last post by:
I am trying to add an additional photo/hyperlink to the company web site (I didn't create it) without any luck. The mouseover feature 'highlights' pics by swapping them with another pic using this...
14
by: DU | last post by:
According to a recent post, it seems that Konqueror 3.1+ and Safari 1.1 support CSS3 opacity style property under a proprietary name: "Support for the CSS3 opacity (using -khtml-opacity)...
4
by: Bernard | last post by:
Hi, I am suddenly getting Safari script errors with the following user agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8 In a...
4
by: Paul W | last post by:
Hi - can someone point me to info on the issues/resolutions of supporting the safari browser? To help me understand, if I was developing pages in say FrontPage, what attributes would I set for...
5
by: Bill Cohagan | last post by:
I'm having some serious difficulties with my ASP.Net 2.0 app rendering in Safari 2.0.3. The most immediate problem is that the menu control doesn't seem to work at all, particularly the use of...
34
by: Simon Wigzell | last post by:
document...focus() will scroll the form to move the specified text field into view on everything I have tried it with except Safari on the MAC. The form doesn't move. Any work around? Thanks.
21
by: Edward | last post by:
Hi All, I feel frustrated with one of my Customers who wants me to ensure that a dotnet web site I am building for them must be compatible to Apple's Safari browser! Safari is buggy and it...
1
by: davidb | last post by:
Hi, I'm trying to use the MM_SwapImage function with images of different aspect ratios but the function can't handle it when interpreted by Safari. I'm using Mac OSX 10.4. To see the problem in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.