473,387 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

making <div> a hyperlink

I've been given a flash banner and told to make it a hyperlink.

I tried this: <script type="text/javascript">
Document.getElementById("flashcontent").onclick = function(){
window.location='http://www.website.com'; }
</script>

but received an error stating that "Document" was undefined.

I also tried this:
<div class="linkdiv"
onclick="javascript:location='http://www.website.com'"
id="flashcontent"which makes the white space in the <diva hyperlink
that works but not the flash banner.

Sep 21 '06 #1
5 5505
Dave scribed:
>I've been given a flash banner and told to make it a hyperlink.

I tried this: <script type="text/javascript">
Document.getElementById("flashcontent").onclick = function(){
window.location='http://www.website.com'; }
</script>

but received an error stating that "Document" was undefined.

I also tried this:

<div class="linkdiv"
onclick="javascript:location='http://www.website.com'"
id="flashcontent"which makes the white space in the <diva hyperlink
that works but not the flash banner.
Is 'document' capitalized in js? I don't think so.

Also, I ran into a similar issue with Firefox and I had to use
window.document.... to resolve it.
--
Ed Jay (remove 'M' to respond by email)
Sep 21 '06 #2
Thanks, Ed. I changed 'D' to 'd' in document but the result is the
same. White space is hyperlinked. Flash banner is not. Added 'window'
before 'document' without any effect.
Ed Jay wrote:
Dave scribed:
I've been given a flash banner and told to make it a hyperlink.

I tried this: <script type="text/javascript">
Document.getElementById("flashcontent").onclick = function(){
window.location='http://www.website.com'; }
</script>

but received an error stating that "Document" was undefined.

I also tried this:

<div class="linkdiv"
onclick="javascript:location='http://www.website.com'"
id="flashcontent"which makes the white space in the <diva hyperlink
that works but not the flash banner.

Is 'document' capitalized in js? I don't think so.

Also, I ran into a similar issue with Firefox and I had to use
window.document.... to resolve it.
--
Ed Jay (remove 'M' to respond by email)
Sep 21 '06 #3
VK

Dave wrote:
I've been given a flash banner and told to make it a hyperlink.
I can be wrong (I'd like to be) but you may have to return the job back
- unless you can edit the Flash itself.

Flash movie is an event consumer by its own. It means that as soon as
mouse goes over it, it "disappears" for the document - all events are
trapped by Flash. So you can twist around to catch say mouseover, but
no way to know onclick.

AFAIK

Sep 21 '06 #4
I was afraid that might be the case. I told them to send me a .gif but
was also wondering if I can put a clear button over it (something else
I don't know how to do)?

VK wrote:
Dave wrote:
I've been given a flash banner and told to make it a hyperlink.

I can be wrong (I'd like to be) but you may have to return the job back
- unless you can edit the Flash itself.

Flash movie is an event consumer by its own. It means that as soon as
mouse goes over it, it "disappears" for the document - all events are
trapped by Flash. So you can twist around to catch say mouseover, but
no way to know onclick.

AFAIK
Sep 22 '06 #5

"Dave" <da********@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
>I was afraid that might be the case. I told them to send me a .gif but
was also wondering if I can put a clear button over it (something else
I don't know how to do)?

VK wrote:
>Dave wrote:
I've been given a flash banner and told to make it a hyperlink.

I can be wrong (I'd like to be) but you may have to return the job back
- unless you can edit the Flash itself.

Flash movie is an event consumer by its own. It means that as soon as
mouse goes over it, it "disappears" for the document - all events are
trapped by Flash. So you can twist around to catch say mouseover, but
no way to know onclick.

Maybe you can get an event from the active object into DOM.
Then you can do anything you wish..
For instance, another event consumer sort of like flash type
is X3D. In the tutorial at:

http://www.ajax3d.org/content.html

as a first step, it shows how they use DOM events
and interfaces built into the embedded object to generate
DOM events when certain events in the embedded object
are initiated.

All you need is a way for the active object to learn that the
host DOM wants to listen for certain 'internal' events and a
way to tell the host DOM 'external' script what to do when the
event happens.

So, if the object can know that it has a mouseover, which is
a sort of focus, and you can setup a listener and callback,
you may not have to change the object user code to get the
result.

But there must be some combination of html anchors, objects,
and divs that would give an unambigious result of a mouse action
in the space occupied by the active object.

Best VRegards,
Joe
>>
AFAIK

Sep 22 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to...
1
by: Philo | last post by:
How do I select all <div> tags except those which contain a <table> tag somewhere within them? Example XML: <********************** sample input ***********************> <txtSectionBody>...
3
by: Paul Thompson | last post by:
When I put a <div ...> inside a <table> specification, functionality is not there. When I put the <table> inside the <div> everything works. Why is that?
8
by: Daniel Hansen | last post by:
I know this must seem totally basic and stupid, but I cannot find any reference that describes how to control the spacing between <p>...</p> and <div>...</div> blocks. When I implement these on a...
8
by: slim | last post by:
hi again all, i am still working on the website as mentioned in earlier threads and have hit another snag... http://awash.demon.co.uk/index.php http://awash.demon.co.uk/vd.css the php is...
4
by: Bruce W...1 | last post by:
IE 6 supports the DOM for the most part. Am I missing something or is this absent from Visual Studio 2003? Does Web Matrix have it? You see, I'm trying to get Visual Studio and Dreamweaver MX...
3
by: Josef K. | last post by:
Asp.net generates the following html when producing RadioButton lists: <td><input id="RadioButtonList_3" type="radio" name="MyRadioButtonList" value="644"...
1
by: rynato | last post by:
I have a <spanof width X px and height Y px. I want to read the text of an article, which is stored in a mySQL table, and pass to that <spanonly just enough text to fit in it, along with a 'read...
8
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.