HTML & WEB-Design

Moderators: Jonathan
Number of threads: 1249
Number of posts: 3348

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Offline Web Page Development Posted by kjmorford on 7 Jul 2004 at 9:53 PM
I am NOT a great web designer. I dont want to be. I tinker enough to make it look good though. Here's my problem. I do a lot of work at home and I do not have internet on my computer. I host my images on a web server. I would like to be able to develop on that home computer. Is there a way to make my computer think some folder with my pictures in it is www.whatever.com/images? I know I can just change the code to look for the file , but I do these for auctions on ebay, and I do an awful lot of them and the potential for error would be high. I get around it by just not seeing the pictures when I develop it and testing it later. Very time consuming.

Is there anything i can do? I'm more interested in if it can even be done now, than actually doing it.

Oh, I have downloded windows web servers but the closest i could get was to assign an ip address to a location on my drive. I dont want that.

Thank you geniouses!
Ken
Report
Re: Offline Web Page Development Posted by treshr on 9 Jul 2004 at 4:39 AM
If I understand you right you want to develop your website on your home computer and use images in your offline website.
That's all possible and if your connected on the net when you're developing you can just use the URL to get the images you don't have on your harddisk at home.

If you have an image on your home computer just use this:
<img src="yourimagefolder/imgname.extension">


If you have an image an a remote computer just use this:
<img src="http://www.whatever.com/yourimage.extension">


Hope this helps you out.

--=][tReShR][=--

Report
Re: Offline Web Page Development Posted by kjmorford on 9 Jul 2004 at 7:42 AM
That's close! But no. I understand about using an image on my hard drive and the code difference for that. I want to develop the page(Ebay auction Ads) on a computer that is NOT on the internet with the same code it will have on ebay. If I dont have to change the code when it goes live , then my test will be valid. If I do have to change it, then it opens the door for all kinds of spelling errors, ommisions, etc. ( I put a lot of ads on Ebay). So I want the page to THINK it see's

<img src="http://www.whatever.com/yourimage.extension">

when it's on my home computer, even though it is just a folder on that same computer simulating my images dir on my web site.


Thanks!
Ken
: If I understand you right you want to develop your website on your home computer and use images in your offline website.
: That's all possible and if your connected on the net when you're developing you can just use the URL to get the images you don't have on your harddisk at home.
:
: If you have an image on your home computer just use this:
:
: <img src="yourimagefolder/imgname.extension">
: 

:
: If you have an image an a remote computer just use this:
:
: <img src="http://www.whatever.com/yourimage.extension">
: 

:
: Hope this helps you out.
:
: --=][tReShR][=--
:
:

Report
Re: Offline Web Page Development Posted by Weirdofreak on 9 Jul 2004 at 11:24 AM
It's perfectly possible, in at least two ways.

The first would be to write a program that changes the image URLs for you, and changes them back when you've tested.

The second, and probably easier (if less interesting and popular) way would be to use a Javascript to loop through all the images, and change the domain part of the src to the location on your hard drive. If you embed it using <script src> you only have to add or remove one line to get it to work.

Something like
window.onload = function () {
  for (i = 0; i < document.images.length; i++)
    document.images[i].src.replace('www.domain.com','images');
}

Should do it, then save that as a .js (or anything else, but .js for preference) file and include it in the page with <script src="foo.js"></script>
Report
Re: Offline Web Page Development Posted by kjmorford on 9 Jul 2004 at 12:14 PM
I've done that. It doesent work well in design because the javascript must not be executing in frontpage (or any other editor I've tried). It works in the browser. So there are complicated ways around it, but there MUST be a way to simulate a web address.

: It's perfectly possible, in at least two ways.
:
: The first would be to write a program that changes the image URLs for you, and changes them back when you've tested.
:
: The second, and probably easier (if less interesting and popular) way would be to use a Javascript to loop through all the images, and change the domain part of the src to the location on your hard drive. If you embed it using <script src> you only have to add or remove one line to get it to work.
:
: Something like
:
window.onload = function () {
:   for (i = 0; i < document.images.length; i++)
:     document.images[i].src.replace('www.domain.com','images');
: }

