Connecting Tech Pros Worldwide Forums | Help | Site Map

Can you use an IP address with window.location.href?

risk32's Avatar
Member
 
Join Date: Mar 2008
Location: Evansville, IN / Hurlburt Field, FL
Posts: 88
#1: Jul 23 '09
I seem to have a problem. I'm trying to use the window.location.href code to direct a webpage through an IP address. I receive no errors through IE, but the location is wrong. It's still trying to put it through a local drive on my computer instead of the IP address I'm trying to forward to.

Here's what I have: (I left the IP as 0's for the sake of my own protection)
Expand|Select|Wrap|Line Numbers
  1. <input type="checkbox" id="forgot" value="Forgot Password?" onclick="window.location.href('\\000.000.000.000\319SOS Common\Flt Mgmt\test\forgot_password.html')">Forgot Password?</input>
  2.  
When the checkbox is clicked, it does what it's supposed to, but it's going in a weird direction.

C:\000.000.000.0009SOS CommonFlt Mgmtest orgot_password.html
This is what the address bar displays after clicking the checkbox. Am I in the wrong to try to do it this way? Or is it something that I'm missing?

Thanks,
Adam

risk32's Avatar
Member
 
Join Date: Mar 2008
Location: Evansville, IN / Hurlburt Field, FL
Posts: 88
#2: Jul 23 '09

re: Can you use an IP address with window.location.href?


I just had my slashes backwards...
Sometimes little mistakes make a big difference (I feel like an idiot)
Reply


Similar JavaScript / Ajax / DHTML bytes