Graphical Captions Over HTML Elements

Feb 4, 2005

I got this javascript widget finished the other day. It's called BoxOver and allows floating captions over HTML elements, similar to overlib but uses less CPU and is much smaller (<10kb).
Would be super keen to hear any comments/criticisms on it. Also if anyone has any ideas for changes that would be cool too....

View 19 Replies


ADVERTISEMENT

Image Gallery Captions - Possible To Use HTML In Description Area

Aug 20, 2010

I've got a simple javascript image gallery I'm using, but I was wondering if it would be possible to use HTML in the description area. Basically I want to be able to create paragraphs, bold text, and links in the description area. Is it possible? Here's what I'm using:

<script type="text/javascript" language="javascript">
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder')
.src = whichpic.href;
if (whichpic.title) {
document.getElementById('desc')
.childNodes[0].nodeValue = whichpic.title;
} else {
document.getElementById('desc')
.childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
}
return false;
} else {
return true;
}}
</script>

Then the markup:
<img id="placeholder" src="images/twoBottles.jpg" alt="" /> (Where the image appears)
<p id="desc">Choose an image to begin</p> (Where the image descriptions appear)
<a onclick="return showPic(this)" href="images/condiments.jpg" title="The description which in some cases is 2 or 3 paragraphs long and I would like to format somehow">two bottles</a> (clicking this text opens that picture in the image area).

View 4 Replies View Related

Graphical Checkboxes/Radiobuttons

Jun 29, 2003

As i'm trying to find out how to get a graphical scrollbar to work, i decided that checkboxes and radio buttons shouldn't be the default, as css won't change their colours so does anyone know how to do these using images for Unchecked and Checked etc. Code:

but it uses external files and i couldnt get it to work on my site even with those. If they have to be there thats no problem but is someone able to help me get them working on a seperate site or another route to achieve the same end result?

View 12 Replies View Related

Text Boxes In Graphical View?

Oct 22, 2011

I am doing a web development project.I have a product page which has 2 buttons. By pressing one button, a text box gets displayed and the user types in the value and after saving it the text box should disappear. When the user clicks the button again, the text box gets displayed and the user can type a new value(like text1, text2...).

There is second button, when it is clicked it displays the text box with the value that the user typed in the text boxes(text1,text2...). when we click the second button, it should display text1, text2... in a graphical view and the user can edit or delete the text boxes and rearrange the text boxes and save the online work in his webpage for future use.

View 5 Replies View Related

Converting HTML Elements Stored Within XML To Usage Js Elements?

Jun 3, 2010

I have HTML tags stored in XML. I want to be able to use these HTML elements with Javascript, just as you can with elements in document.body. How can it be done? (And don't try and tell me I should use server-side because I have written it all for Javascript and the project is nearly complete minus this and there are practical reasons for not doing this server-side. After all, anything is possible with Javascript!)

Let me explain:

- I have HTML templates such as this [URL]

- I want javascript to populate these templates then add them to my page

- The only way I know javascript can get this kind of data is by parsing XML

- I want to parse the XML then be able to use the HTML elements just like those in document.body

- As far as I'm aware, XML is the only good way of storing data for javascript. I don't want to store it in javascript variables (too much multiline data with " and '). Nor do I want to build it using document.createElement("div")... etc

As someone not yet with any experience in computer science etc, please ignore my poor terminology! However, I'm not a beginner when it comes to javascript.

Here's the script concerned but I doubt it'll help you understand my problem: [URL]

View 6 Replies View Related

Dynamically Create Graphical Line Between Text Boxes?

Nov 1, 2011

I am doing a website project and in that currently I am designing a product page. I have to design add values to text boxes and drag and drop the text boxes in the workspace and delete the text boxes the user does not want and have to draw a graphical line between the text boxes which are in order.I have designed and coded everything except the graphical line part.

I am a learner in javascript and Can we draw a graphical line dynamically between the text boxes in the webpage? If we can draw, can anyone let me know the tutorial for that so that I can learn and start coding as I have to submit that project soon.

View 1 Replies View Related

Create Graphical Line Dynamically Between Text Boxes?

Nov 1, 2011

I am doing a website project and in that currently I am designing a product page. I have to design add values to text boxes and drag and drop the text boxes in the workspace and delete the text boxes the user does not want and have to draw a graphical line between the text boxes which are in order.

I have designed and coded everything except the graphical line part. I am a learner in javascript and Can we draw a graphical line dynamically between the text boxes in the webpage? If we can draw, can anyone let me know the tutorial for that so that I can learn and start coding as I have to submit that project soon.

View 2 Replies View Related

HTML Elements And Events Using E4x In FF1.5

Apr 22, 2006

I have been trying to do the following. Using JS I want to create an
input element (text box) and attach a event listener. I have done in
in two different ways. The first is using xml elements directly (as in
e4x) and the second using the dom method createElement (which is much
clunkier to write). I'd prefer the former. I've included a stripped
down example below.

It appears that when creating an input element using the line:

var inputBox = <input type="text" size="30" />

that it does not have the same properties as when it is created with:

var inputBox2 = document.createElement("input");

because when an event listener is attached using addEventListener, an
error is generated on the first, but not the second.

My thoughts on this are either
1. The namespace for the input element is not correct and whether input
can have a listener attached. However, my guess is that it would not
show up in the first div box. Code:

View 4 Replies View Related

Ordering The HTML Elements?

Sep 2, 2010

check the following piece of code:

<html>
<head>
</head>

[code]....

I am trying to get <p id="p2">Test1</p> above <p id="p1">Test2</p> using javaScript only.

View 4 Replies View Related

Add Captions To A Slide Show?

Jun 9, 2005

Whats the easies way to add captions to a slide show.

I have the basic slide show format with images in an array and having them get cycled through via a function like chgSlide(-1) or chgSlide(1).

I can' easily add the captions to an array. I'm not sure how to print the captions on the page. I could use a text box but thats lame.

How could I print these on the page as each image is updated in the slide show?

View 8 Replies View Related

Add Captions To OnMouserover Slideshow?

Jul 17, 2010

I need to add different captions for each image of my onmouseover gallery. The way this gallery works is when the mouse goes over the text the image on the right changes. What should I add to my javascript code? This is the code I put in the head:

<script>
/*Rollover effect on different image script-
By JavaScript Kit (http://javascriptkit.com)
Over 200+ free scripts here!

[Code]....

View 4 Replies View Related

Add Captions To Simple Slideshow?

Aug 2, 2010

I'd like to add captions to this this simple JavaScript slideshow. I have looked and looked and can't find one that doesn't use tables for the captions. I'd really like to stick to <divs> if possible.

Code JavaScript:
<script language="JavaScript">
var i = 0;
var path = new Array();

[Code]....

View 4 Replies View Related

Hiding HTML Elements Without Using Javascript

Jan 17, 2006

Here's my situation:

1. I have a web browser component that does not support Javascript
(well it does, but we've disabled it)
2. I have to display some HTML in it, where the user has a link titled
"Hide|Show Options" that can hide/show a particular section of the
HTML.

I have not found a way to achieve it without using Javascript or any
other scripting language.

Is it possible to do this using pure plain HTML?

View 3 Replies View Related

Finding Out Position Of Html Elements?

Oct 5, 2006

Is there a possibility to find out the coordinates, relative to the whole
screen, or at least relative to the browsewindow, where an element ( e.g. link or
picture ) begins or ends?

View 2 Replies View Related

List All HTML Elements In Document

Nov 9, 2006

I'm looking for an alternate way to document.all to list all HTML-elements on a webpage.

I'm trying to get all IDs on a page that starts with specific letters,

ie: <div class='classname' id='MEIT_Start'.....

I wan't to build an array of items starting with 'MEIT_'

I have tried to use getElementByID but no succes...

View 2 Replies View Related

JQuery :: Html() Not Registering New Elements In The DOM?

May 11, 2010

This may be a repeat post, but I can't seem to find the answer in these forums. Here is the question: I have a div with id "someDiv". I am obtaining an HTML string via XHR and intend to insert it in the DIV. I use .html(theHtmlString) and it renders just fine. But the newly inserted elements are not in the DOM - either by name or id. How do I register them in jQuery?

View 2 Replies View Related

Using Output For HTML Elements Outside Canvas

Apr 7, 2009

Before the canvas tag you had to write a script to make a gradient for html element backgrounds. Now you can use canvas and it's as easy as ... well messing with canvas. I have this script. At one point I had the gradient img objects resizing so the gradient would not get skewed. it was simple. just set the height% at the opposite ratio of the canvas width/height. But I went to make some changes and the next thing i knew that no longer worked. I don't remember how I did it!! I'm going to have to start over if I can't figure it out. Here's the script. Canvas only.

I haven't adapted with excanvas for IE yet, but that's coming when I can figure out how I had the thing working right. It's a css issue. I had thought I put the img objects in divs that were sized and positioned and then set the images to width 100% height= 100%*((canvas.width-canvas.height)/canvas.width) So in my example, the canvas was 100 x 30 and the factor is 7 so it would resize the image 700% and the height would grow by the relative amount to the setting I had it. I'll try to figure it out, but there's the script working somewhat. I want to figure out a way to resize the img objects when the user resizes the page, but I want the img to always maintain aspect ratio. [URL]

<script>
/*ORIGINAL SCRIPT FOUND AT [URL]*/
window.onload = function () {
var canvas = document.getElementById('c');
var ctx = canvas.getContext('2d');
var g = ctx.createLinearGradient(0, 0, 100, 50);
g.addColorStop(0, 'rgba(255, 255, 0, 0.5)');
g.addColorStop(0.5, '#0ff');
g.addColorStop(1, '#00f');
ctx.fillStyle = g;
ctx.fillRect(0, 0, 100, 50);
var data = canvas.toDataURL();
document.getElementById('i').src = data;
document.getElementById('EIMG').src = data;

var canvas2 = document.getElementById('c2');
var ctx2 = canvas2.getContext('2d');
var g2 = ctx2.createLinearGradient(0, 0, 100, 50);
g2.addColorStop(0, 'rgba(255, 0, 255, 0.5)');
g2.addColorStop(0.5, '#0ff');
g2.addColorStop(1, '#00f');
ctx2.fillStyle = g2;
ctx2.fillRect(0, 0, 100, 50);
var data2 = canvas2.toDataURL();
document.getElementById('i2').src = data2;
document.getElementById('DIMG').src = data2; .....

View 3 Replies View Related

Best Way To Hide And Unhide HTML Elements

Jan 27, 2011

I have a HTML document with form. The form has several radio buttons. I want different elements of HTML (including <input> elements) to appear when each radio button is selected. Also, it is intended to show only those elements for a specific radio button. For example, if i select RB1, it shows me element div 1 and hides all others. If i select RB2, it hides element div 1 and shows element div 2, et cetera. So far it works fine with .style.visibility = 'hidden' and 'block'. Now, here comes the problem - each element appears below the previous element, they appear as they are in the HTML, no matter if i show the previous one. It looks pretty bad, because element positions are jumping as i select different radio buttons. How do i keep them in the same level, at the same position?

View 3 Replies View Related

Ticker Printing Out HTML Elements?

Apr 10, 2009

The following is a JS ticker.It works well, but I can't figure out why the text in italic tags is being printed with the tags, instead of becoming italicized.example is here:

[URL]

Code:

<div>
<span id="tick"><a href="#"> </a></span><span id="cursor"><img src="http://www.sposa.com/images/feedicon.gif" border="0" alt="_" height="10" width="8" /></span>
<script language="javascript">

[code]....

View 2 Replies View Related

Dynamic Add/Remove HTML Elements?

Dec 27, 2010

I am writing a javascript method to add/remove HTML elements using Javascript.

I use cloneNode to clone the element.

Following is the code

Code:
<HTML>
<HEAD>
<TITLE>Dynamically add Textbox, Radio, Button in html Form using JavaScript</TITLE>
<SCRIPT language="javascript">

[Code].....

View 4 Replies View Related

Best Way To Store Data In HTML Elements

Sep 30, 2011

I've gone back and forth on the best way to store data in HTML elements which is used to support JavaScript. For instance, I might have a bunch of rows each associated with a SQL ID, and upon clicking the delete element, want to grab the id, and send it to the server. I've successfully used the following three solutions, but would like to standardize on just the best.

Option 1 is technically valid, but seems excessive. Option 2 will work fine, but is considered by some as bad practice. Option 3 requires the extra step of splitting the ID from some identifier string, and care not to have the same record twice on the page.

HTML Code:

View 10 Replies View Related

Looping Through HTML (or INFRAGISTICS) Elements?

Dec 15, 2009

I've lately stepped up a little problem with one of my personal projects that i am working. I'm writing an aspx webpage, which includes web user controls inside it.

The webuser controls are within a web form (id=form1 runat=server) which resides in the

main.aspx page.

1. First of all, is there a way to find a SPECIFIC control inside the webuser control (ascx)

using Javascript in the main.aspx?

2. If not (which i think it is), which is the best way to do it? The snippet i tried was this:

[Code]...

View 2 Replies View Related

Creating & Appending Html Elements

Jun 29, 2009

Why won't this show the time in my div?

Code:
<script type="text/javscript" src="jquery-1.3.2.js"></script>
<script type="text/javascript">
<!--
function doItAll(){
var a_p = "";
var d = new Date();
[Code]...

View 1 Replies View Related

BoxOver - Easy To Use Floating Captions

Jul 23, 2005

I just finished developing a javascipt component allowing floating
captions to appear over HTML elements....

View 3 Replies View Related

JQuery :: CrossSlide Plugin With Captions?

Mar 22, 2010

I have added the crossslide plugin to show a series of images, I have a couple of image that are too big for the area for these images so the crossslide plugin seems like an excellent option to pan thru images. Crossslide does not support captions though, and captions are absolutely necessary. To get it working for now I have used the cycle plugin for the captions, as I was not able to modify the crossslide plugin to fade captions. But of course, the timing of images changing and captions changing is not exact of eventually they don't match up. Not good.I was able to get the crossslide plugin to show the captions by modifying the plugin code in a small way.On line ~223 of the plugin i

modified this:elm = jQuery(format('<img src="{0}"/>', p.src));
to
elm = jQuery(format('<img src="{0}"/><div class="caption">{1}</div>', p.src, p.caption));

[code]....

View 1 Replies View Related

JQuery :: Multiple Captions For One Image?

Feb 4, 2011

I have been using Flash to create a slide show that starts with a single image. Then the image caption slides up from the bottom followed by a longer description coming in from the right side of the image (which includes links in the text). The description and caption then slide away, and a new image is transitioned into the old image's place. Is it possible to create something like this with jQuery? The s3slider jQuery plugin is very similar to what I'm looking for, but I can't seem to get two captions to appear over the same image.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved