I have a bit of a conundrum. I have a form which has numerous fields. There is one field for links where you enter a link, click an add button, and the link(using jQuery) gets added to a link_array. I want this array to be sent via the jQuery.ajax method when the form is submitted. If I send the link_array using $.ajax like this:
...
I want to valid if user has entered username and password at the time of creating an account is safe or not based on its length(for my case five) on the right side of input field by showing that in different color i.e. for shorter in red, otherwise in green. How can I do that with javascript?
...
I want to get the name of the computer or its IP address through javascript.
How can this be obtained?
...
How to set <textarea> height auto? <textarea> should take height according to content inside <textarea> on same page I have multiple <textarea> with different amount of content inside.
I'm just using <textarea> to show source code sample.
...
hi everyone!
i here a Work and i don't know how to do it.
i have a string here:
<div class="demotext">
<p>this is demo string i demo want to demo use</p>
</div>
i create the array variable for demo:
var demoarray = new array('a','b','c');
now i want replace 'demo' in string by array node, follow 'demo' one change to 'a' , 'demo...
My code is below, and I had an issue with nearly the same code, and it was fixed here on StackOverflow, but, again, its not working. I haven't changed the working code, but i did wrap it in the for...in loop youll see below. The issue is that no matter what marker I click it always triggers the last marker/infoWindow that was placed.
$(...
w3schools says that exceptions can be strings, integers, booleans, or objects, but the example given doesn't strike me as good practice, since exception type checking is done through string comparison. Is this the preferred method of exception handling in JavaScript? Are there built-in exception types (like NullPointerException)? (if so,...
I have piece of javascript code, which should process when the browser window is resized.
resize.style.marginRight=(resize.offsetWidth-$(this)[0].offsetWidth)+'px'
Tryed this stuff (doesn't work):
window.onresize = function(event) {
resize.style.marginRight=(resize.offsetWidth-$(this)[0].offsetWidth)+'px'
}
Full code available - ht...
How can I log client side javascript errors to the server? I'm using jQuery and MVC.
...
I have a classified website, with pretty sophisticated searching, and I am about to implement a function where the last three queries is displayed for the user, so that the user can go back easier through the queries.
This because for each query the user has to provide a lot of input.
I have four questions for you:
I wonder, how can I...
Hello,
I have a content area that loops through divs and shows there content.
I'm having trouble making it display the initial content, unfortunately it waits 5000 milliseconds before triggering the very first content area to display.
Anyone spot an easy way to make it display the initial area, then slide to the next area and do them ...
I need a javascript function, which can turn my asp.net validation off on the webpage.
Do anyone have any idea about this.
...
Hello,
I have a form. Outside that form, I have a button. A simple button, like this:
<button>My Button</button>
Nevertheless, when I click it, it submits the form. Here's the code:
<form id="myform">
<input />
</form>
<button>My Button</button>
All this button should do is some JavaScript. But even when it looks just like in ...
In my javascript I have some bits of code specifically used for debugging which I don't want to include in the live site. Is there a way I can semi-comment these bits of code so that they run as javascript normally, but that yui compressor thinks they're comments and removes them?
For example
for(key in modules) {
try {
MyApp[k...
Lets say I have the following webpage
www.fake.com/sample.html
I could pass some parameters to that webpage, like so
www.fake.com/sample.html?count=10&format=gold
this page has an iframe in it, I would like to pass any parameters that the main page gets to the enclosed iframe. If the main page is called like so
www.fake.com/sample...
I am using jQuery's load() function when getting a page to a div like that:
content.php page is :
<script type="text/javascript">
$(".content").load("asd.php");
</script>
and asd.php is:
<script type="text/javascript">
alert("Hello World");
</script>
When load ajax finished alert() message appears 3 times. Actually it must...
var radiobox = document.getElementById('<%=rdoRiskAccepted.ClientID%>');
alert(radiobox[0].checked);
I am getting undefined as a alert. what am I doing wrong.
...
Hi
I have a video playing on my page. I want to show and hide some div's when the video reaches a certain point. Lets say hide something on 10th second and show it again on 20th second.
I can easily do it in HTML5 with video tag and currentTime attribute but for IE I have to create the same functionality and I think with flash based v...
Can any one please let me know, that, i need to clear the "temp" files every time i run the ajax process using php.
...
In my project i have to create an Accordion.which is better to use Jquery or Ajax
...