Wayne Barron
asked on
Click form button, refresh <div> with JQuery
Hello All
I am converting all my extremely load code with shorter more flexable code.
The below I found for clicking a link to refresh a div.
This is not working?
I also have this code, which refreshing on a timer.
Would love to get it to work if possible on a Button click
Any ideas would be great on this issue.
Thank You
Carrzkiss
I am converting all my extremely load code with shorter more flexable code.
The below I found for clicking a link to refresh a div.
This is not working?
My Button
<input type="submit" name="Submit" value="Save" class="lButton" id="Save" />
<div id="tableContainer">content here</div>
my code---------------
$(function() {
$("#Save").click(function(evt) {
$("#tableContainer").load("http://site.com/Server/MyRefreshBox.asp")
evt.preventDefault();
return false;
})
})
I also have this code, which refreshing on a timer.
Would love to get it to work if possible on a Button click
var auto_MemLoad = setInterval(
function()
{
$('#MemLoad').fadeOut('slow').load('http://site.com/Server/MyRefreshBox.asp').fadeIn("slow");
}, 30000);
Any ideas would be great on this issue.
Thank You
Carrzkiss
you will find the answer here at: http://forums.asp.net/t/1130175.aspx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It surely appears to be a jQuery conflict with another library.
Try replacing the "$" in your code with "jQuery" and try it again.
Try replacing the "$" in your code with "jQuery" and try it again.
ASKER
Thanks for your input Vali
What I am using now, is working so I am going to stick with it.
I will look in on this issue at a later date if the code is needed.
Thank You
Carrzkiss
What I am using now, is working so I am going to stick with it.
I will look in on this issue at a later date if the code is needed.
Thank You
Carrzkiss
ASKER
I just ran into an issue with Google Chrome and IE8 not refreshing on the button submit
FireFox is working as expected.
So.
Back to the other code.
I did as you suggested and still a no-go.
Any idea's (or) better yet, and actual working code would be GREAT! about now.
That works across all browser platforms.
Thank all;
Carrzkiss
FireFox is working as expected.
So.
Back to the other code.
I did as you suggested and still a no-go.
Any idea's (or) better yet, and actual working code would be GREAT! about now.
That works across all browser platforms.
Thank all;
Carrzkiss
jQuery(function() {
jQuery("#Save").click(function(evt) {
jQuery("#tableContainer").load("http://site.com/")
evt.preventDefault();
return false;
})
})
ASKER
I am set.
Everything is working now.
I had to remove this part from the code.
if(xmlHttpCor.readyState== 4){
}
Once I removed it, IE8 started refreshing OnSubmit of the form.
This part will function in IE6 and IE7
But will not function in IE8 and has to be removed in order to refresh the page on Form Submit.
Take Care All;
Carrzkiss
Everything is working now.
I had to remove this part from the code.
if(xmlHttpCor.readyState==
}
Once I removed it, IE8 started refreshing OnSubmit of the form.
This part will function in IE6 and IE7
But will not function in IE8 and has to be removed in order to refresh the page on Form Submit.
Take Care All;
Carrzkiss