chance63 Posted July 22, 2009 Share Posted July 22, 2009 ok i am using VS2008 i know some do not like it but i doi am trying to use javascript to load an external web page and am having trouble i have searched W3C and have not found this situation your help would be apreciatedi need to keep the page fast and small due to bandwidth limits and this is my first attempt at javascript<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css" id="default"> body { background-color: #C68100; padding: 3px 3px 3px 3px; border: 4px black double; text-align: center; letter-spacing: 1.5px; line-height: normal;}} .style1 { vertical-align: middle;}</style><title>Iron Head Rebuild Project</title><script type="text/javascript"></script><script type="text/javascript"><!-- url = http:www.bikerornot/chancehull;function FP_goToURL(url) {//v1.0 window.location=url; // i know the problem is in here but i cannot remember what should be here // and this is what the default set it to}// --></script></head><body> <div id="MyBikePicturesmall"> <img alt="My Bike" id="MyBikePicture"src="Pictures\100_0038small.jpg" class="style1" /> </div> <div id="para_1"> <p>OK this is my first full Bike restore/rebuild<br/> and I am in the IT field so I thought it should have a web page to document my journey<br/> for a little history of me see<br/> <br/> </p> </div> <div> <input name="About Me" type="button" value="About Me" onclick="FP_goToURL(/*href*/'www.bikerornot.com/chancehull')" /> <input name="Next Page" type="button" value="Next Page" /> </div></body></html> Link to comment Share on other sites More sharing options...
Ingolme Posted July 22, 2009 Share Posted July 22, 2009 ok i am using VS2008 i know some do not like it but i doi am trying to use javascript to load an external web page and am having trouble i have searched W3C and have not found this situation your help would be apreciatedi need to keep the page fast and small due to bandwidth limits and this is my first attempt at javascript<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css" id="default"> body { background-color: #C68100; padding: 3px 3px 3px 3px; border: 4px black double; text-align: center; letter-spacing: 1.5px; line-height: normal;}} .style1 { vertical-align: middle;}</style><title>Iron Head Rebuild Project</title><script type="text/javascript"></script><script type="text/javascript"><!-- url = http:www.bikerornot/chancehull;function FP_goToURL(url) {//v1.0 window.location=url; // i know the problem is in here but i cannot remember what should be here // and this is what the default set it to}// --></script></head><body> <div id="MyBikePicturesmall"> <img alt="My Bike" id="MyBikePicture"src="Pictures\100_0038small.jpg" class="style1" /> </div> <div id="para_1"> <p>OK this is my first full Bike restore/rebuild<br/> and I am in the IT field so I thought it should have a web page to document my journey<br/> for a little history of me see<br/> <br/> </p> </div> <div> <input name="About Me" type="button" value="About Me" onclick="FP_goToURL(/*href*/'www.bikerornot.com/chancehull')" /> <input name="Next Page" type="button" value="Next Page" /> </div></body></html>The problem in your script is here:FP_goToURL(/*href*/'www.bikerornot.com/chancehull') If the URL is not preceded by http:// it will link to a path relative to the current document.Try the following instead FP_goToURL('http://www.bikerornot.com/chancehull') Link to comment Share on other sites More sharing options...
chance63 Posted July 25, 2009 Author Share Posted July 25, 2009 The problem in your script is here:FP_goToURL(/*href*/'www.bikerornot.com/chancehull') If the URL is not preceded by http:// it will link to a path relative to the current document.Try the following instead FP_goToURL('http://www.bikerornot.com/chancehull') thank youit works perfectly Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.