Hello,
I have been able to create a slider using Javascript code from the web
but would like to send the slider values which are saved in an array
to myself using email and the CGI/form approach.
I'm not clear how to get the these array values into the form ..
Hints/ideas please!
Cheers
Geoff 7 2146
Hi,
Your question is not clear. Please post your code along with the
question which would be easier to understand your problem.
Anyways, try using XMLHTTP or XMLRequest to post the values to the
server.
- Peroli Sivaprakasam
On 1 Sep 2005 02:20:42 -0700, "Peroli" <pe****@gmail.c om> wrote: Hi, Your question is not clear. Please post your code along with the question which would be easier to understand your problem.
Peroli,
Thanks for your reply. At the moment the code below puts the slider
value into
<SPAN ID="Slider1Valu eText"></SPAN>
I would like to be able to put that value into a form so that the
value could be sent to me via email using formmail.cgi.
Cheers
Geoff
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<HEAD>
<SCRIPT
SRC="http://www.micro-active.com/slider/christiaan/slider.js"></SCRIPT>
<SCRIPT>
var mySlider1 = new Slider( "Slider1" );
mySlider1.leftV alue = 0;
mySlider1.right Value = 10;
mySlider1.defau ltValue = 0;
mySlider1.offse tX = 1;
mySlider1.offse tY = 1;
mySlider1.maxSl ide = 258;
mySlider1.onmou seover = "self.status='T ry me!'";
mySlider1.onmou sedown = "self.status='Y ou start at
'+this.getValue (0)";
mySlider1.onmou seup = "self.status='Y ou end at '+this.getValue (0)";
mySlider1.oncha nge = "self.status='T he current value is
'+this.getValue (0)";
mySlider1.oncli ck = "this.setValue( this.defaultVal ue)";
mySlider1.oncha nge =
"document.getEl ementById('Slid er1ValueText'). innerHTML =
''+this.getValu e(0)"
</SCRIPT>
</HEAD>
<BODY onLoad="mySlide r1.placeSlider( )">
<TABLE>
<TR>
<TD COLSPAN="3">
<IMG SRC="sliderbg.g if" NAME="Slider1Ra ilImg" ID="Slider1Rail Img">
<TR>
<TD ALIGN="left"> 0
<TD ALIGN="center"> Slider 1
<TD ALIGN="right"> 10
</TABLE>
<SPAN ID="Slider1Valu eText"></SPAN>
<SCRIPT>
mySlider1.write Slider();
</SCRIPT>
</body>
</html> Anyways, try using XMLHTTP or XMLRequest to post the values to the server.
- Peroli Sivaprakasam
Hi Geoff,
I have edited your script below. Please download the prototype.js
that i have included.
1. Update the url of the CGI script in function saveIt().
2. In the CGI Script, find the slider value in "SliderVal" parameter.
Test if it works.... It should.
- Peroli Sivaprakasam
_______________ _______________ _____________
[UNTESTED]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<HEAD>
<SCRIPT
SRC="http://www.micro-active.com/slider/christiaan/slider.js"></SCRIPT>
<SCRIPT
SRC="http://prototype.conio .net/dist/prototype-1.3.1.js"></SCRIPT>
<SCRIPT>
var mySlider1 = new Slider( "Slider1" );
mySlider1.leftV alue = 0;
mySlider1.right Value = 10;
mySlider1.defau ltValue = 0;
mySlider1.offse tX = 1;
mySlider1.offse tY = 1;
mySlider1.maxSl ide = 258;
mySlider1.onmou seover = "self.status='T ry me!'";
mySlider1.onmou sedown = "self.status='Y ou start
at'+this.getVal ue(0)";
mySlider1.onmou seup = "self.status='Y ou end at '+this.getValue (0)";
mySlider1.oncha nge = "self.status='T he current value
is'+this.getVal ue(0)";
mySlider1.oncli ck = "this.setValue( this.defaultVal ue)";
mySlider1.oncha nge
="document.getE lementById('Sli der1ValueText') .innerHTML
=''+this.getVal ue(0)";
//---------------------------------------------------------------------
function saveIt()
{
var url = 'http://yourserver/sendMail.cgi';
var pars =
'sliderVal='+do cument.getEleme ntById('Slider1 ValueText').inn erHTML;
var myAjax = new Ajax.Updater('S tatus', url, {method: 'get',
parameters: pars});
}
//---------------------------------------------------------------------
</SCRIPT>
</HEAD>
<BODY onLoad="mySlide r1.placeSlider( )">
<TABLE>
<TR>
<TD COLSPAN="3">
<IMG
SRC="http://www.micro-active.com/slider/christiaan/sliderbg.gif"
NAME="Slider1Ra ilImg" ID="Slider1Rail Img">
<TR>
<TD ALIGN="left"> 0
<TD ALIGN="center"> Slider 1
<TD ALIGN="right"> 10
</TABLE>
<input type="button" value="save slider value" onclick="saveIt ()" />
<SPAN ID="Slider1Valu eText"></SPAN>
<SPAN ID="Status"></SPAN>
<SCRIPT>
mySlider1.write Slider();
</SCRIPT>
</body>
</html>
On 1 Sep 2005 04:27:39 -0700, "Peroli" <pe****@gmail.c om> wrote: Hi Geoff, I have edited your script below. Please download the prototype.js that i have included. 1. Update the url of the CGI script in function saveIt(). 2. In the CGI Script, find the slider value in "SliderVal" parameter.
Test if it works.... It should.
Peroli,
It works fine - many thanks! Will now try and work out how you did
it!! May get back to you...
Cheers
Geoff - Peroli Sivaprakasam ______________ _______________ ______________ [UNTESTED]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> <HEAD> <SCRIPT SRC="http://www.micro-active.com/slider/christiaan/slider.js"></SCRIPT> <SCRIPT SRC="http://prototype.conio .net/dist/prototype-1.3.1.js"></SCRIPT> <SCRIPT>
var mySlider1 = new Slider( "Slider1" );
mySlider1.leftV alue = 0; mySlider1.right Value = 10; mySlider1.defau ltValue = 0;
mySlider1.offse tX = 1; mySlider1.offse tY = 1; mySlider1.maxSl ide = 258;
mySlider1.onmou seover = "self.status='T ry me!'"; mySlider1.onmou sedown = "self.status='Y ou start at'+this.getVa lue(0)"; mySlider1.onmou seup = "self.status='Y ou end at '+this.getValue (0)"; mySlider1.oncha nge = "self.status='T he current value is'+this.getVa lue(0)"; mySlider1.oncli ck = "this.setValue( this.defaultVal ue)";
mySlider1.oncha nge ="document.get ElementById('Sl ider1ValueText' ).innerHTML =''+this.getVa lue(0)"; //--------------------------------------------------------------------- function saveIt() { var url = 'http://yourserver/sendMail.cgi'; var pars = 'sliderVal='+d ocument.getElem entById('Slider 1ValueText').in nerHTML; var myAjax = new Ajax.Updater('S tatus', url, {method: 'get', parameters: pars}); } //--------------------------------------------------------------------- </SCRIPT>
</HEAD>
<BODY onLoad="mySlide r1.placeSlider( )">
<TABLE> <TR> <TD COLSPAN="3"> <IMG SRC="http://www.micro-active.com/slider/christiaan/sliderbg.gif" NAME="Slider1R ailImg" ID="Slider1Rail Img"> <TR> <TD ALIGN="left"> 0 <TD ALIGN="center"> Slider 1 <TD ALIGN="right"> 10 </TABLE> <input type="button" value="save slider value" onclick="saveIt ()" /> <SPAN ID="Slider1Valu eText"></SPAN> <SPAN ID="Status"></SPAN>
<SCRIPT>
mySlider1.write Slider();
</SCRIPT>
</body> </html>
On 1 Sep 2005 04:27:39 -0700, "Peroli" <pe****@gmail.c om> wrote:
Peroli,
Is it possible not to show the slider value?
<SPAN ID="Slider1Valu eText"></SPAN>
ie can I have the ID="Slider1Valu eText" as a hidden property?
Cheers
Geoff
On 1 Sep 2005 04:27:39 -0700, "Peroli" <pe****@gmail.c om> wrote:
Peroli,
Have sorted the invisible <span> by using css but one other thing.
After the slider value has been submitted a message appears saying
Thank you etc and giving the slider value.
I do not wish that value to be seen and cannot stop it!
<input type="hidden" name="redirect"
value="http://website/path/thanks.htm" />
does not work - still get the Thank you message!
What is happening?
Cheers
Geoff
Hi Geoff,
Replace the saveIt() with the code given below. You can replace the
"Status" Span too.
function saveIt() {
var url = 'http://yourserver/mail.cgi';
var pars
='sliderVal='+d ocument.getElem entById('Slider 1ValueText').in nerHTML;
var myAjax = new Ajax.Request(
url,
{method: 'get', parameters: pars, onComplete:
function(){aler t("Mail Sent.")}}
);
} <input type="hidden" name="redirect" value="http://website/path/thanks.htm" />
What are you doing here with this Hidden Input? Is this the output you
get from AJAX? Info needed.
Some Info for you.
1. Learn XMLHTTP or AJAX
2. Learn Prototype.js and understand it. Good place to start is http://www.sergiopereira.com/articles/prototype.js.html
We are calling your cgi script with a cgi param "sliderVal" from
Javascript using AJAX and displaying the response. If you dont want the
responsse to be shown, then do nothing in the "onComplete " handler of
"AJax.Reque st" Object.
- Peroli Sivaprakasam
Geoff Cox wrote: On 1 Sep 2005 04:27:39 -0700, "Peroli" <pe****@gmail.c om> wrote:
Peroli,
Have sorted the invisible <span> by using css but one other thing.
After the slider value has been submitted a message appears saying Thank you etc and giving the slider value.
I do not wish that value to be seen and cannot stop it!
<input type="hidden" name="redirect" value="http://website/path/thanks.htm" />
does not work - still get the Thank you message!
What is happening?
Cheers
Geoff This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jochen Daum |
last post by:
Hi!
I have a function in a lot of pages, which redirects to a new page, if
a form has been submitted:
if (!(defined("DEBUG_INSERT") && DEBUG_INSERT) &&
!(defined("DEBUG_UPDATE") && DEBUG_UPDATE) &&
!(defined("DEBUG_SELECT") && DEBUG_SELECT)){
if ($_POST){
$_SESSION = $_POST;
|
by: Shaun Demellweek |
last post by:
When you use a form to insert data into a MySQL database, how can you
set it up so that the fields are not sent via the address bar.
For example:
page1.php
___________
<form action="page2.php">
<input type="text" value="whatever">
<input type="submit" value="Send">
|
by: Wee Bubba |
last post by:
my page is split into 2 frames. my upper frame contains a data entry
form consisting of asp.net textbox server controls. my lower frame
displays rows of data.
when a user clicks the submit button in the upper frame I want the
textfield contents to be validated then I want to send the form
variables to the page in my lower frame forcing it to refresh. my
lower frame will then get these variables, use them to insert a new
row then will...
|
by: Lau |
last post by:
I need to send 1000 emails from an asp.net website.
Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP
server.
But the large amount of emails results in a timeout. My server administrator
told me to write the emails to the “pickup directory” instead. I know that
JMail can do this in ASP, but how do you do this in asp.net?
--
--------------------
|
by: jamie |
last post by:
Is there a way of sending a structure, or a class over
tcpip? The current way I am trying to do it is by using a
binary writer and sending the individual variables one by
one.
I know there is object serialization, but that sends all
the extra information that I dont need. I just want to
send the actual variables over the network, and no extra
class information.
| |
by: ft310 |
last post by:
I have a form
<td ID="but" width="20%" style="height: 30px; vertical-align: top ;">
<form class="frmform" name="close01" action="index.htm"/>
<p style="text-align: center; margin-top: 0; margin-bottom: 0">
<button class="frmclose" onClick="retreat() ;" name="closer"
style="height: 97%">Close</button>
</p>
</form>
<form class="frmform"
|
by: Taras_96 |
last post by:
Hi everyone,
I've downloaded the PHP code at http://www.inventory-management.org/
and am currently in the process of trying to get the code up and
running. I am running PHP version 5.1.6.6, so I needed to change the
function named fputcsv to f_put_csv.
However, when trying to login to the page (after setting up the
database), I find that the $_POST array is empty?! I found this by
putting the line var_dump($_POST) at the top of the...
|
by: joshuajnoble |
last post by:
Hi all, I'm having a strange problem where I need to build out form
variables in an HTTPWebRequest and send them to an aspx page for
processing. The page isn't recognizing the form variables at all, and
the only thing I can attribute it to is that when the call works, the
aspx page doesn't send a HTTP/1.1, Status Code = 100 response, i.e.
the calls go like this:
29 1109.853516 192.168.1.108 206.71.164.82 HTTP HTTP: Request, POST /...
|
by: bleachie |
last post by:
Hey,
I just need some help, my form seems to not send me all of the 'guestNames' and 'guestEmails' forms.
i use this function to add more guestnames and guestemail fields based on the number of guests added.
form.php
function createGuestNameAndEmailElements()
{
|
by: raj200809 |
last post by:
when i m sending mail i received error from symantec Antivirus" Your email message was unable to be sent because your mail server rejected the message
550-5.7.1 the ip youre using to send mail is not authorized"
i have configure smtp server put 127.0.0.1 ip in relay and also put 127.0.0.1 ip in connection.
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |