Open Tech Support
Open 

Tech Support Community
Back to HomeCommunityReviewsGuidesDownloadsLinkageMarketplaceContact Us

 »  Forum Navigation

Home
Post a Question
About Our Site
Support Our Site

What is this site?
Who are we?

Tolitz.Com - The Cynic Eye of the Third World Guy

Enhanced with Snapshots

 

 »  Advertisement


Go Back   Open Tech Support Community > SUPPORT FORUMS > Internet




Reply

 

LinkBack Thread Tools
Old 06-27-2008, 09:48 PM   #1 (permalink)

Learning From My Mistakes
 
newman55's Avatar
 
Join Date: Sep 2003
Location: Miami, FL
Posts: 623


problems with my javascript

I am working on a website that has three javascript functions: one to make a random banner appear for each page, one to make an image gallery where thee are small thumbnails of images and a bigger box that the clicked image appears in, and a credits function where a transparent image appears over any image that the mouse is over which contains the dimensions, file size, and a clickable link to a website where the image came from. the transparent images with its contents disappears when the mouse is off the image. GETTING TO THE POINT (im not yelling, the capped text is just to direct those, who dont want to hear the previous text, to the main point of this question) I am having trouble with my credits with getting the link to work. Here is my script for the credits:



function showCredits(credits_index, parent_div) {
if (!document.getElementById("credits")) {




var dimensions = Array("397x288", "360x480", "360x480", "250x250", "250x250", "250x250", "400x265", "400x265");
var file_size = Array("214kb", "326kb", "326kb", "113kb", "92.2kb", "141kb", "156kb", "186kb");
var links = Array("www.sxc.hu", "www.ratemyscreensaver.com", "www.nationalgeographic.com", "www.flickr.com", "www.fruitsstar.com", "www.artistregister.com", "www.wandel.ca", "www.elephants.com");

var credits_div = document.createElement("div");
credits_div.setAttribute("id", "credits");

var dimensions_p = document.createElement("p");
var file_size_p = document.createElement("p");
var links_p = document.createElement("p");
var links_p_a = document.createElement("a");

var dimensions_p_text_node = document.createTextNode(dimensions[credits_index]);
dimensions_p.appendChild(dimensions_p_text_node);

var file_size_p_text_node = document.createTextNode(file_size[credits_index]);
file_size_p.appendChild(file_size_p_text_node);

var links_p_text_node = document.createTextNode(links[credits_index]);
links_p.appendChild(links_p_text_node);

credits_div.appendChild(dimensions_p);
credits_div.appendChild(file_size_p);
credits_div.appendChild(links_p);
credits_div.appendChild(links_p_a);
parent_div.appendChild(credits_div);
}
}

function hideCredits() {
if (document.getElementById("credits")) {
document.getElementById("credits").parentNode.removeChild(document.getElementById("credits"));
}
}

some notes: the credits id is defined in css where the transparent images is placed in.

p.s. it will be easier t o view the script if you copy and paste the text to MSword or to a text document.

Any answers are greatly appreciatwed by me.

-----------------------------
Lets Go Heat!!!

http://www.imagehosting.com/out.php/i350133_viper2.jpg
newman55 is offline   Reply With Quote
Sponsored Links
Old 06-28-2008, 04:47 PM   #2 (permalink)

Learning From My Mistakes
 
newman55's Avatar
 
Join Date: Sep 2003
Location: Miami, FL
Posts: 623


Re: problems with my javascript

i still got no clue as i have researched this kind of script several times

-----------------------------
Lets Go Heat!!!

http://www.imagehosting.com/out.php/i350133_viper2.jpg
newman55 is offline   Reply With Quote
Old 07-02-2008, 09:46 AM   #3 (permalink)

Learning From My Mistakes
 
newman55's Avatar
 
Join Date: Sep 2003
Location: Miami, FL
Posts: 623


Re: problems with my javascript

nevermind, this is not the proper forums site for me to be posting a question such as this.

-----------------------------
Lets Go Heat!!!

http://www.imagehosting.com/out.php/i350133_viper2.jpg
newman55 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools


Similar Threads

Thread Thread Starter Forum Replies Last Post
Patching Installation/Frozen Throne Install Problems darkfury22 PC Gaming 1 12-15-2005 03:20 PM
Javascript problems with IE6 in WinXP The-AoD Software 3 10-09-2002 02:03 AM







Powered by vBulletin® Version 3.8.2. Copyright © 2000-2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2
Copyright 2000-2008 Open Tech Support.  All Rights Reserved.  Site Design and Development by Tolitz Rosel.