Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with Rollovers 1

Status
Not open for further replies.

credo

Programmer
Jul 26, 2001
50
0
0
GB
I'm retrieveing some records from a db - for each record I'm displaying in the web page, I want a preview rollover icon which when clicked will open up a popup. Using IE5.5. the preview icon is a magnifying glass that raises off the page on rolling over..

I've got this working fine for one page :

but cannot get this working from the main page:

I've tried copying the relevant code from the working page to the non-working page to no joy.

The code is almost identical between the two pages - also when the non-working page is viewed in NS 4.7 or NS6.0 I noticed that when you rollover the very first preview icon, it makes the bottom record preview icon move to the "over" state ?? (Ignore the onMouseDown event in the working page - to start with I just want the rollover to work, then I will add the click Event).

working page HTML /JS :
<td width=&quot;49&quot; rowspan=&quot;2&quot; valign=&quot;top&quot; bgcolor=&quot;#DEE2F5&quot;><img src=&quot;images/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;><a href=&quot;javascript:void(0)&quot; onMouseOut=&quot;MM_swapImgRestore()&quot; onMouseOver=&quot;MM_swapImage('mag','','images/mag_over.gif',1)&quot;><img name=&quot;mag&quot; border=&quot;0&quot; src=&quot;images/mag_up.gif&quot; width=&quot;30&quot; height=&quot;30&quot; onMouseDown=&quot;MM_openBrWindow('<%=(rs_getCom.Fields.Item(&quot;preview_URL&quot;).Value)%>','Preview','width=500,height=500')&quot;></a></td>

non-working page HTML/JS :
<td valign=&quot;middle&quot; colspan=&quot;2&quot; rowspan=&quot;2&quot; bgcolor=&quot;#DEE2F5&quot;><img src=&quot;images/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;><a href=&quot;#&quot; onMouseOut=&quot;MM_swapImgRestore()&quot; onMouseOver=&quot;MM_swapImage('mag1','','images/mag_over.gif',1)&quot;><img name=&quot;mag1&quot; border=&quot;0&quot; src=&quot;images/mag_up.gif&quot; width=&quot;30&quot; height=&quot;30&quot;></a></td>

thanks in advance
 
If you have copied the code for each image then your images will all be called the same thing, so when you tell &quot;mag1&quot; to swap, the page doesn't know which one to swap. Every one of your images needs to be named separately:

[code<a href=&quot;#&quot; onMouseOut=&quot;MM_swapImgRestore()&quot; onMouseOver=&quot;MM_swapImage('mag<%=uniquenumber%>','','images/mag_over.gif',1)&quot;><img name=&quot;mag<%=uniquenumber%>&quot; border=&quot;0&quot; src=&quot;images/mag_up.gif&quot; width=&quot;30&quot; height=&quot;30&quot;></a>[/code]

You could do a lot worse than using the value of the id from your recordset for this.

By the way folks, it is comp_detail.asp, not comp_details.asp if you are getting a duff link.

Derren
[Mediocre talent - spread really thin]
 
thanks Derren, - your solution works - that's twice you've helped me I really appreciate it.

One final problem is that when clicking on a &quot;Preview&quot; link (as opposed to the magnifying glass) should open up a popup window (displaying a URL that is retrieved from the db).

In NS4.7 and IE 5.0 and IE5.5 it works ok - but for some reason not in Ns6.01.

<td valign=&quot;middle&quot; colspan=&quot;2&quot; rowspan=&quot;2&quot; bgcolor=&quot;#DEE2F5&quot; class=&quot;normal&quot;> <div align=&quot;center&quot;><a href=&quot;javascript:void(0)&quot; onClick=&quot;MM_openBrWindow('<%=(rs_getCom.Fields.Item(&quot;preview_URL&quot;).Value)%>','ComponentDetail','width=500,height=500')&quot;>Preview </a>:</div></td>

the function :
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

Any ideas ?









 
No problem - don't forget to mark the thread as helpful if you thikn it could be of use to someone else (and I can see this coming up again and again - I know I did it). As a casual flash user, you never know when you will need the help of other developers, so I always try to keep my Karma in credit!

Apart from dodgy links to the previews, my IE worked fine. Does NN6 open the browser window, or just do nothing? Derren
[Mediocre talent - spread really thin]
 
no problem - have marked the thread and anytime you require Flash help I'll be glad to assist.
Yes, I forgot to mention - only component 14 has a working URL - all the rest are dummy URLs'.

In NN6.01 -the pop-up opens but it is completley blank with just the NS6.0 title bar - there's no 404 or anything. Very odd.

I've pasted what the pop-up looks like here :
 
Hi Derrin,
Can you check again ? (my isp was down for a while). The link you put in your last post works for me - should be red triangle on a blue background.

I just rechecked the following browsers again - using test component 14 - clicking on preview link :
Ie 5.0., 5.5 and NN.4.7 - popup works showing red triangle on a blue background - but get a blank popup in Ns6.1 - it's as if in Ns6.1 the URL retrieved from the db is not being resolved.

Also for the component_detail.asp - clicking the preview link -same thing.
 
I am having the same problem with my browser: IE5.0 sp1, it is really struggling to load the page. There isn't some flash based problem with the file is there? Can you post any other flash files to test out?

I have had a funny like this using netscape, where a flash combo box that I rustled up will not work in netscape (??) but works a treat in IE. I thought that flash removed any browser dependency. Derren
[Mediocre talent - spread really thin]
 
Derren,
I figured it out and was just going to post - (you are right again!) - the browser pop-up will show blank if you do not have the latest Flash player plugin (6,0,23,0) in your browser.
The reason for this is that the .swf URL's retreived from the db contain Flash components which are a feature of Flash MX - and this was only released a month ago - to view Flash MX swf files that contain MX features (ie components) you need the Flash 6 player plugin.

My IE 5.0 and IE 5.5 (on different machines both have Flash player plugin 6 as I installed it). NS 4.7 I also installed the flash 6 player plugin on. However I remembered to not install Flash 6 player plugin on Ns6.1 for future testing. My Ns6.1 has the Flash 5 player plugin which is why it was showing a pop-up blank.

This site you've helped me with is a test site. For the live site there will of course be a simple detection system that points users to upgrade their plugin - 1-2 mins over 56k.
this url shows you which version you have

Thank you for you help again :)

(Worse talent - spread thinner)
 
Nice - it's always good to find out why things go wrong. How is flashMX? I haven't had time to look into it yet.

By the way, the star isn't coming up for the thread, did you confirm the star after you clicked the &quot;mark this post as helpful&quot; link?

Good luck with the site.

[fish] Derren
[Mediocre talent - spread really thin]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top