473,322 Members | 1,431 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,322 software developers and data experts.

mootools variable to php.

i want to use the phatfusion slider via Dreamweaver. But how do I get the value of the slider back into php?

here is the basic code as installed by Dreamweaver.:

Expand|Select|Wrap|Line Numbers
  1. <div id="pf_slider1">
  2.   <div id="pf_slider1_el" class="slideContainer">
  3.     <div id="pf_slider1_Handle" class="slideHandle"></div>
  4.   </div>
  5.   <div class="pos"></div>
  6. </div>
  7. <script type="text/javascript">
  8. // BeginWebWidget phatfusion_slider: pf_slider1_el
  9.     window.addEvent('domready', function(){
  10.         var pf_slider1 = new Slider('pf_slider1_el', 'pf_slider1_Handle', {
  11.              onTick: function(pos){
  12.              this.knob.effect(this.p, {duration: 200, 
  13.              transition: Fx.Transitions.quadOut}).start(pos);
  14.              },
  15.           onComplete: function(val){$('pf_slider1').getElement('.pos').setHTML(val);},
  16.                   mode: 'horizontal',
  17.                   steps: '10'
  18.          });    
  19.         });
so were do I go from here? i am a fish out of water once I get into ajax.

I am sure there is a simple answer for those who specialize in this field.

thank you for you kindest considerations and assistance.

Cheers.
Sep 3 '09 #1
3 2340
dlite922
1,584 Expert 1GB
What I'm seeing is JavaScript, which is run in the browse using the clients PC. PHP is server side and is processed with the hosting servers processor.

How do you submit data to PHP?

1. AJAX
2. Form

The latter is much easier. Although I don't know much about phatfusion (in fact I've never heard of it), using JavaScript, you can put that value in a form field (a hidden one perhaps) and submit the form to a php page.

in the PHP page you can grab it with the $_POST variable.

If any of this doesn't sound familiar, I would look into taking some PHP tutorials.



Dan
Sep 3 '09 #2
Markus
6,050 Expert 4TB
Check out the Request class for mootools. Send an AJAX request, with the current slider value as data in the request. Then PHP has access to it via the GET array.

If you do a little googling, you'll find many tutorials on making AJAX requests with mootools.

Mark.
Sep 3 '09 #3
I apologize for not being more specific and for my ignorance when it comes to java.
Yes, I am using it in a form and it will get posted into mySQL.
Frankly I am not even sure what var to call if I could figure out how to call it?
I assume the "pf_slider1." I know the POS is where the value gets printed out.
I am having a great adventure learning PHP, SQL, CSS and all the other stuff but when I try to get into Java my brain just goes numb. I can use but not write.
Watching a Lynda.com video on Ajax is better than a handful of Xanax.
So my humble abilities are basically 'monkey see - monkey do.'
I will try the Request reading suggestion. I am using other Mootools functions.
Thank you very much for your considerations and replies.
Cheers.
Sep 4 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Seth Illgard | last post by:
I need one of those. But which one should I pick? Mootools looks great becouse I dont need to use the bad-document-but- still-great scriptaculus. What do you think?
2
by: manilal prajapati | last post by:
Hi, Using mootools I can implement either vertical or horizontal slider bar . But i want to implement both slider bar at once...
3
by: Piliskner | last post by:
Greetings to all coders. I am new to js and my development is based on using frameworks such as Mootools and libraries such as Wz_jsgraphics. Recently working on my school project I have met with...
4
by: Jean Ceugniet | last post by:
Hi, I just made my very first ajax form submitting. This works perfectly (myAjax01 is a variable external to this function). **************************** Code >> ****************************...
1
by: Piotr Kaleta | last post by:
ekhm ... MOOTOOLS , if you don't know it sorry I won't be pasting docs from mootools.net manuals
4
by: ameshkin | last post by:
Hi Everybody, I'm just now learning javascript and I'm using mootools. What I want to do is to dynamically load a php page into accordian panel 2, depending on which radio button is selected in...
1
by: empiresolutions | last post by:
i need to upgrade a script for MoolTools that was built on version Build 86. I need it upgraded to work with v1.2. I have looked on the web for info on build 86, but im not finding much help. Im...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
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)...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.