: Should do it, then save that as a .js (or anything else, but .js for preference) file and include it in the page with <script src="foo.js"></script>
:

Report
Re: Offline Web Page Development Posted by Weirdofreak on 10 Jul 2004 at 8:07 AM
You should have IE even without the internet - it comes with Windows. You don't need to be connected to run it, you can still view local pages.

The other way (modify the file with a script + re-modify it afterwards, or possibly just save a backup and go back to that) would probably have to be written in C (I don't know any interpreted languages which come with Windows), which I don't know, and which you'd need a compiler for anyway.
Report
Re: Offline Web Page Development Posted by Jonathan on 11 Jul 2004 at 8:34 AM
: It's perfectly possible, in at least two ways.
:
: The first would be to write a program that changes the image URLs for you, and changes them back when you've tested.
:
: The second, and probably easier (if less interesting and popular) way would be to use a Javascript to loop through all the images, and change the domain part of the src to the location on your hard drive. If you embed it using <script src> you only have to add or remove one line to get it to work.
:
: Something like
:
window.onload = function () {
:   for (i = 0; i < document.images.length; i++)
:     document.images[i].src.replace('www.domain.com','images');
: }

: Should do it, then save that as a .js (or anything else, but .js for preference) file and include it in the page with <script src="foo.js"></script>
:
Bleh...JavaScript sucks. :-S

If I remmeber correctly, HTML has a <base ...> tag that lets you set up a prefix for files loaded from that page. Something like:-

<base href="http://www.whatever.com/" />

If you wanted a change-one-line-on-the-page solution, that'd be more reliable that the JavaScript.

Jonathan

###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Report
Re: Offline Web Page Development Posted by Jonathan on 11 Jul 2004 at 8:28 AM
: I am NOT a great web designer. I dont want to be. I tinker enough to make it look good though. Here's my problem. I do a lot of work at home and I do not have internet on my computer. I host my images on a web server. I would like to be able to develop on that home computer. Is there a way to make my computer think some folder with my pictures in it is www.whatever.com/images? I know I can just change the code to look for the file , but I do these for auctions on ebay, and I do an awful lot of them and the potential for error would be high. I get around it by just not seeing the pictures when I develop it and testing it later. Very time consuming.
:
: Is there anything i can do? I'm more interested in if it can even be done now, than actually doing it.
:
: Oh, I have downloded windows web servers but the closest i could get was to assign an ip address to a location on my drive. I dont want that.
:
You're almost there, you just need to trick Windows into thinking that the domain name www.whatever.com resolves to that IP address. If you look in your Windows directory (or maybe it's windows system, do a search) then you'll find a file that is named "HOSTS" (no extension). This lets you set up name ==> IP mappings. Open it up, and on a new line add:-

www.whatever.com 123.123.123.123

I've done tricks like this before and got it to work, though it was a while ago...anyway, hope it helps.

Jonathan

###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Report
Re: Offline Web Page Development Posted by lance21 on 9 Apr 2011 at 8:38 PM
I use HTML for offline web development. Just save your html code with .htm and run it using any internet browser even offline it should open.

adirondack chairs






Report
Re: Offline Web Page Development Posted by melopongco on 28 Mar 2012 at 10:50 PM
I do the same as yours especially when i don't have internet connection.


dramaholics
korean drama
Report
Re: Offline Web Page Development Posted by samuelin on 17 Apr 2012 at 8:23 AM
That website no longer exist and a adv website in its place.
Report
Re: Offline Web Page Development Posted by samuelin on 17 Apr 2012 at 8:26 AM
That website no longer exist and a adv website in its place.
Report
Re: Offline Web Page Development Posted by samuelin on 17 Apr 2012 at 8:27 AM
That website no longer exist and a adv website in its place.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.