ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 14th, 2003, 01:40 PM
jtenneson jtenneson is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 30 jtenneson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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.

Reply With Quote
  #2  
Old November 15th, 2003, 02:21 AM
INF INF is offline
Standards User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 146 INF User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 4 sec
Reputation Power: 6
First thing, the code you posted has bad syntax.
Quotes are required to enclose a string like:
PHP Code:
 image "test" 


To use quotes inside a string, you must use double quotes, so for HTML attributes you would do like this:
PHP Code:
 image "<map name=""FPMap3"">" 


You can't place <%%> inside a string, and definately can't place <%=%> inside a string so this
PHP Code:
 image image "onmouseover="document.getElementById('123').innerHTML='<%=test%>'"> 

Should be:
PHP Code:
 image image "onmouseover=""document.getElementById('123').innerHTML='"&test&"'"">" 

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.

Reply With Quote
  #3  
Old November 17th, 2003, 11:27 AM
jtenneson jtenneson is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 30 jtenneson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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.

Reply With Quote
  #4  
Old November 17th, 2003, 02:32 PM
INF INF is offline
Standards User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 146 INF User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 4 sec
Reputation Power: 6
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.

Reply With Quote
  #5  
Old November 17th, 2003, 05:48 PM
jtenneson jtenneson is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 30 jtenneson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 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.

Reply With Quote
  #6  
Old November 17th, 2003, 05:54 PM
jtenneson jtenneson is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 30 jtenneson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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.

Reply With Quote
  #7  
Old November 20th, 2003, 10:48 AM
jtenneson jtenneson is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 30 jtenneson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Anyone? Am I doing something wrong? Is this not possible? Is there something else I should be doing instead?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Multiple Confusing Image Maps, Mouseover and ASP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT