![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
nogray
-
Posts
930 -
Joined
-
Last visited
Posts posted by nogray
-
-
Make sure your callback is defined and add alert('test'); on top of your find.js file to make sure there are no other javascript errors.
-
find is a reserved word, try to change your function name.
-
You need to loop through the radio buttons (using a for loop) and check if the radio button is checked or not. If checked, you got your value.
Since you only have 2 radio buttons only, you can also use an if,else statement
-
Not sure why the prototype didn't work for you, I just did this example and it worked
<div style="height:15px;" id="my_div"></div> <script type="text/javascript"> String.prototype.my_func = function(){ alert(this); } $('#my_div').css('height').my_func(); </script>
-
Just use a standard function syntax, after all, this is just JavaScript.
myFunc( $("#foo").css("height") );
If you want to go with chaining style, you would need to extend the prototype of String and Number (since that's the return of the jquery css function)
e.g.
String.prototype.myFunc = function(){// this will be the value...}; Number.prototype.myFunc = function(){// this will be the value...};
-
If the form submits to the same page, it won't be disabled because after it submits it's like a new page. You would need to check if the form was submitted using php and than disable the select menu.
Good luck
-
I copied your code as is and it works fine. It disables and submit the form without any problem. If you are submitting to the same page, the select menu will be disabled for a second or two while the page reloads.
If you still having a hard time, just make one function that disables and submit the form and call that function from the onchange event.
Just a couple of hints, always use a semicolon to terminate each line (e.g. x.disabled=true;)
-
Check out my calendar, http://www.nogray.com/calendar.php
-
Disable first, submit later. When you submit the form, all the code will stop working.
-
Instead of using echo in your php, you would create an array with all the outpust - e.g. array('email'=>'my_email@domain.com', 'address'=>'my_adddress');
When you finish collecting the data, use json_encode to transfer the array into json and echo the json result.
In your javascript function, you would parse the json object (I think jquery has a parse function) and use that javascript object in the function.
-
Use only 1 onchange and call your functions from it.
<Select name='filter11' id="filter11" onChange="makeDisable(); filters.submit();">
-
You would create a div around the image with the height and width of the image and set the background of that div to be the loading div (set it to no-repeat center center). In your image tag, set the style="display:none;" and add onload="this.style.display='';" That sould hide the images until they are loaded.
-
Use an alert on MyInc to check the text value. if parseFloat can't find a number it will return a NaN. You can check for it by using the isNaN(value) function.
e.g.
var my_parse_float = parseFloat(MyInc); if (isNaN(my_parse_float)) my_parse_float = 0;
-
Since you are using jQuery, you might want to start at http://api.jquery.com/category/ajax/ (review this part as well http://api.jquery.com/jQuery.get/ for getting data using ajax). Lots of examples to follow
-
You need to use Ajax.
-
You would need to create an onload event and instead of document.write, use document.getElementById('datetext').innerHTML = '....'; in the onload function. If you don't want to make an onload event, just move all your javascript files to the bottom of the page (above the </body> tag).
-
Change function check_user(this) to function check_user() (remove this)
change $('#username').keyup(function () { check_user(this);});
to
$('#username').keyup(check_user);
-
In Aykay solution, the object.onmouseout = timeout; (timeout is an integer returned by setTimeout). You can replace that line with
object.onmouseout = nextslide;
Or set a global variable called pause and when the mouse over set "pause" to true and when mouse out set it to false and call the next slide. In your function, simply check the status of "pause"
-
You are using a GET for the code and your form is submitted using POST from what I can see "if (isset($_POST['submit'])) {"
Also, never use the user input directly in the query. You would need to filter, validate and escape
http://us.php.net/manual/en/function.mysql-real-escape-string.php
-
In JQuery, you wouldn't need to set the filter style (jquery will do it for you). Other than that, the code looks correct. Make sure to include it when the document is ready.
-
onmouseover and onmouseout will fire everytime the mouse enters and exsits a child node. I think jquery has an onmouseenter and onmouseleaves that solves this problem.
-
If you want to draw an animate in JS, you might want to consider http://raphaeljs.com/
-
You can create a hidden iframe (using css with:0px; height:0px;) and set the form target to that iframe and the action to your php script. The form will submit to the iframe and the user wont see it. If you want to load a thank you page, set a timeout for a few seconds and that send the user to that page.
-
Just remove the line in question and everything should work.
Calling function via a switch does not seem efficient
in Javascript Help
Posted
try this