473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Javascrtipt and AJAX Variable Passing

SOmeone please help me with this. I'm very very very new to
Javascript. I'm trying to basically pass the value of the text box
h-value to a PHP page. So I want do.php?VALUE OF H-VALUE

Look at the link below. how do I do this? I'm sure its easy, but im
havng troulble researchig this.
Value: <input name="h-value" id="h-value"
onChange="s.setValue(parseInt(this.value))"/>

<script type="text/javascript">

var s = new Slider(document.getElementById("slider-1"),
document.getElementById("slider-input-1"));

s.onchange = function () {
document.getElementById("h-value").value = s.getValue();
};
s.setValue(50);

window.onresize = function () {
s.recalculate();
};

</script>

<input name="submit" type="submit" value="submit" />
</form>

<ul id="maintab" class="shadetabs">
<li class="selected"><a href="#default"
rel="ajaxcontentarea">Intro</a></li>
<li><a href="do.php" onClick="s.getValue()" rel="ajaxcontentarea">click
here>
</ul>

Sep 28 '06 #1
2 1477
You're way off...

Here's a sample I threw together...

http://www.davidbetz.net/ajax/ajaxexample092806.htm

You can ignore what's going on on the server... you're only dealing
with the client side.

Basically, you want to create an XmlHttp object and just send off what
you want. You get back... well, you get back whatever you get back.
It's a form of service oriented architecture for JavaScript. It's been
there for almost a decade...

David Betz

am**********@gmail.com wrote:
SOmeone please help me with this. I'm very very very new to
Javascript. I'm trying to basically pass the value of the text box
h-value to a PHP page. So I want do.php?VALUE OF H-VALUE

Look at the link below. how do I do this? I'm sure its easy, but im
havng troulble researchig this.
Value: <input name="h-value" id="h-value"
onChange="s.setValue(parseInt(this.value))"/>

<script type="text/javascript">

var s = new Slider(document.getElementById("slider-1"),
document.getElementById("slider-input-1"));

s.onchange = function () {
document.getElementById("h-value").value = s.getValue();
};
s.setValue(50);

window.onresize = function () {
s.recalculate();
};

</script>

<input name="submit" type="submit" value="submit" />
</form>

<ul id="maintab" class="shadetabs">
<li class="selected"><a href="#default"
rel="ajaxcontentarea">Intro</a></li>
<li><a href="do.php" onClick="s.getValue()" rel="ajaxcontentarea">click
here>
</ul>
Sep 29 '06 #2
<ag******@gmail.comwrote:
>
You can ignore what's going on on the server... you're only dealing
with the client side.
i'm rinning over Mac OS X with Apache 2, then i wonde about the port to
open to let XMLHttpRequest to pass thru because, testing the example u
given raise a :

"Permisson denied to call the method "XMLHttpRequest.open" ????
--
une bévue
Sep 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Gregory | last post by:
Hello, I'm trying to do the above in order to process an image and return the result to an html image control. It fails and my key suspects are either the variable that I'm passing in -...
10
by: Rigga | last post by:
Hi, Ok first please bear with me as I am a total Python n00b.. Can anyone explain why this does not like me using % FileLoc in the os.system call??? #!/usr/bin/python import sys import os
1
by: Golawala, Moiz M (GE Infrastructure) | last post by:
Hi All, I want to pass a value between 2 modules. Both the modules are scripts (no classes involved). Does anyone know how I can do that. For eg: in module1 if __name__ == '__main__':...
2
by: Bob Bruyn | last post by:
I've recently installed Apache 2 and php 5.2 on my WIndows XP machine. Everything is up and running. I'm passing some vars via the URL. It works fine online:...
1
by: Jerim | last post by:
I have a PHP script which simply calls another PHP script using include(). Let's call them website.php and website_include.php, with website.php simply including website_include.php. I can pass the...
2
by: monkeyboy | last post by:
Hello, I'm new to python, and PythonCard. In the code below, I'm trying to create a member variable (self.currValue) of the class, then just pass it to a simple function (MainOutputRoutine) to...
4
by: sonu2die4 | last post by:
Hi, I have the following perl script working for me.I am accesing the database from my perl script using use Net::Telnet(); package. I am not using DBI package.as I stated earlier the following...
4
by: MelindaM | last post by:
Hi guys, I'm new to PHP and AJAX/JS so I apologize if this is an incredibly obvious error. I'm in the process of creating multiple listboxes that are chained together for an advanced search form....
3
vivekgs2007
by: vivekgs2007 | last post by:
Hi to all, I am new to Ajax. I have a application form. which has a edit option of the previous record of a user. when a user select the date at which he wants to edit the records.then...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.