[jQuery] jquery .live with a dialog box-can't get dialog to work

2009-06-06 Thread ktpmm5


I'm currently loading data from a mysql db - if a certain condition is met, a
volunteer button is displayed.  When the button is clicked I want to display
a dialog box, and a php file is called to populate the box.  First I
initialize the dialog:
[code]
$(document).ready(function() {  
$("#chaincrewDialog").dialog({ autoOpen: false });  
});
[/code]

Here is how I'm calling the dialog box:

[code]
$('.volunteer').live("click", function(){   
// this gets the game number from the table to pass to the php 
file
var gameno
=$(this).parent('td').prev("td").prev("td").prev("td").prev("td").prev("td").html();
  
$('#chaincrewDialog').dialog('open').load("popup.php?gameno="+gameno);
});
[/code]

My click button works fine, and there are no js or firebug error messages. 
My dialog is called with the following parameters: 
[code]
 $(function() {
$('#chaincrewDialog').dialog({
resizable: true,
//bgiframe: true,
autoOpen:   false,
resizable:  false,
modal:  true,
dialogClass:'flora',
title: 'Volunteer',
overlay: {
opacity: 0.5,
background: "#A8A8A8"
},
height: 600,
width: 700,
buttons: {
'Close': function() {
$(this).dialog('remove')
}
}
});
[/code]

I'm sure I'm missing something easy, but I can't get my dialog to even
display
-- 
View this message in context: 
http://www.nabble.com/jquery-.live-with-a-dialog-box-can%27t-get-dialog-to-work-tp23906786s27240p23906786.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] pass variable from button to jquery

2009-02-01 Thread ktpmm5


I am displaying a bunch of data from a mysql database, shown below.  After
the data is displayed, I put a button for each line of data. When a user
clicks the button, I call the load function.  I am trying to figure out how
to pass the id (received from the mysql db) for each particular record to
the jquery load function.  Here is my code:
[code]
html
while($row = mysql_fetch_array($result))
{
echo $row['day'];
echo "";
Volunteer
.

js
$("#contentcolumn").load("popup.php?gameno=?"); 
[/code]

How can I pass the id (received from mysqldb) via the Volunteer button? I'll
then use this to lookup and display more data...
-- 
View this message in context: 
http://www.nabble.com/pass-variable-from-button-to-jquery-tp21780863s27240p21780863.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] ie problems with jquery - xhr.open(type,s.url,s.async)

2008-12-31 Thread ktpmm5


I've got a simple web page that works fine in FF, but chokes in IE, both 7
and 8. All pages are local, including popup.php. I am displaying tables with
data from a mysql db - the tables display, but the error comes in when I
include the function popup js code. The error is "permission denied, code0". 
the debugger leads me to line 28 in jquery - xhr.open(type,s.url,s.async). 
Again, this all works in FF (and Safari), but IE throws an error.  Can
anyone help me figure out what this is all about?

[code]
function popup(gameno, newdate, opponent) {
var url = 'popup.php?gameno='+ gameno + '& date=' +newdate + '&
opponent=' +opponent;   
$('').addClass("flora").dialog({  
modal: true,
resizable: true,
bgiframe: true,
autoResize: true,
overlay: {
opacity: 0.5,
background: "#A8A8A8"
},
title: opponent + "  " + newdate, 
autoOpen:true,
resizable:true,
width: 850,
height: 500,
buttons: {
'Close': function() {
$(this).dialog('destroy')
}
}
 });
}
[/code]
-- 
View this message in context: 
http://www.nabble.com/ie-problems-with-jquery---xhr.open%28type%2Cs.url%2Cs.async%29-tp21232878s27240p21232878.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] pass variable from button click to iframe

2008-12-29 Thread ktpmm5


I am currently grabbing data from a mysql db and presenting it to the user in
a table.  In certain cases, a volunteer button is displayed to the user.  I
want the user to click on the volunteer button, and have an iframe dialog
pop up.  When the user clicks on this volunteer button, the corresponding
"date" column should be passed to the iframe (which in turn uses the iframe
to look up the correct data in another db).  I can't seem to figure out how
to pass the "date" variable.

here is part of my php file:

[code]
while($row = mysql_fetch_array($result))
{
echo "";  }
echo $row['date'];
echo "";
if ($row['location'] == "PVI")  {
  echo "";
echo "";

[\code]

That part works fine.  When the user clicks on the Volunteer button, here is
the jquery code:

[code]
$('#volunteer').click(function(){ * need to get date in here
somewhere!
popup(date);
return false;
});
[/code]

And here is the popup part - I actually get the dialog, but since I can't
figure out how to pass the date, it can't look up the correct info!

[code]
function popup() {
var url = 'popup.php?date='+ date;  
$('').addClass("flora").dialog({  
modal: true,
resizable: true,
bgiframe: true,

[/code]

If anyone could point me in the right direction, I'd appreciate it!
-- 
View this message in context: 
http://www.nabble.com/pass-variable-from-button-click-to-iframe-tp21207413s27240p21207413.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] flexigrid problem - no headers, data in wrong format

2008-09-08 Thread ktpmm5


I have a simple menu where I click a link to show some data in a div:

[code]
$('#view_data').click(function() {
$.get("viewplayers.php",
function(data){
$('#contentcolumn').html(data);
});
return false;
});
[/code]

viewplayers.php is the standard flexigrid setup, and the data it retrieves
is correct - the only problem is that is it not in a grid, and the column
headers are not there.  Here is a sample of the data it puts into my
contentcolumn div:


[data]
{ page: 1, total: 90, rows: [ {cell:['John','Smith','(703) 455-2485','7807
Smithfield Road','Springfield','DC','22153','Sandy','Smith','(703)
222-','[EMAIL PROTECTED]','John','Wright','[EMAIL PROTECTED]','...
[/data]

Here is my viewplayers.php script:

[code]




$(document).ready(function(){
$.getScript('js/flexigrid.js');
$("#contentcolumn").flexigrid
(
{
// url: 'viewplayers2.php',
dataType: 'json',
colModel : [
{display: 'First Name', name : 'p_firstname', 
width : 60, sortable :
true, align: 'center'},
{display: 'Last Name', name : 'p_lastname', 
width : 80, sortable : true,
align: 'center'},
{display: 'Home Phone', name : 'homephone', 
width : 100, sortable :
true, align: 'center'},
{display: 'Address', name : 'address', width : 
140, sortable : true,
align: 'center'},
{display: 'City', name : 'city', width : 80, 
sortable : true, align:
'center'},
{display: 'State', name : 'state', width : 20, 
sortable : true, align:
'center'},
{display: 'Zip', name : 'zip', width : 80, 
sortable : true, align:
'center'},
.
],
sortname: "p_lastname",
sortorder: "asc",
usepager: true,
title: "Player Data",
useRp: true,
rp: 10,
showToggleBtn: false,
width: 'auto',
height: 'auto'
}
);   

});







[/code]

-- 
View this message in context: 
http://www.nabble.com/flexigrid-problem---no-headers%2C-data-in-wrong-format-tp19378185s27240p19378185.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] send dynamic variable via ajax post in flexigrid

2008-07-11 Thread ktpmm5


I have a php file that gets a variable from another file:

[code]
  $gameno = $_GET['gameno'];
[/code]

At this point, the $gameno is correct, because I write the value to my error
log.

The problem comes in where I need to use this variable to display data in a
grid.  I want to send the variable via the url variable.  This variable will
be used in the WHERE clause to get data from a mysql db:

[code]
$("#flex1").flexigrid
(
{
url: 'post2.php?"gameno="+gameno',
dataType: 'json',
colModel : [
.
[/code]

-- 
View this message in context: 
http://www.nabble.com/send-dynamic-variable-via-ajax-post-in-flexigrid-tp18407466s27240p18407466.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] imagebox display problem - z-index issue??

2008-07-08 Thread ktpmm5


Im using the imagebox interface plugin to display 6 pictures.  However, they
display not on top of my page, but partially on top and partially behind the
rest of the page - ???   It's not complicated to use, so Im wondering if
others have this problem.  I'm using it with jquery 1.2.6-

Here is how I'm setting it up-

{
loaderSRC: 'img/loading.gif',
closeHTML: ' img/close.png ',
border: '25'
}
);
-- 
View this message in context: 
http://www.nabble.com/imagebox-display-problem---z-index-issue---tp18352658s27240p18352658.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] passing variable from javascript to php via iframe using tableeditor

2008-07-08 Thread ktpmm5


The user starts out by clicking a link - 
[code]

Location

This leads to a js file where an iframe is called to pop up a dialog box -
it is at this point that I want to pass a variable in the url:
[code]
var vtwo = {
two: function() {
var url = 'test.php?gameno=2';
$('').addClass("flora").dialog({ 
title: .,
modal: true,
overlay: {
opacity: 0.5,
background: "grey"
..
[code]

I've also tried passing it these ways:
var url = 'test.php?gameno=' + "5";

then in test.php the first thing I do is get the variable and print to a log
file- the url in my browser shows the variable, but I cannot get it to print
out via php:
 
[code]
session_start();
$gameno = $_GET['gameno'];
error_log("gameno is  $gameno", 0);
[/code]

Eventually, I need to pass this variable to a mysql database:
[code]
if($('.new',grid).length>0){
$.ajax({
   type: "POST",
   dataType: "json",
   url: "save.php",
   data: { firstname: $('#firstname').val(), lastname:
$('#lastname').val(), homephone: $('#homephone').val(), cellphone:
$('#cellphone').val(), email: $('#email').val(), job: $('#job').val(),
gamenumber: $gameno },
   success: function(data){
alert("Thank you for volunteering!");
$("#flex1").flexReload();
   }
. [/code]

Can anyone help??
-- 
View this message in context: 
http://www.nabble.com/passing-variable-from-javascript-to-php-via-iframe-using-tableeditor-tp18348478s27240p18348478.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] tablesorter - adding rows - need help formating

2008-07-04 Thread ktpmm5


I've got a table that pops up in an iframe, with data from mysql, with id of
datatable.Underneath the table are two buttons:

 


When I press Sign Me Up, I want an empty row to appear, for the user to
enter.  First question:  the empty row comes up, but the formatting is all
wrong - all of a sudden I have scrollbars, the text is large, etc.  I've
tried using the same id and class of my first table, but it's not working. 
Can someone look at the code below and see what I'm doing wrong?

Secondly, is there a way once the user presses Sign Me Up, for that button
to change to "Save".  Then the user will press Save, and I'll send the data
back to mysql.  

$('#addNew').click(function() {
$("#datatable").append("");
$("#datatable").trigger("update");
$("#datatable").trigger("appendCache");
   return false;
});
-- 
View this message in context: 
http://www.nabble.com/tablesorter---adding-rows---need-help-formating-tp18281920s27240p18281920.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: add new row to table

2008-06-29 Thread ktpmm5


I tried that and now I get the js error:

defaults.TABLE[0] has no properties


It's almost like it's trying to add the row to a table in my main page, not
my iframe (with my table?).  
-- 
View this message in context: 
http://www.nabble.com/add-new-row-to-table-tp18174322s27240p18180577.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] add new row to table

2008-06-28 Thread ktpmm5


 I've read all the other info about adding a row to a table and I just can't
get it to work.  I've got my dialog popping up with  two buttons.  When the
user clicks Volunteer, I want an empty row to appear at the bottom of my
table and the "Volunteer" button to change to "Save".  The user would enter
their info and press save.  The data is then saved to the db. I've tried
tableEditor, but can't even get a javascript error to troubleshoot.  Can
someone help?  I promise to write this up in the FAQ laterhere's code to
call the popup:

[code]
var Demo = {
   three: function() {
   var url = 'v_concessions.php?i='   "5";
   $('').addClass("flora").dialog(
{
title: "St. Mary Ryken",modal: true,overlay:
   {
 opacity: 0.5,
 background: "grey"
   },
width: 850,
 height: 400,
 buttons:
 {
'Volunteer': function() {
  onclick=add()},
'Cancel': function() {
 $(this).dialog('destroy')}
  }
});
}
[/code]

Here's my add function:
[code]
function add(){
  alert("clicked add");
  var options = {
 CLASS: 'newRow',
 VALUES: {
 email: '[EMAIL PROTECTED]',
  lastname: '',
  firstname: '',
  homephone: ''
  }
  };

  jQuery.tableEditor.lib.appendRow(options);}
[/code]


-- 
View this message in context: 
http://www.nabble.com/add-new-row-to-table-tp18174322s27240p18174322.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] tableEditor plugin - add new row - using in an iframe gives error

2008-06-26 Thread ktpmm5


I'm trying to use the tableEditor plugin to add a new row to my table (don't
need to edit current data, just add new rows and save to mysql db).  I've
got my table loading in an iframe, but I'm getting the error that
default.Table[0] has no data.  The user clicks on a link which loads the
data from a mysql db into the iframe - this works ok.  Then I want to the
user to be able to click a button, and have an empty row open which they can
fill in and press save. The data will then be saved to a mysql db and the
popup disappear.  The table is sortable, but I cannot edit/add rows. Below
is the code I am using - can anyone see why  the tableEditor plugin doesn't
seem to want to work?

[code]
$(document).ready(function() {
$("#datatable").tablesorter({
widthFixed: true
 widgets: ['zebra']
}).tableEditor({
EDIT_HTML: 'EDIT2',
SAVE_HTML: 'Save',
FUNC_PRE_EDIT: 'preEdit',
FUNC_POST_EDIT: 'postEdit',
FUNC_PRE_SAVE: 'preSave',
FUNC_UPDATE: 'updateTable'
});
[/code]
-- 
View this message in context: 
http://www.nabble.com/tableEditor-plugin---add-new-row---using-in-an-iframe-gives-error-tp18144559s27240p18144559.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] need to popup window, grab values from mysql db, have user edit, and save data

2008-05-02 Thread ktpmm5

I'm looking for the best popup window plugin available.  I want
clients to be able to view a schedule, and click a date.  This will
display a popup window with values from a mysql database.  The user
will then be able to add data (not delete or edit) more data, press
save, then close the popup and go back to the original schedule.
Right now I am leaning towards using the UI Dialog plugin - does this
sound like a viable use for this plugin?


[jQuery] tablesorter and pager question - getting data from mysql

2008-04-18 Thread ktpmm5


I'm missing something basic I think in using the tablesorter function.  

I have an index.php that does the following:
 - sets up my divs, including one called "content" where I want all my
data to go
 - included jquery, superfish.js (menus), data.js, tablesorter, and
tablesorter pager

My data.js file has all my jquery calls - when I click a menu item such as
"Search by Last Name" the fie "by-lastname.html" is loaded into the content
div.  This is a simple form - I type in a last name and click search.  The
form in by-lastname.html calls searchlastname.php - this file contains the
following code:

$("#content")
.tablesorter({
widthFixed: true,
widgets: ['zebra'],
debug: true
})
   .tablesorterPager({
container: $("#pager"),
positionFixed: false
});

This file connects to a mysql database, and queries for the appropriate
info. At the bottom of this file I have some includes:  nav.inc (which loads
the menu's), header-table.inc (which prints out the header for the table)
and table.php.  Table.php contains the following info:

echo("");
# now display data itself

echo("");
while  ($row = mysql_fetch_array($query))
{
echo("\n");
echo($row["last name"]);
echo("\n");
echo($row["firstname"]);
.. rest of the data..and I close tbody, the table and the data div.
At the bottom of this file, I copy everything from the data div to the
content div:

   
document.getElementById("content").innerHTML=document.getElementById("data").innerHTML;



My problem is that the data prints out, but the next and previous buttons
print out at the top of the table, not the bottom.  I have tried the
fixedPosition: true, but that did nothing. The zebra widget is also not
working, which leads me to believe there is more wrong here than I think.  I
have tried debug: true, but that also produces nothing.  Can someone see
what I am doing wrong?  I know I am close, just cannot figure out what is
going wrong.
-- 
View this message in context: 
http://www.nabble.com/tablesorter-and-pager-question---getting-data-from-mysql-tp16767295s27240p16767295.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] using jquery to load content of html file in a div

2008-04-07 Thread ktpmm5


My index html file is a nav menu with the following options:

   
   Parents
   
# Game Schedule 
# Field Directions 

Further on in my php file I have the following:

   
   


In my js file, I have the following:

$(document).ready(function() {
$('#game-sked').click(function(){
$('#sked').toggle('fast');
return false;
})
..   - similar for all my links

This works great for the first item selected - usually the game schedule.  I
have the game sked loading with tabs for Varsity, JV and Freshman.  It
displays using jquery and jtabs no problem.  The issue is after I choose
Game Schedule, I choose Field Directions and I want the appropriate html
file loaded.  It does load,but the jtabs stuff is not right - in other
words, each of the skeds (tables) is displayed one after the other -
obviously something is not being reset in jquery or jtabs.

Is there a better method?  Should I call the html file directly from my
javascript file?  If so, how do I tell it what div to load in?
-- 
View this message in context: 
http://www.nabble.com/using-jquery-to-load-content-of-html-file-in-a-div-tp16540876s27240p16540876.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] click on a link and have a table appear - can't get it to work

2008-04-05 Thread ktpmm5

I'm a newbie to jquery, so no flames please...I have a basic 3 column
web
page - nav, center and left.  That works great.  My left column is
navigation.  When I click on a link on the left nav pane, I want a
basic
table to appear in the center and right panes - not even getting
anything
from a database, just displaying a schedule table.  It seems pretty
easy but
I must be doing something wrong.  Here is my jquery js:

 $(document).ready(function()  {
$('#btn-slide').click(function()  {
$("#col1").show('slow');
return false;
 })
   })

Here is my nav stuff:
  
  
   #  id="btn-slide">Schedule 


 Later in the code is the middle column that I want replaced with
the
new material when the user clicks on a nav link:
  
 blah, blah...
  

What am I doing wrong?