Let's say I have a PHP page and inside that PHP page I just have <?php echo "Hello World!"; ?> and I want to use JavaScript (preferabbly jQuery) and AJAX to CALL that php page and return it's output (which would be "Hello World!")
How is this done?
...
I have the following:
$('document').ready(function () {
$('.autosubmit').change(function () {
$(this).closest('form').submit();
});
$('#textBox1').focus();
});
If I don't have the focus() line, then everything works as expected, the data in the textbox with ID "textBox1" changes, focus is lost ...
In the code below I use the jQuery ajax() function to do a longpolling call. While the ajax function is running, I click on the link to download Firefox (for example) and the ajax call stops.
It actually acts like the call was succesful, but it wasn't, it simply stopped running.
Why is that? I want to function to continue...
I have s...
Ok so i have this page. As you can see on this page I have a header that if you click on the three little dots on the right a new image and movie is displayed. this works great at the moment. The problem is the client now wants the page to rotate and I have tried this in the past but the problem arises when someone clicks on the movie an...
i am using jquery plugin and i got stuck in how to display the confirmation window from code behind and if the user choose "ok" than go ahead delete otherwise ignore.
jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
jAlert('Confirmed: ' + r, 'Confirmation Results');
});
anybody have done similar?
...
Hi, I have this:
$(document).ready(function()
alert($("td").val());
});
But the alert is empty.
How do I select the values in my table with jQuery? Thank you.
edit: I was asked what for:
I have a website that I need the database data from for a javascript function. I get the data from the database, put it a table and then se...
I'm trying to make a sleek login function here =)
I want the "login experience" to be smooth and seamless, so I don't want the user to "feel" like he/she is being "redirected" and taken back to the same page again.
So the process goes:
User X visits page A
X is not logged in
X presses on Login btn (that lives in a in a div together w...
I know it's generally frowned upon, but in this case I think it might actually be helpful. I want to play a little "ding" sound when a new item is posted on my site. I'll leave the option to turn it off of course.
Now should I do this with JavaScript? Would jQuery be helpful? Or should I use Flash? Looking for something that is widely c...
Hi!
I want to make my own authorization for my asp.net mvc2 application, I want to use the default LogOn user control, I add this code to user control:
<a id="log_in" href="#">log in</a>
<div id="dialog" title="Please sing in">
<p>Login:</p>
<p><input type="text" /></p>
<p><input type="text" /></p>
...
hey guys,
$(document).ready(function(){
function getDocumentHeight()
{
// What's the page height?
var height = $('#mainbody').height();
alert(height);
...
getDocumentHeight();
jQuery keeps alerting "null" for the height of my #mainbody div. i don't get why, it should at least be 500px or so.
thank you.
...
var cur_storage_unit = $('#storage_unit').val();
$('.size_unit').change(function() {
var id = $(this).attr('id');
//This is how I want it to work, but not sure how
'cur_' + id = $(this).val();
});
The user 'changes' a of class 'size_unit' and id of 'storage_unit'. I want to then set the value of 'cur_storage_unit' to the...
I have a form with a submit button and it works fine, but I now have a user request to make the form get saved (posted to save action) if a link on the page is clicked and the form is "dirty".
I've got the logic in place by having an isDirty JavaScript variable, now I would like to post the form from the JavaScript function when it is d...
I know clientside webcarts could be modified by the visitor, in my application that is OK.
The only webacart without serverside logic and validation I have found is simplecart-js. However it is not using jquery.
Can anyone suggest a jquery cart with the same functionalities, or even more basic? I assume it would make use of the ezcookie...
im trying to pass on the id attribute to the file.php, but its giving me 0 every time, when i try to insert it into the database, the javascript and the html is provided!
$(function() {
$(".follow").click(function(){
var element = $(this);
var I = element.attr("id");
var info = 'id=' + I;
$.ajax({
...
In javascript or jquery I need to add an alert when the user clicks on the browser back button that has an ok/cancel button model, but instead of "Ok" it should say Leave and instead of Cancel it should say Stay. Thanks
...
I want to open a dialog box from inside colorbox. Which dialog plugin works well within colorbox?
...
Is there a jQuery technique to select all the page controls/divs with a non-zero scrollbar position?
I'm trying to solve a problem faced by many; essentially after a partial asp.net postback all the controls/divs that had a scrollbar with a non-zero value (ie: were scrolled down to some position) are reset to the zero (top of the scroll...
I am trying to add a row to existing table by using clone() method. It is working fine and I also want to change CSS class name for all div elements under each td from the original row. Basically I want to make some td elements as editable. I have tried this by adding "row.find("td div")..." as you see in the code, but this code has no e...
It seems that this code:
$(function(){
$('.show_hide_login').toggle(
function (){
alert('show');
$("div#fullpage").show();
$("div#loginbox").show();
},
function (){
alert('hide');
$("div#loginbox").hide();
$("div#fullpage").hide();
}
); }...
Hey,
Does anybody know, if i have an object like $('#input') how can I get the html that would make it up, like <input id="input" /> as a text string?
Thanks!
...