Email conversation
From | Juanita J. Arnott |
To | Me |
Subject | I'd like information on the small box with Style: next to it. |
Date | 26 August 04 11:40 |
Hello Tarquin,
I want to thank you VERY much for sharing you knowledge with all of us. I
think your web site is GREAT. I didn't mean to shout but I do like what you
have done.
I have read some of the email that you gotten,and it seems pretty tech. to
me; so maybe I'm too new to coding to get what I'd like.
On your web site you have a small box with the word 'Style:' next to it and
a little arrow pointing down. That lets a user select different colors. I
don't know if it is javascript or PHP or what , but I would like to put
that on my web site so the user can change my color styles., But I can not
fine your code to download it, because I don't know what it is called. I
am sure you have email about it but I could not find it.
In your non DHTML section you have:
The next most popular use of JavaScript; opening new browser windows:
Opening a window with customisable settings.
I'd like to have the code for this but I can not find it.
I'm thanking you now for the time you have given me in reading my email.
My Best regards,
Juanita
From | Me |
To | Juanita J. Arnott |
Subject | Re: I'd like information on the small box with Style: next to it. |
Date | 27 August 2004 10:18 |
Juanita,
> On your web site you have a small box with the word 'Style:' next to it
> and a little arrow pointing down.
Called a 'select' form control, but often known as a drop-down box or a
combo box.
> That lets a user select different colors.
What it does is it disables one stylesheet, and enables another using
JavaScript. If you have more than one possible stylesheet, you can do this
also.
This can be done the easy way or the hard way. With the easy way, every
time they open a page, it shows them a list of styles, but it does not
select the right one first. The hard way selects the right one, but it is
much more difficult. I suggest you do it the easy way (I have not). It uses
a script I have written to switch stylesheets:
http://www.howtocreate.co.uk/tutorials/jsexamples/CSStest/
<link rel="stylesheet" href="mainstyles.css" title="MainSheet">
<link rel="alternate stylesheet" href="mainstyles.css" title="OtherStyles">
<script src="swapstyle.js" type="text/javascript" language="javascript1.2"></script>
...
<body onload="useStyleAgain('yourStyle');" onunload="rememberStyle('yourStyle',365);">
...
<form method="get" action="" onsubmit="return false;">
<p>
<select onchange="if(this.options[this.selectedIndex].value){eval(this.options[this.selectedIndex].value);}">
<option>-- Select colour scheme --</option>
<option value="changeStyle('MainSheet');">Main colour scheme</option>
<option value="changeStyle('OtherStyles');">Alternative colour scheme</option>
</select>
</p>
</form>
> The next most popular use of JavaScript; opening new browser windows:
> Opening a window with customisable settings.
> I'd like to have the code for this but I can not find it.
The words themselves are a link to my window wizard page:
http://www.howtocreate.co.uk/tutorials/jsexamples/popwin.html
The code used to open a new window (assuming it is not blocked by popup
blockers) is like this:
window.open('http://blah.com/etc.html','someTargetName','someOptions');
someOptions is a comma separated list of options. The wizard on my page
lets you choose the options and creates the options string for you.
Hope you find this useful
Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
From | Juanita J. Arnott |
To | Me |
Subject | Re: I'd like information on the small box with Style: next to it. |
Date | 30 August 04 10:04 |
Hello Tarquin,
I thank you Very Much. I did not know opening a new window was a pop-up that
might be blocked my some users, so I'm searching for a different way, to
handle my thumbnails. I have not had time to do the switching of style
sheets yet but I soon will. I don't know how I can ever thank you enough to
let you know how much I appreciate your help. If I was rich I think I'd
send money (but if I were rich I would think differently, so maybe I would
not send you any money, But I'm sure I would send you my thanks)
regards,
Nita Arnott