Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Safari: targeting frames with a javascript event does not work.

Reply
Thread Tools

Safari: targeting frames with a javascript event does not work.

 
 
Marc
Guest
Posts: n/a
 
      11-24-2003
The following code will work in Mac IE 5.1, but not in Safari 1.0
(v85). Anyone have any hints?

<!-- Code begins -->
<html>
<body>

<a href="text2.html" target="frameContent"
onMouseDown="alert('Hi.');">Put text2.html in frameContent</a>

<iframe width="200" height="200" src="text.html" frameborder="yes"
scrolling="yes" name="frameContent">

</body>
</html>
<!-- Code ends -->
 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      11-24-2003
Marc wrote:

> The following code will work in Mac IE 5.1, but not in Safari 1.0
> (v85). Anyone have any hints?


http://validator.w3.org/

> <iframe width="200" height="200" src="text.html" frameborder="yes"
> scrolling="yes" name="frameContent">


Where is </iframe>?

> </body>

--
David Dorward http://dorward.me.uk/
 
Reply With Quote
 
 
 
 
Marc
Guest
Posts: n/a
 
      11-25-2003
Thanks. That was clumsy of me to not include the closing iframe tag. I
also corrected any other errors that the validator caught. However, I
am still unable to get Safari to put 'text2.html' into the
'frameContent' target. Anyone else have solutions?


<!-- Code begins -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>iframe tester</title>
</head>
<body>

<a href="text2.html" target="frameContent"
onMouseDown="alert('Hi.');">Put text2.html in frameContent</a>

<iframe width="200" height="200" src="text.html" frameborder="1"
scrolling="yes" name="frameContent"></iframe>

</body>
</html>
<!-- Code ends -->
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
targeting a response.write to a section of a web page Stephen ASP .Net 3 08-26-2005 07:01 PM
Targeting a frame on page load Frances Valdes ASP .Net 1 10-06-2004 06:53 PM
java plugin targeting through javascript mark Javascript 0 09-04-2003 01:01 PM
targeting a window John HTML 1 08-08-2003 11:33 PM
need some help on browser targeting greg@gofothdesigns.com HTML 2 07-12-2003 11:18 AM



Advertisments