Solved

Simple simple simple

Posted on 1998-12-04
5
132 Views
Last Modified: 2010-04-09
How can I do the following:

<body background="PATH_TO_ROOT_DIR/images/background.jpg">

You see, at my web site, I have one directory under the main directory called "images."  In it, I want to store all the pictures and graphics for the site.  I would like to be able to access the graphics in the directory from any other directory within the site.  The problem is, I don't know how.  Is there anyway to do this?

It seems simple, but I don't know.......

I also have a second question (probably even simpler).  How can I change the body of a mail message given something like this:

<FORM>
<INPUT TYPE="BUTTON" VALUE="Send" onClick="location.href= 'mailto:theletterp@hotmail.net?Subject= Just a few comments...'">
</FORM>

This too seems simple, but I don't know.  If you want more points, I suppose I can supply them 8-)
0
Comment
Question by:p021497
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 

Author Comment

by:p021497
ID: 1840209
Edited text of question
0
 
LVL 2

Accepted Solution

by:
chrisbolt earned 20 total points
ID: 1840210
Replace PATH_TO_ROOT_DIR with .. to go to the directory under the current directory. For example, if this is your directory structure:

www.whatever.com/yourdir/index.html
www.whatever.com/yourdir/images/background.gif
www.whatever.com/yourdir/yoursubdir/yoursecondpage.html

In index.html the location of the background is images/background.gif and in yoursecondpage.html the path is ../images/background.gif

For the second question, do this:

<FORM>
<INPUT TYPE="BUTTON" VALUE="Send" onClick="location.href='mailto:theletterp@hotmail.net?Subject=Just a few comments...&body=Some stuff in the body'">
</FORM>
0
 
LVL 4

Expert Comment

by:martinag
ID: 1840211
It would be easier to use "/yourdir/images" all the time. Then you don't have to think about where this file is and where that file should be placed etc.

Martin
0
 

Author Comment

by:p021497
ID: 1840212
Thank you chrisbolt, you have solved my problems.  It works great now.

Martin, I am storing only one copy of some images on the server (to conserve space).  Your idea is easier to do, but it takes up more room.  I would rather not do that.  Thanks anyway though.
0
 
LVL 2

Expert Comment

by:chrisbolt
ID: 1840213
Also, martin, it is better not to use /yourdir/images if you move to a different server or you keep a copy of your pages on your own computer for offline viewing/editing.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Technology Resume 7 69
Do alert on select 6 26
Adding 1 the value of input "text" every 3 seconds 5 33
Hta File displays dynamic File names 4 48
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question