NathanHimes
Programmer
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
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