473,396 Members | 1,734 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,396 software developers and data experts.

How to open a site on click of an image

274 100+
I have designed a gallery using XML FILE. File uploads the thumbnails and displays the big image on click of the image. I wan to open a site on click of the bigger image. Can someone help me how I can do that?
here is code:
Choped:

Expand|Select|Wrap|Line Numbers
  1. ......
  2. function callFullImage(myNumber) {   // call full image once the thumb is clicked
  3.  
  4.     myURL = myImages[myNumber].attributes.full_url; // name of the image to be opned
  5.     myTitle = myImages[myNumber].attributes.title;  // name of the title
  6.     mySend = myImages[myNumber].attributes.url;    // Site to re-direct
  7.  
  8.     _root.createEmptyMovieClip("fullImage_mc",_root.getNextHighestDepth());
  9.     fullImage_mc._x = _root.full_x; //position of the image along x-axis
  10.     fullImage_mc._y = _root.full_y;
  11.  
  12.     var fullClipLoader = new MovieClipLoader();
  13.     var fullPreloader = new Object();
  14.     fullClipLoader.addListener(fullPreloader);
  15.  
  16.     fullPreloader.onLoadStart = function(target) {
  17.         target.createTextField("my_txt",fullImage_mc.getNextHighestDepth,0,0,200,20);
  18.         target.my_txt.selectable = false;
  19.     };
  20.  
  21.     fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
  22.         target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
  23.     };
  24.  
  25.     fullPreloader.onLoadComplete = function(target) {
  26.         new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
  27.         target.my_txt.text = myTitle;
  28.         target.
  29.     };
  30.  
  31.     fullClipLoader.loadClip("full_images/"+myURL,fullImage_mc); // display image with specefied dimensions 
  32.  
  33.  
  34. }
  35. ......
Expand|Select|Wrap|Line Numbers
  1. Code from XML file
  2. <gallery thumb_width="120" thumb_height="126" gallery_width="400" gallery_height="126" gallery_x="50" gallery_y="450" full_x="130" full_y="20">
  3. <image thumb_url="mahindra.jpg" full_url="mahindra.jpg" title="" url = "http://www.Google.com.com" />
  4. <image thumb_url="ganpati.jpg" full_url="ganpati.jpg" title="" url = "http://www.yahoo.com" />
  5. </gallery>
Jul 10 '08 #1
1 2421
creative1
274 100+
I furured out how it would work.
here is what I played with
Expand|Select|Wrap|Line Numbers
  1. target.onRelease = function() {
  2.                 getURL(mySend);  // here goes where to go
  3.             };
Now the issue is when I try to embedd this code in html. It does not open the site. and does nothing. if I try it with
http://google.com
or
http://www.google.com
it does not responds at all.
however if Itry like this

google.com
I get error that says address is invalid.
any help?
Jul 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Merlin | last post by:
Hi there, I have a problem with opening new windows with JS. If the webpage did not complete loading due to any reason a click on a link which is supposed to open a small new other window loads...
18
by: Wladimir Borsov | last post by:
Inside a html page (more precicesly inside a JSP page) I defined a button. When the user clicks this button a second browser window should pop up und load the passed URL. I coded <img...
7
by: Merlin | last post by:
Hi there, I have a serious problem with opening a new window with the help of JavaScript. The problem only occures with Firefox. Once you click on the item which fires up the open function, the...
6
by: optxx | last post by:
would like to burn and distribue a proprietary auto executing CD containing a slideshow and have it then open a website. Is this possible? If so, how? Thanks, Walt
5
by: Miguel Dias Moura | last post by:
Hello, i have an image with the following code: <img src="image/panel.gif" width="20" height="80" onClick="fnLoadNewWindow('http://www.google.com');"> When i click the image the Javascript...
6
by: qysbc | last post by:
I have a web page and there is a link to open a TIFF file. The way I do it is to have the server code open a binary stream, set the content type to "image/tiff" and call Response.BinaryWrite. On...
0
by: thomas | last post by:
I found John Viescas's book "Access2003 Inside and Out" most helpful especially the section on Data Access Pages, and as such I have successfully launched a Intranet Web site whereby 4 remote sites...
0
by: Craig | last post by:
Hi there, I'm trying to open a 256-colour windows BMP and a 24-bit windows BMP with PIL usiing the following command: Image.open("image.bmp") When I try and open the 24-bit BMP the error I...
3
by: bfiser | last post by:
Good morning everyone. I have an issue with a page I developed using ASP. On my page I have active (or is it dynamic) hyperlinks to photos of employees based on their employee number. When I...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.