Hello,
The Javascript code at the URL below does work but no doubt there are
better ways of coding the app so would appreciate any comments! http://www.micro-active.com/spa-test/spa-ng-front.htm
The first page links to a second where most of the Javascript is to be
found.
The slider code is in a file called slider.js which is in the same
folder and can be downloaded if required ...
After the last questions have been answered the slider values are
emailed to me using formmail-nms.cgi.
Look forward to hearing of any (many!) possible improvements etc.
Many thanks,
Geoff 10 1499
On Sat, 15 Oct 2005 14:41:48 GMT, Geoff Cox
<ge*******@notq uitecorrectfree uk.com> wrote: Hello,
The Javascript code at the URL below does work but no doubt there are better ways of coding the app so would appreciate any comments!
http://www.micro-active.com/spa-test/spa-ng-front.htm
The first page links to a second where most of the Javascript is to be found.
The slider code is in a file called slider.js which is in the same folder and can be downloaded if required ...
I should have added that the questions are in a file called
questions.js in the same folder and this file too can also be
downloaded if interested.
Cheers
Geoff
"Geoff Cox" <ge*******@notq uitecorrectfree uk.com> wrote in message
news:8m******** *************** *********@4ax.c om... On Sat, 15 Oct 2005 14:41:48 GMT, Geoff Cox <ge*******@notq uitecorrectfree uk.com> wrote:
Hello,
The Javascript code at the URL below does work but no doubt there are better ways of coding the app so would appreciate any comments!
http://www.micro-active.com/spa-test/spa-ng-front.htm
The first page links to a second where most of the Javascript is to be found.
The slider code is in a file called slider.js which is in the same folder and can be downloaded if required ... I should have added that the questions are in a file called questions.js in the same folder and this file too can also be downloaded if interested.
where do the questions appera on the page ? There is a heading and a bunch
of responses but what are the questions ?
Fist page the slider bit doesn't float in teh right place - have you tested
on different res ? Cheers
Geoff
On Sat, 15 Oct 2005 17:36:07 GMT, "Zoe Brown"
<zo***********@ N-O-S-P-A-A-Mtesco.net> wrote: where do the questions appera on the page ? There is a heading and a bunch of responses but what are the questions ?
Zoe,
when I said questions I should have said opposing or polar statements.
The first set being
"I would often be in this situation" and
"I would hardly ever be in this situation"
Fist page the slider bit doesn't float in teh right place - have you tested on different res ?
it seems that if the browser window is maximised the thumb is in the
correct place. Do you find this?
Geoff Cheers
Geoff
"Geoff Cox" <ge*******@notq uitecorrectfree uk.com> wrote in message
news:a1******** *************** *********@4ax.c om... On Sat, 15 Oct 2005 17:36:07 GMT, "Zoe Brown" <zo***********@ N-O-S-P-A-A-Mtesco.net> wrote:
where do the questions appera on the page ? There is a heading and a bunch of responses but what are the questions ? Zoe,
when I said questions I should have said opposing or polar statements. The first set being
"I would often be in this situation" and
"I would hardly ever be in this situation"
what situation ? Fist page the slider bit doesn't float in teh right place - have you tested on different res ?
it seems that if the browser window is maximised the thumb is in the correct place. Do you find this?
no, only when it was set to 800 * 600
On Sat, 15 Oct 2005 20:22:06 GMT, "Zoe Brown"
<zo***********@ N-O-S-P-A-A-Mtesco.net> wrote: "I would often be in this situation" and
"I would hardly ever be in this situation"
what situation ?
Zoe,
"the situation" refers to the context shown by the image, eg with
friends, with parents etc. Fist page the slider bit doesn't float in teh right place - have you tested on different res ?
it seems that if the browser window is maximised the thumb is in the correct place. Do you find this?
no, only when it was set to 800 * 600
It is fine with IE (v6) at 1024 x 768 for me but the thumb is at the
left hand end of the slider rail rather than in the middle when I use
Firefox at this resolution.
Which browser are you using?
Cheers
Geoff
Geoff Cox wrote: Hello,
The Javascript code at the URL below does work but no doubt there are better ways of coding the app so would appreciate any comments!
http://www.micro-active.com/spa-test/spa-ng-front.htm
The first page links to a second where most of the Javascript is to be found.
The slider code is in a file called slider.js which is in the same folder and can be downloaded if required ...
After the last questions have been answered the slider values are emailed to me using formmail-nms.cgi.
Look forward to hearing of any (many!) possible improvements etc.
Many thanks,
Geoff
Your 'sliders' only work properly when the window is at 1024 pixels
wide, reducing the window width causes the range of of the marker to be
misaligned with the slider.
There is an awful lot of repetitive code that could be replaced with
loops and you have a lot of global variables - are they all needed?
Have you thought of having the value displayed so that as the slider
moves, the selected value is visible?
I'd suggest that you look at implementing your sliders as objects, then
you only need one object that you create multiple instances of. Most of
your globals can then become properties of the object - your next step
in learning JavaScript? :-)
Wouldn't it be easier all round to use radio buttons and values from say
1 to 10? Then you'd have a form that would work without scripting.
--
Rob
On Sun, 16 Oct 2005 12:09:10 +1000, RobG <rg***@iinet.ne t.au> wrote:
Rob,
Thanks for looking at this - my comments follow. Your 'sliders' only work properly when the window is at 1024 pixels wide, reducing the window width causes the range of of the marker to be misaligned with the slider.
Any idea why that should be so? What controls this? Presumably the
mySlider1.place Slider()
in the slider.js library? I have looked at this but cannot see how it
works?
I'm also finding a Firefox oddity - on the first page the slider thumb
is not in the centre of the rail whereas on the second page, with
multiple sliders, all the thumbs are in the centre. I cannot see any
difference in how the sliders are created ?!
To try to understand this I have made a very simple at http://www.micro-active.com/spa-test/slider.htm
Are you able to look at this with IE and Firefox? In IE the thumb is
in the centre of the rail - with Firefox it is on the left hand side.
Why?!
There is an awful lot of repetitive code that could be replaced with loops and you have a lot of global variables - are they all needed?
OK - will make the loops and check the global aspect.
Have you thought of having the value displayed so that as the slider moves, the selected value is visible?
Yes but the idea is to keep the values from the user.
I'd suggest that you look at implementing your sliders as objects, then you only need one object that you create multiple instances of. Most of your globals can then become properties of the object - your next step in learning JavaScript? :-)
I thought the sliders were objects?!
var mySlider1 = new Slider( "Slider1" );
what am I missing? On the second page I have used the
Slider.isProtot ype() function to simplify the creation of multiple
sliders. By the way the slider libray is the work of Christiaan Hofman
at http://www.phys.uu.nl/~hofman/jsexp/jsviewer.html
He has been very helpful and I'm waiting for a response to my latest
email to him!
Wouldn't it be easier all round to use radio buttons and values from say 1 to 10? Then you'd have a form that would work without scripting.
again, yes it would, but the idea is to replicate online what is also
a paper based exercise which has been used for some time.
Cheers
Geoff
Geoff Cox wrote: On Sun, 16 Oct 2005 12:09:10 +1000, RobG <rg***@iinet.ne t.au> wrote:
Rob,
Thanks for looking at this - my comments follow.
Your 'sliders' only work properly when the window is at 1024 pixels wide, reducing the window width causes the range of of the marker to be misaligned with the slider.
Any idea why that should be so? What controls this? Presumably the
mySlider1.place Slider()
in the slider.js library? I have looked at this but cannot see how it works?
I doesn't happen in the sample page, perhaps it's something to do with
how you are positioning the slider in your page that throws the range
calculation off.
It also doesn't handle changes to font sizes after the page loads - the
button stays where it was but the slider moves up/down the page (put
some text before the slider in your test page and change the size of it
using the browser text size controls). I'm also finding a Firefox oddity - on the first page the slider thumb is not in the centre of the rail whereas on the second page, with multiple sliders, all the thumbs are in the centre. I cannot see any difference in how the sliders are created ?!
To try to understand this I have made a very simple at
http://www.micro-active.com/spa-test/slider.htm
Are you able to look at this with IE and Firefox? In IE the thumb is in the centre of the rail - with Firefox it is on the left hand side. Why?!
Because when setting the position of the button the units are not
specified. Find the following line (about 404):
if (this.orientati on == "h") this.button.lef t = pos;
add -- + 'px' -- to the end:
if (this.orientati on == "h") this.button.lef t = pos + 'px';
There is an awful lot of repetitive code that could be replaced with loops and you have a lot of global variables - are they all needed?
OK - will make the loops and check the global aspect.
Have you thought of having the value displayed so that as the slider moves, the selected value is visible?
Yes but the idea is to keep the values from the user.
I'd suggest that you look at implementing your sliders as objects, then you only need one object that you create multiple instances of. Most of your globals can then become properties of the object - your next step in learning JavaScript? :-)
I thought the sliders were objects?!
var mySlider1 = new Slider( "Slider1" );
Hey, they are too! I didn't look closely enough.
[...]
--
Rob
On Sun, 16 Oct 2005 22:18:05 +1000, RobG <rg***@iinet.ne t.au> wrote: Are you able to look at this with IE and Firefox? In IE the thumb is in the centre of the rail - with Firefox it is on the left hand side. Why?!
Because when setting the position of the button the units are not specified. Find the following line (about 404):
if (this.orientati on == "h") this.button.lef t = pos;
add -- + 'px' -- to the end:
if (this.orientati on == "h") this.button.lef t = pos + 'px';
Rob,
I passed on your comment to Christiaan - after which he made following
change, ie added the + 'px' to the following line
var pos = this.maxSlide * rangeValue /
(this.rightValu e-this.leftValue) + this.offset + 'px';
It now works OK in both IE and Firefox
Thanks again!
Cheers
Geoff This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: lkrubner |
last post by:
I've got a PHP application that's 2 megs in size. Of that, my guess is
200k-400k is comments. Do they impose a performance hit? I've been
postponing any kind of optimization, but at some point I'll have to do
it. Is taking out the comments worth it? Of all the optimizations I can
do, where should it rank?
|
by: Alex |
last post by:
Hi all,
We're looking at a vendor who uses the InterSystems Cache Database
Platform, but our IT department has zero experience with this system.
This software package will have a pivotal and mission critical roll in
our organization, so I'd like some comments on what others think of
this database platform.
Mainly I'm curious how easy/difficult it is to query a Cache Database,
and does it use standard SQL calls like Oracle and MS SQL? ...
|
by: Timex |
last post by:
I want to delete all comments in .c file.
Size of .c file is very big.
Any good idea to do this?
Please show me example code.
|
by: Adam Barr |
last post by:
For a book I am working on, I have written a brief (7 page) summary
of C. The intent of this is that an experienced programmer who did
not know C would be able to get enough information to read and
understand C programs. It is not meant to be a 100% complete
summary of the language, but everything in there should be correct.
If anyone is interested, please feel free to read it and send me
comments. Note that the material is copyrighted,...
|
by: LellD |
last post by:
It seems not unusual for me that I have special chars like
< (less than) or > (greater than) in C# comments,
especially in <code> sections. For instance,
<code> if(a<b) c=3; </code> should be a valid comment, but
the '<' in the if statement is treated as beginning of a
new XML token and leads to a compiler warning.
Do you have any idea how I can use these characters in C#
comments, without beeing interpreted as XML tokens?
Thanks,
| |
by: tjb |
last post by:
I often see code like this:
/// <summary>
/// Removes a node.
/// </summary>
/// <param name="node">The node to remove.</param>
public void RemoveNode(Node node) {
<...>
}
|
by: Hapary |
last post by:
Hello all,
I remember that I saw a piece of code a few years ago, it was using a
combination of both /* */ and // such that you could determine the
compile type of the source code. I don't remember exactly what was
happening, but I assume it was something like if the source code was
being compiled by a c compiler the value of a variable became 1 and if
it was compiled with c++ compiler the value became 0. Do you know how
can I find that...
|
by: jacob navia |
last post by:
Recently we had poor Mr "teapot" that was horrified at the heresy
of lcc-win of accepting // comments.
C is a nice language, and you can do anything with it, inclusive a
program that transforms // comments into well behaved /* ... */
ones...
------------------------------------------------cut here
/*
|
by: nicolenwn |
last post by:
Hi,
I have a database in Access that currently holds the status of a salesperson and the comments of the status. The comment is an open-ended field typed in by a user.
For example, if Jonny has the status of "On Leave" then the comment might say "26-11-09: Johnny is currently on medical leave and will return by 01-12-09". The comment is a compiled overtime and stored in a Text box.
However, my problem is that, when i transfer this...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |