Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display image in apple dashboard widget

Status
Not open for further replies.

NathanHimes

Programmer
Sep 28, 2007
2
US
hey guys,

I am running into a problem with trying to display an image from a search in a widget.

I have a script that will open the image in a new window, but I need it to just show the image rather than open a browser and go to the page.
The images we need to use are on our internal site so if a number is put in it would just have to change the number in front of the .jpg.

The script I have is as follows:
__________________________________
window.onfocus = function () {
document.getElementById('search-input').focus();
}

function search (input)
{
var value = input.value;
if (value.length > 0)
{
value = encodeURIComponent (value);
var url = " + value +".jpg";
if (window.widget)
widget.openURL (url);
}
}

function keydown (event, input)
{
if (event.keyCode == 13) // enter or return
{
search (input);
}
}
________________________________________

Any help is appreciated.
Thanks
Nathan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top