JQuery :: Trouble With Php While Loop And $.post
Aug 4, 2011
My website is an Magic the Gathering website, so it involves card,cardsid,decks etc.I have a searchresult.php page, which shows the results(cards) after you an SQL query has searched through my SQL database.Then every result get's a links(add card to deck) behind it which opens an unique popup window.Now my problem is, in this popup there must be an unique form which check via ajax whether the 'card' is already in the deck. Well I got as far as this works, well it does for my first search result.Altough the input's are unique in every popup, as they should be. Only the values of the input's of my first searchresult are submitted to the process form.
The includes of the Jquery files is not included in this code, but it is included in the real code. it is in a seperate file, it would be stupid to just show I include the jquery library and files xP, because that IS the case.[code]
View 6 Replies
ADVERTISEMENT
Mar 26, 2010
This is the loop I'm trying to use to check for bullets hitting rocks. the function worked if I used actual numbers instead of the j variable, but I wanted to loop through all the rocks.Can anyone see why the inner function loses the j index and says asteroids[j] is undefined? the hit test is removing the bullets! it's working! the asteroids[j] was used in the hit test!
View 6 Replies
View Related
Jan 28, 2011
I have a php-loop to read an xml file (id and comment). Now to my question, must i write the Script into the loop or can i assign via a parameter (or whatever) in the header Script?
[Code]...
View 1 Replies
View Related
Mar 28, 2009
Ok heres my deal. I want a javascript that generates a random picture everytime it is refreshed i got this code which is here:
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
var theImages = new Array()
[code]....
View 16 Replies
View Related
Oct 22, 2009
I'm working with ClueTip and have run into some oddities.In particular, I want to show ClueTip when a textbox receives focus.The source shows me that I can use activation:'focus' for this and that will result in the cluetip showing on focus and disappearing on blur. Showing the cluetip is working fine, blurring is not.[code]
View 4 Replies
View Related
Sep 19, 2009
In order to allow users to filter content, I've created a small checkbox list. To each checkbox is attached an ID, and too some divs on the page are attached these id's too (in the class attr that is); one div can be attached to multiple id's, and so have multiple classes.
In order to show or hide my div's I wrote :
function couponsVisibles(){
$('.checkInteret').each(function(){
var coche = $(this).attr("checked");
if (coche) {
var idCoupons = $(this).attr("id");
$(".zoneCoupon , div[class='" +idCoupons+ "']").each(function(){
$(this).fadeIn();
});
}});
}
$(".checkInteret").click(function(){
var coche = $(this).attr("checked");
if (!coche) {
var idCoupons = $(this).attr("id");
$(".zoneCoupon , div[class='" +idCoupons+ "']").each(function(){
$(this).fadeOut();
});
}couponsVisibles();
});
It looks like my selector "$(".zoneCoupon , div[class='" +idCoupons+"']")" doesn't work, but I can't figure out why. I've started using the [attribute*=value] selector, but this selector doesn't seem to make a difference beetween class='8 10' and class='8 1'...
View 1 Replies
View Related
Feb 1, 2010
I have two swf using AS 2.0 in a webpage. One of them is hidden at the start, but when I rollover on the other one, the hidden one is supposed to show up and the visible one is supposed to hide.However, everytime I rollover it, it says peelOff() is not a function. Although it is a function, since I'm able to control it with any other events such as "click".I could use the callback of a mouseover to call the peelOff() function?
View 1 Replies
View Related
Aug 17, 2010
I want to run an external function outside the post.
This is what I have currently.
On success of the post I want to run the setGrandTotal(); function which will do some calculating for me.
View 1 Replies
View Related
Oct 11, 2011
How can I post array of controls through &.post() in jQuery??I have some of checkboxs in my page and declare them like this
<input name="mycheckbox[]" "value="myvalue" type="checkbox">
I can get it works if I using <form> tag with an action="post" and a submit button to post to another php page by using this statement to get all controls in receiver's page _GET['mycheckbox'];I have tried
$.post('ajax/test.php", {checkbox: $
(
'input[name="mycheckbox"]'
)});
[code]....
View 1 Replies
View Related
Dec 6, 2011
I just started using jQuery, but i can't get it working. On the index.php page I want a search form, that post's to search.php. Following next, I want that the html of search.php (which will only be a table with the results), is show into the 'results' div in the index.php.
This is the code im using:
<script type="text/javascript">
/* attach a submit handler to the form */
$(document).ready(function(){
alert("Ok - 1");
[Code].....
The alert's are for debugging, but none of them show's up.
View 3 Replies
View Related
Jul 29, 2011
I have the code below, how could it be modified to loop over and over and reload the xml file each time. Flow would be: load xml, run thruogh code to display each xml node one at a time, when reach last node, start all over, reloading xml file,
[Code]...
View 2 Replies
View Related
Jul 20, 2005
I would live to find a different way to do this, but evidentially I am not able
to open a Text-File in JAVASCRIPT and fill an Array with the Values, so I have
to do it this way.
I am doing the following:
View 3 Replies
View Related
Aug 27, 2007
I'm using 'this' so that only the element that is clicked changes, what I need is some way of specifying a background color for anything that isn't 'this' and then continue to change the clicked element. Is this possible? The only other way I can think of is to add a class to each menu item and then only apply the backgroundColor = "Transparent" if the class of the clicked element matches that stored in a variable and other wise apply the standard background color. Though I may be shooting wide of the mark. Code:
View 3 Replies
View Related
Mar 30, 2007
I know this is really more of a DOM or IE DOM question than a js one but the js forum seems to be the most fitting...
I am working on a page where I have included an instance of FCK Editor (which is just a script that creates your standard Rich Text Editor interface inside a form).
What I want to do is call a function which retrieves the newly typed data (along with the formatting) and does something with it.
The "problem" is that FCK creates it interface inside an Iframe inside another IFrame. No problem for FireFox, Netscape, etc... It just a matter of a couple "getElementById()"s and "contentDocument"s. However IE does not support contentDocument. Instead IE puts all Frames (including IFrames) in the frames array. Which is fine, I can still navigate my way down the tree to my target Iframe with document.frames[0].frames[0]... the trouble is, you cannot (or I can't figure out how) to access elements on the page inside the nested Iframes. I can access properties of the Iframes (such as location).
I'm thinking that this is how IE is "supposed" to work but is there any way that I can access elements inside a page inside of an Iframe or nested Iframes? Code:
View 1 Replies
View Related
Dec 20, 2007
I'm using the following line to delete cookies. It works great in Firefox, but in IE the cookie still exists, it's just lost all of its data. I can check to see if the data is there, and ignore the cookie if it isn't, but since I'm looping through my cookies when the page builds, I rather it be completely removed.
Code:
document.cookie = name + "=noop; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; path=" + path;
View 2 Replies
View Related
Dec 12, 2006
I have a cgi program which outputs a fairly hefty amount of
html/javascript for doing a complex slide show sorta thing in a variety
of areas in the browser. I accomplish this by creating a series of
iframes and populating each iframe which its own copy of the code and a
list of items to display. It previously had it working tickety-boo
with both IE 6 and Firefox. I've had to concentrate on adding new
features to the IE side and am now attempting to get everything working
properly in Firefox.
The issue I'm running into is when I use the form
document.getElementById('some_id').someFunction Firefox often replies
that the object has no properties. I've handcoded some smaller
versions of the my program in straight html and, sure enough, they work
great. So, I'm screwing something up in my main program whereby
Firefox can't see the objects. Code:
View 9 Replies
View Related
Jul 20, 2005
How can I use Javascript to look at variables passed from another page
using the GET method( a website address) and load that website?
View 1 Replies
View Related
Nov 14, 2000
I've been working on trying to compile this bit of Java code. It's taken from an existing code (with permission) that I know works. The problems started when I added an array. Code:
View 6 Replies
View Related
Nov 5, 2007
I have a hidden "in between" page where I dynamically create a form and
hidden inputs using ASP that should submit to a second page where this data
will be used.
The form is automatically submitted using javascript. This code works in IE
and in Firefox.
The problem I am facing now is that the series of these same pages I am working with are now being used inside an iframe. Since this change, the javascript submit no longer works in Firefox, but does in IE. Code:
View 3 Replies
View Related
May 6, 2011
Working on a validation API and having trouble with a PO BOX validation Regular expression. I tried adding ? and ?! in front of the regular expression but I want the exact opposite of what is doing. I want any entry besides combination's of po box entries to be allowed.
View 3 Replies
View Related
Jan 7, 2011
I'm dynamically generating an image tag, and the final slash for self-closing the tag is not coming through, even though the slash is escaped with a backslash. Worse, I think this is screwing up my attempt to select the image in another function. Any ideas what could be causing problems? [code]The image does appear, but I can't reference it later on.While everything works fine if I drop the " img" from the call and let clicking anywhere in the div start the search.Any idea why escaping the slash isn't working?
View 11 Replies
View Related
Mar 25, 2007
hey guys i am having trouble changing my array code to include a 'for/ in' structure the code i am trying to change is below:
<script type="text/javascript">
var contents = new Array(3)
for(k=0;k<3;k++){
contents[k] = new Array(2)
}
contents[0][0]="Player Name"
contents[0][1]="Player Number"
contents[1][0]="Shay Given"
contents[1][1]="1"
contents[2][0]="Scott Parker"
contents[2][1]="6"
function changeContent()
{
var r=document.getElementById('myTable').rows
for(i=0; i<r.length; i++){
var x = r[i].cells
for(j=0; j<x.length; j++){
x[j].innerHTML = contents[i][j]
}
}
}
the code i am using currently using changes the contents of a table in
my main page, the code for the table is below:
View 2 Replies
View Related
Nov 4, 2010
I'm using the ibox javascript library which is very similar to lightbox in functionality. I'm trying to do something seemingly simple but am having difficulty.
My goal: Use ibox to show a dynamic graph based on a clicked link.
When the user clicks the link it will grab data from the current table row, format it, and render it using the flot library. This will all be done in a hidden div. This is easy enough. Then the hidden div will be displayed using ibox.
These are both easy enough tasks individually. What i'm having trouble with is combining them into a single click.
Currently I have it setup like this.
Code "Html:
When a user clicks this link the loadGraph() function never executes. I'm assuming this is because priority is being given to ibox (indicated by the rel attribute). How can I force my onclick event to be executed before the ibox is loaded?
I would even be ok if it was executed after the ibox was loaded, my main goal is to get both actions to occur in a single click.
View 1 Replies
View Related
Nov 30, 2004
I have an internet key on my keyboard, and I'm sure others do too. When I push it, it opens Internet Explorer to my homepage. If I am already in internet explorer, and the page is focused, and I push the internet button, then it changes the location of the page to my homepage.
I want to prevent it from doing this for my users whom visit my site. I have a popup, and while in that popup, it is likely they push that button, or start internet explorer. Is there anyway to detect this, and either block it, or blur the page before it takes effect in Javascript?
It DOES NOT happen if I push START>Internet Explorer since when I click Start, it blurs the webpage.
View 12 Replies
View Related
Aug 31, 2009
I get the navigation disappeared with the nested slider. A workish on line example[URL].. try to click on design and than on the menu below. I don't know which way to turn The script is based on [URL]...
View 1 Replies
View Related
Oct 5, 2001
I am having difficulty using javascript to validate form fields with whitespaces in the element names (ex: First Name, Last Name).
here's a code snippet:
###
function validate(formObj) {
if (document.form1.Payment Method.checked){
do something here...}
###
the problem is that javascript won't read the element "Payment Method" unless i mash the name into one word. (i don't want to do that because i later use the element names to provide a printable customer receipt
i tried using the ascii octal number for a whitespace in the above code (...form1.Payment40Method.checked...), but to no avail.
View 2 Replies
View Related