[Javascript] Object doesn't support this property or method

BEKIM BACAJ trojani2000 at hotmail.com
Wed Nov 20 13:55:40 CST 2002


Try this:
----------------------------------------------
------------------------------------------------
function blahbox() {
if (blahbox.src=="i_blahbox.cfm")){

//no need to call document object every time - call the object itself

  blahbox.src = "i_emoticons.cfm";
  btBlahBox.src = "images\\bt_blahbox.gif"
} else {
  blahbox.src = "i_blahbox.cfm";
  btBlahBox.src = "images\\bt_emoticon.gif"
}
}

and here's the call for it:

<a href="#"><img src="images\bt_emoticon.gif" alt="" name="btBlahBox" 
id="btBlahBox" width="18" height="19" border="0" onClick="blahbox();"></a>

and here's the iframe code:

<iframe src="i_blahbox.cfm" name="blahbox" id="blahbox" width="157" 
height="251" marginwidth="0" marginheight="0" frameborder="0"></iframe>
-------------------------------------------------
-------------------------------------------------
That should work!

Please see if the name attribute is still supported in ie5.5 and higher for 
the objects used here.

Cheers


>From: "Marcelo Simon" <grillo at lazzuri.com.br>
>Reply-To: javascript at LaTech.edu
>To: "[ listas ] Javascript" <javascript at LaTech.edu>
>Subject: [Javascript] Object doesn't support this property or method
>Date: Thu, 14 Nov 2002 04:00:25 -0200
>
>Hi,
>
>I have a link in a image that I want it to change the src for an iframe and 
>for the image itself, but I'm getting the "Object doesn't support this 
>property or method" message in IE ( and I'm only worried with this browser 
>5.0+ )
>
>Here's the code:
>
>function blahbox() {
>  if (document.blahbox.location.href.indexOf("i_blahbox") >= 0 ){
>   document.blahbox.location.href = "i_emoticons.cfm";
>   document.btBlahBox.src = "images/bt_blahbox.gif"
>  } else {
>   document.blahbox.location.href = "i_blahbox.cfm";
>   document.btBlahBox.src = "images/bt_emoticon.gif"
>  }
>}
>
>and here's the call for it:
>
><a href="#"><img src="images/bt_emoticon.gif" alt="" name="btBlahBox" 
>id="btBlahBox" width="18" height="19" border="0" onClick="blahbox();"></a>
>
>and here's the iframe code:
>
><iframe src="i_blahbox.cfm" name="blahbox" id="blahbox" width="157" 
>height="251" marginwidth="0" marginheight="0" frameborder="0"></iframe>
>
>Did this make what I'm trying to accomplish clear? I hope so !
>
>TIA
>Marcelo Simon


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail




More information about the Javascript mailing list