Forum Home
Press F1
 
Thread ID: 14978 2002-01-24 20:40:00 URLs on Active Desktop Guest (0) Press F1
Post ID Timestamp Content User
32705 2002-01-24 20:40:00 I've succeeded in creating an active desktop with favourite links, a Google search box, etc. The only other thing I REALLY want on there is the ability to type any website URL into a box and click on a GO button to take me directly to the site without having to open IE first. The only thing I've seen that's similar is the XtraMSN 'We can't find...' page (search.xtramsn.co.nz), but I couldn't get it to work on my desktop.
Does anyone know of a bit of code that would do this job?
Guest (0)
32706 2002-01-24 21:04:00 <span id=AddressBar style='overflow: none'>
<span id=AddText>Address</span>
try this i think it works haven't used it in a while it may need some refining but it did work, the bit at the bottom with microsoft webaddress is the URl that will be displayed in the address bar to start off with.


<input type=text value='http://' id=TheAddress style='width: expression(document.body.clientWidth - AddText.offsetWidth - AddGo.offsetWidth - 45)'>
<input type=button value='Go' id=AddGo onclick='navigate()'><br>
<span>
<br>
<iframe src=' id=TheFrame style='width: 100%; height: 81%'></iframe>" target="_blank">www.microsoft.com' id=TheFrame style='width: 100%; height: 81%'><
Guest (0)
32707 2002-01-24 21:38:00 Wow, that was a quick response - thanks very much!

Your suggestion looks great, but when I enter a URL and click Go, IE displays the 'Page cannot be displayed' window, with the address C:\null.

Any ideas?
Guest (0)
32708 2002-01-27 06:57:00 Hi Stuart,

Here is some basic code I have written using Javascript to open the requested URL:

<HTML><INPUT class=dnsQform size=40 value='' name=address><INPUT type=button value='Go!'
onclick=javascript:newUrl()><BR></HTML>

<SCRIPT language='javascript'>

function newUrl(){

var strID = document.all.item('address').value;

if (strID == ''){

window.alert('Please type an address first');}

else{if (strID.indexOf('://') < 1){

strID = 'http://' + strID;}

new_window=window.open(strID);}}

</SCRIPT>


The new URL can be opened in the current window instead of a new window by replacing new_window=window.open(strID); with self.location = strID;

If you want a copy of the code that is easier to read then let me know and I can email it to you.

All the best,
TS
Guest (0)
32709 2002-01-28 20:39:00 Thanks Tristan, that did the trick.

Long time no see! Trust you are doing well.

Thanks once again,
Stu
Guest (0)
1