Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 15th, 2009, 07:14 PM
Authorized User
 
Join Date: Apr 2009
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default Not sure if can be done with js...

Good morning
I have a drop down boxes with 3 variables (day month year)...On click finds the date you selected and loads the appropriate image i have in my server (ie day/month/year.jpeg)...Ok so far...but is it possible to load an other image with correspondes to the same date but from an other server ....

So in my page, when you click the desired date, pull an image from an other site (note mine) corresponding to the selected date..
I hope tha you understand what i am talking about
  #2 (permalink)  
Old July 16th, 2009, 05:25 PM
Friend of Wrox
Points: 894, Level: 11
Points: 894, Level: 11 Points: 894, Level: 11 Points: 894, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: London, , United Kingdom.
Posts: 166
Thanks: 2
Thanked 33 Times in 33 Posts
Default

Hi

I assume you are just using javascript to set the src of an image to a picture on your server, along the lines of:
Code:
document.getElementById('myimage').src = 'images/' + dateEntered + '.jpg';
If you want to show the image from another site, you simply need to put the full url when you set the src:
Code:
document.getElementById('myimage').src = 'http://www.anothersite.com/images/' + dateEntered + '.jpg';
Phil


Similar Threads
Thread Thread Starter Forum Replies Last Post
To include a js file into another js file jdang67 Javascript 4 February 28th, 2008 03:32 AM
convert js to vs. rupen Other Programming Languages 0 December 26th, 2006 06:57 AM
suggestions3a.js shookim Ajax 2 February 8th, 2006 03:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.