|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Multiple Confusing Image Maps, Mouseover and ASP
Here's the deal, I have a table, 2 columns by 2 rows. The top left Cell has an image in it that I want to map in 3 places. When you move your mouse over the image mapped area, 2 things happen.
1) Text pops-up in the bottom left cell 2) A new image pops-up in the top right cell. That works find and dandy. Here's the part I can't figured out... How can I image map each of the three images that pop up in the top right cell so if you move your mouse over them text pops up in the bottom right cell? I've tried putting the image map stuff in the javascript block... Didn't work I've tried (although I'm still learning) to place it in an ASP block. But when I did that, all I got was a page that wouldn't load. Here's the code I used: <% image = "<map name="FPMap3"> image = image & "<area shape="rect" coords="121, 181, 202, 275" image = image & "onmouseover="document.getElementById('123').innerHTML='<%=test%>'"> image = image & "<area shape="rect" coords="222, 53, 265, 101" image = image & "onmouseover="document.getElementById('123').innerHTML='<%=test2%>'"> image = image & "<area shape="rect" coords="0, 74, 101, 190" image = image & "onmouseover="document.getElementById('123').innerHTML='<%=test3%>'"></map> image = image & "<img src="pyramids.jpg" width="300" height="300" usemap="#FPMap3"> %> <area shape="polygon" coords="198, 274, [Image coordinate trucated]" onmouseover="document.getElementById('goodcutid').innerHTML='<%=test%>', document.getElementById('321').innerHTML='<%=image%>'"> Thoughts? Is this possible? Thank you for your help. |
|
#2
|
|||
|
|||
|
First thing, the code you posted has bad syntax.
Quotes are required to enclose a string like: PHP Code:
To use quotes inside a string, you must use double quotes, so for HTML attributes you would do like this: PHP Code:
You can't place <%%> inside a string, and definately can't place <%=%> inside a string so this PHP Code:
Should be: PHP Code:
And I think test is a reserved word or something, but I assume that is for example purposes. Try and work those issues out, and see if that helps. |
|
#3
|
|||
|
|||
|
Dumb question alert...
You have this listed as PHP... is this? It looks so similar to the ASP and java already in the code. The reason behind this is my lack of knowledge on what is needed to run PHP. I know our severs handle ASP, is there a compadability issue if this is indeed uniquely PHP code? Thank you for your help. I'm going to start working on this regardless, maybe my question won't even matter. |
|
#4
|
|||
|
|||
|
The code I posted is ASP code. The PHP is just a feature of the forum that allows us to post code that is obviously separated from text.
I guess I should have used this one instead. Code:
image = image & "onmouseover=""document.getElementById('123').innerHTML='"&test&"'"">"
Good luck Last edited by INF : November 17th, 2003 at 02:35 PM. |
|
#5
|
|||
|
|||
|
Right on target with my dumb question alert. Thank you for clearing that up for me. Now I'm stuck on getting the images to cycle on the right.
I've tried onmouseover="document.getElementById('goodcutid').innerHTML='<%=test%>'", "document.imagename.src=image1.src"> and onmouseover="document.getElementById('goodcutid').innerHTML='<%=test%>'", "document.getElementById('123').innerHTML='<%=image1%>'"> but neither seem to working, btw, the javascript for the first one is: <SCRIPT LANGUAGE="JAVASCRIPT"> if (document.images) { image1 = new Image image2 = new Image image3 = new Image image1.src = "<%=image3%>" image2.src = "<%=image2%>" image3.src = "<%=image1%>" } </SCRIPT> With the asp part (trucated, just to show how its setup) <% image1 = "<map name=""FPMap1"">" image1 = image1 & "<area href=""acey8212.jpg"" shape=""polygon"" coords=""CORDS REPLACED TO SAVE SPACE" image1 = image1 & "mouseover=""document.getElementById('123').innerHTML='"&test&"'"">" ..... %> I no longer get ASP error messages in explorer, those all seemed to be fixed (even my High School English teacher who was a stickler for citing sources never had us use that many "s ;-p ) Again, thank you for your help INF, I'm beginning to think what I want to do is actually possible. |
|
#6
|
|||
|
|||
|
one more quick thing... I didn't change
('goodcutid').innerHTML='<%=test%>'" Because it works in both IE 6.01 and Netscape 7.01 when I test it. |
|
#7
|
|||
|
|||
|
Anyone? Am I doing something wrong? Is this not possible? Is there something else I should be doing instead?
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Multiple Confusing Image Maps, Mouseover and ASP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|