dirienzoj
08-21-2002, 06:36 PM
HELP!
I want to put that trendy jscript warp feature on my page. I want to use it in a way that allows different text to be linked to different display areas.
It is for a real estate site that i am working on and i will have multiple listings in a table setting, with people able to pass their cursor over the words bathroom, kitchen, living room etc and see an image appear next to the listing - with each listing in the table having the same kind of function.
the script i have now keep displaying all my links in one location - HOW TO I TELL THE LINKS FOR ONE LISTING TO DISPLAY IN THE FIELD NEXT TO THAT LISTING?
Here is the code - any help would be MOST appreciated.
cheers,
john
SCRIPT FOLLOWS>>>>>>>>>>
THIS IS IN THE HEAD
<script>
function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}
function warp(){
window.location=gotolink
}
</script>
<script language="JavaScript1.1">
var myimages=new Array()
var gotolink="#"
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
preloadimages("images/20091kit.jpg","images/20091lr.jpg","images/20091bath.jpg","images/20091out.jpg","images/20048bath.jpg","images/20048out.jpg","images/20085kit.jpg","images/20085garden.jpg")
</script>
THIS IS IN THE BODY WHERE I WANT THE IMAGES TO APPEAR WHEN "WARP" is ACTIVATED
<a "javascript:warp()"><img src="images/20048bath.jpg" name="targetimage1" border=0></a>
THIS IS HOW I LINK TEXT TO IMAGES
<a onMouseOver="changeimage(myimages[0])">Kichen</a></font></b></td>
I want to put that trendy jscript warp feature on my page. I want to use it in a way that allows different text to be linked to different display areas.
It is for a real estate site that i am working on and i will have multiple listings in a table setting, with people able to pass their cursor over the words bathroom, kitchen, living room etc and see an image appear next to the listing - with each listing in the table having the same kind of function.
the script i have now keep displaying all my links in one location - HOW TO I TELL THE LINKS FOR ONE LISTING TO DISPLAY IN THE FIELD NEXT TO THAT LISTING?
Here is the code - any help would be MOST appreciated.
cheers,
john
SCRIPT FOLLOWS>>>>>>>>>>
THIS IS IN THE HEAD
<script>
function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}
function warp(){
window.location=gotolink
}
</script>
<script language="JavaScript1.1">
var myimages=new Array()
var gotolink="#"
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
preloadimages("images/20091kit.jpg","images/20091lr.jpg","images/20091bath.jpg","images/20091out.jpg","images/20048bath.jpg","images/20048out.jpg","images/20085kit.jpg","images/20085garden.jpg")
</script>
THIS IS IN THE BODY WHERE I WANT THE IMAGES TO APPEAR WHEN "WARP" is ACTIVATED
<a "javascript:warp()"><img src="images/20048bath.jpg" name="targetimage1" border=0></a>
THIS IS HOW I LINK TEXT TO IMAGES
<a onMouseOver="changeimage(myimages[0])">Kichen</a></font></b></td>