JQuery :: Passing Multiple Variables With 1.3.2?

Nov 3, 2009

I'm trying to pass data to my mySQL database, but I'm doing that 2 jQuery scripts:User comes on my page where there is a list with some values, e.g 530, 532, 534 etc etc ..User clicks on one of them, this link is using the jQuery to get another php file which get's the data from my DB and list it below the first list, here's the code for this:

$('#letter-e a').click(function(){
$.get('e.php', {'depot': $(this).text()},function(data){
$('#dict').html(data);

[code].....

So the second list is another step that can't be avoided to get the final result. In other words, i'ts another list where the user has to chose one of the items from the list to see the final result, I've added this code inf the 'e.php' file:

$('#letter-f a').click(function(){
$.get('f.php', {'date': $(this).text()},function(data){
$('#entry2').html(data);

[code].....

The problem is that my 'f.php' only gets 1 variable value, but I'll need 2 or more (maybe in the futur), how to pass multiple variables to a php file using jQuery?

View 2 Replies


ADVERTISEMENT

Passing Multiple Variables Via Url

Sep 12, 2003

I'm trying to pass multiple variables using a url on a Java function call.
the code I have that passes the 1 variable is:

function HandleChange() {
parent.CustomerIf.document.location.href="CustomerReturn.asp?id=" + varName.options[varName.selectedIndex].text;
}

which passes the chosen data (being loaded from a database) from a drop down box on an onchange event in asp script.

What I want to do is pass multiple variable via the above url script that the next page will get by the request.querystring method.

something like this:

function HandleChange() {
parent.CustomerIf.document.location.href="CustomerReturn.asp?id=" + varName.options[varName.selectedIndex].text + "address=" varAddress.value;
}

View 4 Replies View Related

Passing Multiple Variables With JavaScript

Jul 23, 2005

I'm having a problem passing a variable through a URL because the
variable is supposed to hold a URL that has a variable of its own.
Here is an idea of what I'm trying to do:

href="javascript:
newWin('/vcrc/exitvcrc.jhtml&newURL=http://www.something.net/default.asp?sponID=ETC','NowLeaving',駼',
餠', 'no', 'auto','no');"

So, pretty much, the page I'm sending the variable to think there's two
variables (newURL and sponID), but sponID is part of the URL.

View 2 Replies View Related

Passing Variables To Multiple Functions?

Sep 5, 2010

I'm new here, and new to js. Here is my problem: I have written out a code to make an image switch from state 0 to 1 and back to 0 again (an eye blink). The code works fine, but I would like to write the functions with arguments so it could be applied to more images. I have tried for a few hours (and searched forums) and am getting no where. Here's my code.

Code:
function home_blinkDown()
{
//alert('blink down');
var t = setTimeout("home_blinkSwap('home_js', 'images/main/home_blink.png')", 2000);

[Code]...

View 5 Replies View Related

Passing PHP Variables To A Function Multiple Times?

Sep 3, 2011

First off I didn't know whether to post this here or in the PHP section since it deals with both, but mostly JS. I have a PHP scraper that scrapes the job title, company name and location from a website and stores them in separate arrays. These values are then extracted out one at a time from the array and stored into a string, that is then passed to a Google Maps API.

I can make this successfully happen once, the thing is I need to do it multiple times. I have an idea on what I should do but don't really know how to implement it (correctly). The idea I had was to create a function in the JavaScript section that accepts three values from PHP. This function would be called in my PHP for loop that extracts the values from the array into a string. The thing that confuses me is that the Map function is called via <body onLoad="initialize()">. Here's the link to my code (http://pastebin.com/rTfzJM16)

View 1 Replies View Related

Xmlhttp=GetXmlHttpObject(); Passing Multiple Variables?

Feb 4, 2010

I am currently working on a function that will allow the user to search for an event by date and category. I've been using the w3schools exercise as an example but i wish to pass 2 pieces of data instead of one and am not sure how to do so. I'm sure similar posts have been raised before and i apologise if this type of question has already been answered but i could't find it in the forum index.

<FORM name="myForm">
<INPUT type="text" readonly name="MyDate2" value="Click for Calender" onClick="toggleCalendar('MyDate2')"size="15">
Select a Classification:
<select name="Classification2">

[Code]...

Even just point me in the direction of a good article or tutorial, i've been banging my head against it for 2 days so i'm very willing to take a few hours to go through a tutorial

View 9 Replies View Related

JQuery :: Passing Variables Into JQ?

Oct 1, 2009

This probably seems pretty trivial to you experts but I just don't know why it doesn't work and would like a nudge in the right direction please.I have a sllide and fade that works great - no problems. I am firing it with a function call from the HTML like so;<a href='#' onClick='sfade('#s1'); return false;>as you see I am passing the div to be faded(and slid) as a variable. Works great. The receiving function is:

var str='';
function sfade(str){
$(str).slideFadeToggle(1000);

[code]....

View 5 Replies View Related

Jquery :: Passing Variables From Php?

Nov 21, 2010

Im simply trying to make a dynamic searchbar so that the results pop up as someone write in the keywords. Problem 1 :When i pass foreign char types through jquery's $.ajax(); such as:

[code]....

they get translated to some weird characters when i try to compare them in the mysql database.javascript side:

Code:

$("#id_study4").keyup(function() {
var keyword = $("input[name=study4]").val();
var school_id = $("select[name=school4]").val();

[code]....

And the second problem is simply when i get he search results, i have the keyword emphasized with bold font weight, and text underline so that people can see. The problem here is that if i search with the keyword bach, then result becomes <b>bach</b>elor with all small letters when it should be <b>Bach<b/>elor. The way i have done this can be seen below:

Code:

str_ireplace($keyword, "<b>".$keyword."</b>", $study['study_name'])

View 2 Replies View Related

JQuery :: Passing Variables As Selectors

Dec 30, 2010

What I'm trying to do is quite simple but as a beginner I'm getting incredibly frustrated with it. Here's my first attempt. I plan to do something a bit more fancy with the images, but I could see straight away that this wasn't the solution. Mouseover was changing the image before it had faded out and looked horrible. So, I thought I might put all the images in the same place and hide them, making them visible and bringing them to the front on mouseover of the corresponding hotspot.

[Code]...

View 6 Replies View Related

JQuery :: Passing Variables To .click

Aug 23, 2009

I was using this:

But now I want to use the JQuery:

How do I pass the parameter to the function? Would I set an attribute and read it with[att=XXX] where the attribute is the echo'd $Region or is there a better way?

View 5 Replies View Related

JQuery :: Passing Variables Using Post?

Oct 2, 2009

I have a div on my page that is populated by a php calendar. The calendar also has month and year input fields so that the user can browse to different months. I would like to create a jquery function so that, when a user changes the month or year field, the div reloads the calendar and passes the selected month and year variable back to the php script. Here is what I have on my page:

<head>
<script type="text/javascript">
function startCalendar(month, year) {

[code]....

View 1 Replies View Related

JQuery :: Passing Variables Between Normal Js?

Nov 8, 2011

here is my code:

<script language="javascript">
// Upload progress bar
jQuery(function () {
jQuery('#upload_form').uploadProgress({

[code]....

^ This code I got online and it is very peculiar to me. It isn't tied to a function that can be called the documentation has the code just free floating. My problem is that I want to have this code be able to have access to native javascript variables. It seems the second I go into the .getJSON function I no longer have access to any other variables. How do I go into a JQuery function while still having access to native js variables with this code specifically?

View 6 Replies View Related

JQuery :: Passing Variables From One Plugin To Another?

Sep 18, 2010

Without using a global variable, how do I pass a variable from one plugin to another? For instance, \autocomplete gets some variable on line 14 and dialog saves the variable on line 17.

[Code]...

View 1 Replies View Related

JQuery :: Passing Global Variables To Function?

Feb 8, 2010

i have this problem in passing values to a variable in a jquery function.

i have a js variable that accepts a certain value and then i want to pass this variable in the jquery function.

For example, this is my script:
var autoScrollBool = "true"
var autoScroolInt = "10" (seconds)
stepcarousel.setup({

[Code].....

i want to replace the value of autostep: {enable:true to enable: utoScrollBool(the variable i created) , when i tried to assign it as is, its not working.

View 1 Replies View Related

JQuery :: Passing Variables And Making A Plugin?

May 7, 2010

Ok, so I used this jquery, and i want to be able to pass a couple variables in and make a plugin from it:so heres my scripts:

<script type="text/javascript">
$(function() {
$('#head h1 a').append('<span class="hover" />').each(function() {

[code].....

View 2 Replies View Related

JQuery :: Passing Variables Into An Inline Function?

Jul 16, 2010

I am trying to use jQuery to populate a number of divs with html from external blog pages:
for(var i = 1;i<=3;i++){

[Code]...

I understand that the 'i' variable is out of the scope of the inline function but I really don't know any other way of doing this.

View 3 Replies View Related

JQuery :: Passing Variables Via Json.parse?

Apr 18, 2011

I have a wordpress site with dropdown menus that currently are working with jQuery, now the issue is when trying to dynamically update the menus and parsing it with json.parse. For some reason I am not getting any data back of the following code (if I try to alert (data) I just get a blank box).

function waitGoUpdate()
{
var $jQ = jQuery.noConflict ();
$jQ.ajax ({

[Code].....

and just print out the function, than I would get the data on screen. now if I was to access my php file directly than that fill will output an error due to missing plugins.. I guess that is just how wordpress sorta work.. but again I do get the info that i need by just printing out the function. Do anyone knows a work around for this? I am kinda pulling my hairs out.

View 2 Replies View Related

JQuery :: Passing Local Variables To Callback Functions?

Jun 2, 2011

for some time I always found a workaround for this kind of problem. But somwhow, it feels wrong. So I'd like to know, if there's a common way to solve something like this[code]...

I'm defining the function and if the value of 'obj' hasn't until the function really gets called, this can work. But it just feels so wrong do have always global variables just to access them inside of a callback.[code]...

View 4 Replies View Related

JQuery :: Reload A Page With Ajax In 5 Seconds Passing GET Variables?

Oct 7, 2011

I'm reloading a div of a page using jQuery, but i need that every time that reloads (it reloads automatically every 10 seconds) obtains the get variables that i passed through the address bar

View 4 Replies View Related

Passing Variables To PHP

Mar 21, 2005

For some reason, I am using document.referrer in a PHP script that is called as a JavaScript script. The problem is that I need to pass the value of document.referrer to a PHP variable (in the same file) in order to add it to the database. How can I do that?

View 2 Replies View Related

Passing Javascript Variables To JSP

Jul 23, 2005

I need to pass a javascript to JSP code but I cannot figure it out.

View 2 Replies View Related

Passing Dynamic PHP Variables?

Jul 16, 2011

I'm creating dynamic buttons and forms for a website and would like the form hidden when it's corresponding button is clicked. However, when I pass button and form name variables to my JavaScript that hides the form, the variables are not being recognised unless I explicitly set them. (e.g 1 and 2 as seen below).

In a nutshell the onlick event doesn't seem to like PHP variables !

[Code]...

View 1 Replies View Related

Passing Variables With OnClick?

Jul 8, 2009

Don't know if this should be under JS or PHP... I have 2 different pages. On the first one, a table shows a list of items. Each has a button that when clicked opens another window with specific size attributes, hence the onClick event. The 2 PHP variables are computed and different for each item (each line).

Here is the line:

<input onClick="javascript:window.open('player_buy.php?send_role=<?=$data['ROLE']?>&send_price=<?=$send_price?>', '_blank', 'status=0,toolbar=0,scrollbars=0,location=no,statusbar=0,menubar=0,resizable=0,width=739,height=320, top=0,left=0')" class="button_sale" type="submit" value="> > >" name="submit">

Now of course, on the popup window, the URL will show .../player_buy.php?send_role=XXX&send_price=XXX

But the goal is to avoid that. So my question is: Is there a way to open such a popup window, pass these variables to it but in a way that it would not show in the URL?

View 6 Replies View Related

Passing Variables To Form?

Jul 8, 2009

I have a javascript function that receives the form name, field name and value and I want to be able to spit that data back to the originating form after doing some processing on the data.

The values are making it to the function perfectly, but when I try to return those values to the form, it tells me it's not a function. I know there's some syntax problem, but I'm just not sure where!

function doThis(one,two,three){
var myFormName = one;
var myFormField = two;
var myFormValue = three;
var goHere = myFormName + '.' + myFormField;

[Code]...

View 4 Replies View Related

Passing Variables In And Out Of Functions

Nov 3, 2010

To formulate the problem simple i have two buttons with the onclick function:

I guess what im asking is how can you set a variable by one onclick function and then use it in any other function?

View 1 Replies View Related

Passing Variables From One Page To Another?

Jun 10, 2011

I want to pass 2 variables from a html page and collecting in another html page using javascript. Say I pass xyz and abc to a page 2.html from 1.html without using cookies. In 1.html page i have many links. each link should be able to pass different variable to 2.html. When some one clicks on a link the variables should be passed to 2.html. I want to know how to collect them and use them.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved