Passing A Variable From Php To Script Doesn't Work / Sort It?
Jun 21, 2010I have this part of php code...
when I click an unitid, The alert message doesn't work
what's wrong? (i'm newbie to javascript/php/....)
I have this part of php code...
when I click an unitid, The alert message doesn't work
what's wrong? (i'm newbie to javascript/php/....)
I have this marquee code that works fine with IE6 on a Win 2K PC, works fine on IE7 with 2K server and also 2003 server,
but will not work on 2 computers with IE7 on XP.
Anyone know why? code...
I wrote this code to open a page if doesn't exist a cookie but it doesn't open the page do you know where I wrong?code...
View 3 Replies View RelatedI can call a rest service I have running in a 'test' environment fine from other tools (or directly in browser for that matter).
When I call using jQuery nothing happens.
No errors, no javascript messages. Nothing. [code]...
This is a code for a simple calculator that requires the input of an Area and then calculates how many packs of product are then required to cover that area, rounding up to the next full pack, The results should be displayed in a simple HTML form but its not happening. I can't see any obvious errors. Am I missing something.code...
View 3 Replies View RelatedCode:
$('.openDialog').click(function(event){
var width=$(this).attr('width');
var height=$(this).attr('height');
[code]...
I'm trying to do something like above, where I pass the width and height into the Dialog box but it doesn't take the variable.It only works if I put an actual number here instead of a variable.
$('#dialog').dialog('option', 'width', width);
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]..
I have an input form that accepts numbers. I am trying to compare the last field value to the current field value. My problem is that when I use the variable name of the last field in an object path, I get the error "null or not an object". The var 'L' is the problem in the statement below. If I manually type the field name in place of 'L', it works fine. How do I have to write this statement so 'L' works?
Problem statement:
c=window.document.save_info.L.value;
Here is my code: Form element:
Code:
<input style="border:1px solid gray; background-color: #FF9;" onkeyup="moveOnTwo('frm_score1',<?PHP echo $num_holes; ?>,this,'frm_score2')" size="1" maxlength="3" name="frm_adjsc1" id="frm_adjsc1" />
JavaScript Function:
Code:
function moveOnTwo(lastFieldID,holes,field,nextFieldID){
var L = lastFieldID ; var N = nextFieldID;
[code]...
[Code]...
Result is undefined. I am setting global variable for javascript but it doesn't work?
The following script sets values for various input elements and I want exactly the same function to run for the on blur event of at least two fields. The first half of the script works fine - however when I take the $('#prod_id2unit_price').blur(function() and script it as a separate function and then call it from
$('#prod_id2unit_price').blur(tvf());
$('#prod_id2qty').blur(tvf());
it all stops working -
</script>
<script language="JavaScript" >
$(document).ready(function(){
unitprice0 = $('#prod_id0unit_price').val();
[Code]....
Very basic jquery statement. Works in all other browsers tested except IE7 gives me an error.code...
View 2 Replies View RelatedI want to give a warning to user when she tries to navigate away from the page. So I am using a 'Confirm' dialogue. Pressing cancel should stop her from leaving the page.
This is my function which is called from the onUnload of the body tag of the page. code...
When I click on 'Cancel' button (part of the form within the same page), then this code is called and if I press cancel in the dialogue, user stays on same page.
However, I press any outside link, which takes user to some other page, then pressing cancel in the dialogue doesn't stop user moving away from the page.
I had php form in a page and I make the submit function using a javascript function ( some thing like protypes.js ). It is working fine in IE , Opera ... Nut doesn't in Firefox. Here is the code...
View 1 Replies View RelatedThis is a makeshift sort function for a table. I want to replace a div contents with a javascript function call. It works fine if I define the individual case, but the general case doesn't work. The problem lies with the +divHold+ part. It never converges to the passed value on the 2nd iteration. This is my Div:
[Code]...
this is my first time posting on this forum. Hope you could help me. I am a beginner when it comes to Javascript. Here is my first stumbling block in this language.The code that works
if(x==1)
{
p1.value="x";
[code]....
If sort this work:
var myarray= new Array(10,16,35,"0.1",8,4,22,19,1,22,35,9,26,38,40);
with code
function function1(a,b)
{return a - b}
var order02=new Array();
order02=myarray.sort(function1);
but instead of 0.1 I use 0,1 (with comma) not work;
Is possible to solve?
Further, in the function for to sort, what is the difference
between this
function function1(a,b)
{return a - b}
and this
function function2(a, b) {
if (a b) { return 1; }
if (a == b) { return 0; }
if (a < b) { return -1; }
}
If I use 0.1 they work good both;
If I use 0,1 (with comma)
they work dissimilar (different result) and both whatever not work.
My girlfriend wrote an electronic form with some Java script code.
However some buttons don't work on IE (like the "submit and "default values" battens).
Could someone please have a quick view and maybe tell me what should be changed?
Can't work out why this site works in Chrome and Safari but not in firefox? code...
I guess the easiest way for you to see it is just to view the page source?
The "Permission denied" cross site issue.
I have to check from my external domain if a service is running on localhost:8080 of a local machine.
I'm using XMLHttpRequest to do it.
I'm checking a local-web-server, not a file.
Every browser doesn't work, but Firefox. So I'm looking for a work-aorund.
An iframe? a flash swf? an applet java? HTA applications?
A side question is, why does FF work? Because it's a local-web-server?
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]....
I am stuck with the problem with submiting form in IE. This is the part of the code for submission. I am using jQuery validate and form plugins. On other browsers it submits. Tried ie7, ie8, ie9 and none of them submitted. (actually I tried on IE9, but in ie7, ie8 modes.) And they don’t give me any error message.[code]...
It everything looks simple, but it does not work and does not throw errors. Have you any ideas, what I should try to change?
I've this script:
When I press again the "a.item_add" link it doesn't work (doesn't fadein the div again). how can I "restart" the script ?
Why doesnt the following code work in IE. There is an error on the same row as fillText. It says object doesnt support this property or method.
<html>
<head>
<title></title>
<script type="text/javascript" src="excanvas.js"></script>
</head>
<body>
<canvas id='chart' width='500' height='200'>
[Code]...
I did search the forums but couldn't seem to find anything on this specifically. I basically need to pass a key event and a 'name' to nameCheck() after 3 seconds. This works fine in Firefox but Internet Explorer gives the error: Member not found. I'm more of a PHP guy than a JS one
<input type="text" onkeyup="nameCheckTimer(this.value, event)" value="" />
function nameCheckTimer(name, evt) {
setTimeout(function(){return nameCheck(name,evt)}, 3000);
}
function nameCheck(name, evt) {
//need name and the key event to be available here. I have code to handle the key codes which works fine
}
OK so Ive been using jquery for a little bit now and love it. I am a ColdFusion developer. I have a need where I would like to present the user with a list of categories and the user can drag and drop to sort, but then I need to post this new sort order to the database. So I see there are a ton of cool drag & drop plugins for jquery. I understand how they work and I can get it to work as far as spitting out DIVS or spitting out ULs that can be sorted, but then what? So now they are sorted on my screen and not really part of the form. How do I translate that into something I can do a post to the database with? Do I do an AJAX call every time they drop an item and try to extrapolate the sort order on that item after they drop it? Do I populate a hidden form field with the constantly updating sort order list? MAybe a list of ID's? How does everyone else go about this this task? I'm sure there is more than one way and I'm sure this is a common task.
View 1 Replies View RelatedI 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?