Can anyone assist me with what I am trying to do with the following code (six different scenarios to try to make the functionality work correctly)?
I want to always (and ONLY) display in the status bar 'Symantec Corporation' whenever anyone mouses over (onMouseOver) my image or link OR when one clicks while holding the left mouse down (onClick) on the same image or link. Upon releasing the mouse (onMouseOut), the status bar should be 'blank'. I need the link to open in a new window via my function openWindow(URL) code.
What is happening in most of the six scenarios, is that when one clicks the link, either the function doesn't engage, but rather the <a href= takes effect instead OR that status bar shows 'javascript:openWindow('http://www.symantec.com/');' when one clicks while holding the left mouse down (onClick) on the image or link.
Additionally, for only the link, I need the CSS/style to show 'red' when one mouses over (onMouseOver) it and then change to 'blue' upon releasing the mouse (onMouseOut).
How about integrating 'style="cursor:hand"' into the code or perhaps setting some of the data via a <div> or <span> snippet? Code:
I am creating a training manual but i find using pictures slightly boring. I have created Shockwave/flash files showing in detail how to use certain things.
I have tried to embbed the shockwave file into powerpoint and it kind of works.
What i want is to create a link which opens the shockwave file in a new window, but just the shockwave file without any toolbars or anything. I noticed javascript files open in a new window which is ideal for me.
How do i do that? I have a powerpoint file and a shockwave file??
How can I "click" an existing link with javascript so that the referrer is being passed on? please dont answer with "location.href=..." cause that hides the referrer.
I have a form that I would like to get the values entered on the page and go to a new page in the same window. I can make the code work to open a new window, but I need it to open in the same window. Here is what I have:
I have a script that is working well to detect if the client has acrobat reader is installed or not. I can print out next to the PDF link if the user has or hasn't got the reader. My problem is that i want to call that function and print something out only if the user clicks on the link to see the PDF file. This is where i'm at at the mo
I have a popup window which is a slideshow of about 7 images. When the popup window loads, the first image is present and then the viewer can select next or previous to scroll through the rest of the images.
I'd like to use the same popup window at different points throughout the website and have the Virtual Tour (slideshow) open up at the appropriate photos. Meaning I'd like to control which picture the popup window opens up to, depending on where the user is in the site.
Does anyone know where I can find code that does this? I am somewhat familiar with Javascript but would like to find some ready-made code which accomplishes this.
will both show the javascript link on the browser status bar...of course you can use onmouseover to set the status bar text...but you need to do on all the link....a little over kill.
I have an XML document which lists some information about movies(Title, actor, etc.) I am using Javascript to pull that data and display it as html. Is it possible to create a link for each one of those titles that are pulled from the XML in my JS? Here is my code:
for (var i=0; movies.length > i; i++) { var Title = movies[i].getElementsByTagName("title"); var Actor = movies[i].getElementsByTagName("actor"); var Price = movies[i].getElementsByTagName("price"); results += i+1 + '. ' + ' "<span class="title"><a href="http://www.imdb.com">' + Title[0].firstChild.nodeValue + '</a></span>"' + ' starring <span class="actor">' + Actor[0].firstChild.nodeValue + '</span>' + ' and costs approximately $'+ Price[0].firstChild.nodeValue + "<br/>
I was wondering if I could change the text of a link with a JavaScript. I want to set it up with a JavaScript function so that when A link is clicked on, the text of that link changes and it points to a different function.
(Note that I have put / in above where there is really a just so that it shows up in the post). The link works fine with normal characters in the variable $name, and it works with single quotes in the varable, but not double quotes (the addslashes() escapes single and double quotes with a backslash). Why doesn't the link work with double quotes in the variable?
Code: <a href="#" onclick="window.location='http://YourSite.com'">click here</a> I want to make it so that it opens a new normal browser window just like target=_blank does.
I have some images that I want the user to be able to move around the page. So far, this script in the header allows me to do this: var ie=document.all; var nn6=document.getElementById&&!document.all; var isdrag=false; var x,y; var dobj; function movemouse(e){ if (isdrag){ dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x; dobj.style.top = nn6 ? ty + e.clientY - y : ty + event.clientY - y; return false; } }
function selectmouse(e) { var fobj = nn6 ? e.target : event.srcElement; var topelement = nn6 ? "HTML" : "BODY"; while (fobj.tagName != topelement && fobj.className != "dragme"){ fobj = nn6 ? fobj.parentNode : fobj.parentElement; }
if (fobj.className=="dragme"){ isdrag = true; dobj = fobj; tx = parseInt(dobj.style.left+0); ty = parseInt(dobj.style.top+0); x = nn6 ? e.clientX : event.clientX; y = nn6 ? e.clientY : event.clientY; document.onmousemove=movemouse; return false; }}
document.onmousedown=selectmouse; document.onmouseup=new Function("isdrag=false"); The body has this: <img src="images/balloons.gif" class="dragme">
Now, to be able to use this image as a link, I would have to find the displacement between the mousedown and mouseup coordinates. If the displacement is below say 10px, then the mouseup would bring them to another page. I also wanted to make it so that if the mouseup occurs in a certain area of the page, that the image would move itself to a certain spot.
I am looking for a script that fades Text (description above and below a banner Banner) with Banners and hyperlink. A mouseoverstop would be very nice too. Here's an example of one of my Friendsbanners I would like to fade (all together there a 5 of these Friends Banners <font face="verdana" font-weight="700" color="darkgreen">Some Topic above <p> </p><a href="[URL]" target="_blank"><img src="[URL]" WIDTH="200" /> </a> Some Topc below</center>
I'm trying to create a switch image code that will allow the new image to be a link as well. In the list item where you'll see ('blue.jpg') if I try to make this an anchor tag - it breaks the code.
<head> <script> function switch1(div) { if (document.getElementById('blue')) {
On sorting out a drag&drop script. I'm a bit of a rookie with programming, so I found this script somewhere and I managed to implement it in my code...unfortunately now I need to slightly modify the code.
I have this drag&drop script that moves some images around the screen, but I'd like to assign an event - document.getElementById("XXXXX").onclick = blablabla - to each of those images.
The problem is that, of course, every time I click on the image to drag it around, this activates the link. With a doubleclick event everything works smooth, however it's a solution I don't quite like.
I was thinking about a way to control the code so that while the image moves the link is somehow "not active", but if the user simply clicks without dragging then it activates the .onclick function
I have the following piece of code in the head section of my page, which is the actual code for dragging the elements
i am trying to add a Link dynamic to a and Image that i am creating dynamic too to a table, here is the code that i am using to add the image but i dont now how to add the link to the images.
Code: var cell6 = row.insertCell(5); var element6 = document.createElement("img");
Basically I have an application which generates HTML using VB dll's. This makes the code generated un-changeable as the dll's are not to me modified in any way. What I need to do is get hold of a image element so that I can switch its SRC to dynamically change the image. GetElementById is out as the nearest I can get to it is the <a> tag surrounding the <img> tag, so my question is what's the easiest and most bomb proof method of accessing this element.
I have over 100 images I would like to display on their own page, but link to them from an index page.Rather than have over 100 seperate pages can anyone think of a way to link to the same page but call the required image. This is an over simplification of what i'd like to do:
<a href = 'index.html' = 1.jpg></a> - Will open index.html and show 1.jpg. <a href = 'index.html' = 2.jpg></a> - Will open index.html and show 2.jpg.
I have a question and I think javascript is the way to go...So here's what im thinkingI have an image of half a quys face. When the mouse goes over it, the image should expand to reveal the whole face, when the image is clicked, it will act jst like a link.