JQuery :: Passing Variable Between Dialogues?
Sep 16, 2010
I want to pass a variable between dialogue boxes but can't get it to work:
<script type="text/javascript">
function deleteE(v,m,f){
if(v == true) {
$.prompt('Enquiery Deleted.',{callback: del, buttons: {OK: true}, persistent: true}) ;
[Code].....
I have got the process for removing the record from the database to work fine, it's just getting this value from the first box to the last and into the php file.
View 2 Replies
ADVERTISEMENT
Aug 12, 2011
Code:I am having problems with the following. I am wanting to hide <tr> in my table (employees) and only show employees that are in the selected department (selected via dropdown box).I need to set a javascript array to a php array. I am looping and assigning the array and am wanting to pass a javascript variable as the index in php array. I have marked my problem lines in red. Thanx for any help.
<script type="text/javascript" >
function display_elements()
{
var departments = new Array;
[code]....
View 1 Replies
View Related
Mar 29, 2011
<script>$(document).ready(function(){
$('td img').click(function(){
alert($(this).attr('id'));
});
$.ajax({
[Code]...
I am new to jquery and I was wondering on how to send the id of the image I clicked on to a ajax call.
View 2 Replies
View Related
Dec 3, 2010
function findDivs(id)
{
$('div[id~="' + id + ''"]').innerHTML = "insert this text into div's with id that contains the variable: id";
}
So the selector i am using isn't working. I'm pretty new to jQuery so the selector may be completely off.
View 1 Replies
View Related
Apr 17, 2011
I'm having a tough time trying to add the "zip" variable to my YQL statement.
var zip = $(this).attr('zip');
$.YQL("select * from rss where url='http://weather.yahooapis.com/forecastrss?p=' ' "+ zip +" ' ", function(data){
var w=data.query.results.item;
[Code].....
I've tried as many different ways as I could imagine. Simply putting the literal zip code in the query works perfect.
View 2 Replies
View Related
Aug 15, 2010
if this is such a obvious question, but i'm kind of newbie in JQuery, i am using a lightpop plugin, & i want to pass 'image_path' via html. lightpop plugin code is something like this:
(function(jQuery){
jQuery.browser = jQuery.extend(
{chrome: /chrome/i.test(navigator.userAgent)} ,
jQuery.browser
[Code]...
View 1 Replies
View Related
May 27, 2011
I have a set of select form elements. What I want it to do is this.
when I select 'tiger', then I want it to trigger and update the div 'description.'
How would I go about doing this.. I am relatively new to jQuery.
View 6 Replies
View Related
Jul 20, 2011
Basically I want the field name to be a variable but it is taking it as a literal.When I print back the POST array with PHP I get:- Array ( [field_name] => Whatever I typed )So if the text field has a name of 'username' then I want the PHP to print back
Array ( [username] => Whatever I typed )
$(function(){//on DOM.load
$('.register-field').blur(function() {
var field_val = $(this).val();
[code]....
View 1 Replies
View Related
Dec 31, 2011
I'm trying to pass a var via object to .load() ... .load(URL, {"myname":var}, function) { ... This will not work unless the var is in quotes and therefore not a variable anymore. I want to be able to use a form to feed data to the program that loads the data.
View 8 Replies
View Related
Nov 3, 2009
This is my very first post! so please be kind Ok, i am very novice to jQuery. But what i am trying to do is use the jQuery attribute selector to select an input with a specific name. I can select an input of name type fine by doing the folowing:
[Code]...
View 2 Replies
View Related
Aug 11, 2009
I've used jquery to create a tabbing system and I want to be able to use it on multiple pages. I want to be able to pass a variable containing the number of items in the list from the html to the js file. Inside the js file I have this function:
[Code]...
View 2 Replies
View Related
Dec 17, 2010
I am new to jQuery. How can I select all the elements with a given number and which has 0 has value and set to a specified value.
[Code]...
View 3 Replies
View Related
Oct 11, 2010
I've looked extensively for the answer to this but suspect my inexperience means I'm using the wrong "keywords" in searches, or the answer involves jquery beyond my comprehension.
I have script experience and have plug-in galleryView working but have no jQuery experience which is the problem.
The script:
<script type="text/javascript">
name
= getValue("name");
$(document).ready(function(){
[Code]....
Variable name contains data stripped from the page URL (www.url.com?name=3). I want to use this variable in the jquery array/list passed into the galleryView instead of the number 3. How can this be achieved? I suspect this could be done entirely in jquery (if I had the experience) or via the getdata script used above?
View 6 Replies
View Related
Sep 26, 2011
I am trying to pass a variable from gsp to jquery. But I have a problam.I have variable a which contains 635 element. like this a = [2,555,43,32,43,........]Here I am grabing this value fromgsp to jquery..
<html>
<head>
<script>
[code]....
View 5 Replies
View Related
Oct 5, 2011
I have this image gallery in which clients should be able to determine the order in which their images are shown. The sortable part works. Then I want to pass the new order to the next page called act_writeneworder.cfm (i am using coldfusion)
I just started with jQuery and it is driving me nuts:-) Each time I think I am having it well i am testing and the variable passed through gives an empty string.
My code:
<script type="text/javascript">
$(function() {
$( "#ulsortable" ).sortable();
});
[Code]......
View 2 Replies
View Related
Nov 14, 2011
I'm having issues while passing the triggered event with .on.
obj.on('click', feedmania.handler.itemFeedmania.toggleFormComment);
I've tried:
obj.on('click', feedmania.handler.itemFeedmania.toggleFormComment(e));
obj.on('click', function(e){feedmania.handler.itemFeedmania.toggleFormComment(e)});
[Code]...
View 1 Replies
View Related
Mar 20, 2011
what i want to do-
$
(
"#temp"
).
[Code]....
View 1 Replies
View Related
Oct 23, 2010
I can't seem to get a variable declared from within a post callback, so that I could manipulate my script accordingly. I have delete.php, that deletes an id from a mysql db. If it fails, I want the script to stop and display the error. The .php script echos an "ok" if everything went fine, if not - it echos the error.var abort_error; // set the error variable
$.get("delete.php", { delete: $(this).parent().parent().parent().attr('id') },
function(data){
if(data != 'ok') {
[code]...
View 1 Replies
View Related
Jun 30, 2010
I've made a made a lovely form which is loaded into a dialog upon clicking a link. Works fine, but I want something which identifies they URL clicked on initially (e.g. /stats.php?id=bob ) to end up as a hidden form field. Should be easy but I can't get the syntax/logic right.
[Code]...
View 2 Replies
View Related
Jul 13, 2011
I'm passing a variable to a selector. I have found a few resources and tried to implement them but they're just not working for me. I am trying to find href that match my variable and am working with the following:
var itemLink = /site/Mario-Kart..etc.
$("a[href=" + itemLink + "]").......etc.
I receive an error "Uncaught Syntax Error unrecognized expression: [href=/site/Mario-Kart..etc. ]" I have been placing the quotes in different places to correct the syntax but to no avail. Also, this works with JQuery v1.44 and earlier but not after.
View 4 Replies
View Related
Aug 10, 2010
Two objects on an html page. An event on object 1 effects object 2
$(".video_rg").mouseover(function(event){
var myTriggerId = event.target.id;
var myTargetId = 'video_' + myTriggerId;
document.getElementById(myTargetId).src = 'images/test_object_2.gif'; // this works
// $('#myTargetId').src = 'images/test_object_2.gif'; // this does not
});
My assumption (we know about those) is that I am not passing the data to the $() function correctly, that it is reading '#myTargetId' as a string, and not a variable. I just really want the JQuery code that would do what the document.getElementById code is doing.
View 2 Replies
View Related
Jun 4, 2011
i am devloping a website in php(5.3.5) mysql(5.0) jquery(1.6.1) i have syntax problem while transferring more than 2 values from jquery to php file ..but code dint work...when i try to transfer only 1 variable it works but not with more than 1 variable....here is the codes and the data syntax i tried to send:
[Code]..
View 1 Replies
View Related
Jan 23, 2006
I have a form like this:
<form name="dane" action="wyszukiwanie.php" method="post"
verify_form()">
<input maxlength="30" size="35" name="family_name" value="">
</form>
Now, How can I pass a value from this input to my js script verify_form() ??
And second question: if I have "radio" input im my form how can I check
using js if any option was chosen?
View 1 Replies
View Related
Sep 22, 2009
What I need to do, and it shouldn't be that difficult is this:page1.html - there is a yellow button and a red button - if the user clicks on the yellow button I want to set a cookie with the value "yel" then load the next page - if they click the red button set that cookie with the value "red"page2.html - 'onload' i want to read that cookie and load up the main image to match, something like this maybe?...
document.mainimage.src='img/main_' + variable + '.png'so that the path would be for example 'img/main_red.png'Any help please? Preferably javascript only and as simple as possible. If you think this would be easier sending that variable in the URL instead of as a cookie.
View 1 Replies
View Related
Nov 3, 2009
I think this is what I am trying to do, I am pretty new to javascript so I'm not sure... but here is my question... I got this function below.
function getProductInfo(id) {
var sku = window.document.InvoiceForm.Item0Sku.value;
alert(sku);
}
when I use the 0 I get the right value back, however whenever I try to pass it the id variable with a value of '0' I can't seem to compose the concatenation correct in order to recieve the correct value.I either recieve errors or the whole window.document.InvoiceForm.Item0Sku.value string back in the alert, what am I doing wrong?
View 3 Replies
View Related
Jul 20, 2005
I have two events in a form that I am passing. One is to a javascript
function, the other is to the same .asp page only with another action
to show different data.
Onchange is calls the function updateclasses, which in turn reloads
another drop-down list. It also reloads the .asp page, which
refreshes the data. My problem is that it refreshes the second
drop-down briefly, until the page reloads, but then resets the form.
How do i pass this data to the .asp?
I thought in the .asp, I could just do something simple like the
following, but wasn't sure of the correct syntax. is there a better
way?
view = request.querystring("view")
if view = "" then
view = "SciLink"
else
%>
<script language="JavaScript">
updateclasses(form1, 0, Student)
</script>
<%
end if
.........
View 7 Replies
View Related