On StackOverflow when you're asking a new question, you have enter the question and if you decide to navigate away from the page you get an "Are you sure" confirmation.
I'd like to do the same in my ASP.Net application:
The user has to fill in a questionnaire and has the option to store his answers temporarely. If the user decides to...
Hi All,
I am creating one div dynamically and want to add it inside another div.
(js) var divtag = document.createElement("div");
divtag.innerHTML = xmlhttp.responseText;//Ajax call working fine
document.getElementById('con').appendChild(divtag);
html:
enter code here <div id="con"></div>
...
While developing AJAX program, I met the design decision to make string I18N in JavaScript.code. Some string is only used by JavaScript. For example.
$('#submit').click(function() {
$(#target).html('Please wait while submitting...').load(someURI);
}
I'd like to I18N the string 'Please wait while submitting...'. I'm not sure what's...
How can I change the background column of an html table column when the mouse is over it?
Preferably with css only.
...
I have a string which contains text and some <a> tags in it; I want to know how I can select a tag from the variable and loop it. I tried the following but it didn't work:
var text = `some string here with <a href="#link">http:something.com</a> more string and more links also`;
$('a', text).each(function() {
var string = $(this)...
I have an if statement:
if(authenticate_session("secret_password12345")){
alert("You are authenticated");
}else{
alert("Intruder alert!");
}
and the javascript authenticate function, which makes an jQuery POST AJAX call to the server to do the actual authentication, and returns true or false:
function authenticate_session(sess...
Hi, i need to have a handler on the calling object of onclick event
ie
<a href="123.com" onclick="click123(event);">link</a>
<script>
function click123(event)
{
//i need <a> so i can manipulate it with Jquery
}
</script>
I want to do this without the use of $().click or $().live of jquery but with the method described above.
...
Hay, i need a hand.
I want to convert all numbers to the nearest .25
So...
5 becomes 5.00
2.25 becomes 2.25
4 becomes 4.00
3.5 becomes 3.50
Thanks
...
Edit: Sorry guys, I got the issue, Misspelled class name :(
Hey, I got a quick question for your guys here. I have some anchor tags each of them points to a url of a certain user. The link id is the username. All the links share a css class (.userset). When a user clicks the link I need to issue an Ajax request -using jQuery.ajax metho...
Is it possible to attach a popup (div) dynamically to a row in a table such that the popup is rendered by a mouseover, and hidden by a mouseout action?
The code I put together ( see below ) refuses to render the popups, albeit the event handlers are called.
Is what I'm trying to do really possible? From [http://stackoverflow.com/questi...
The Scenario
I have an asp.net web application with a HTML/CSS front end.
This all works fine but in Internet Explorer 6, the transparent PNG's that I use within the site are not transparent due to the poor design of this particular browser.
Solutions Attempted
I've already attempted various IE6 PNG Transparency fixes that didn't work...
How do I Create a webpage using JavaScript that takes a number from the user and compares it against three ranges of numbers, unsing 3 functions, checklow(), checkmedium() and checkhigh()?
...
Dear All,
I have one js file with a ajax call which is working fine in IE6, but not in IE7 or FF. Can somebody help?
window.onload = function() {
var xmlhttp;
var url = "myurl";
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else if (win...
I have a php string containing the serialization of a javascript object :
$string = '{fu:"bar",baz:["bat"]}';
The actual string is far more complicated, of course, but still well-formed javascript. This is not standard JSON, so json_decode fails. Do you know any php library that would parse this string and return a php associative arr...
How could I encapsulate the authentication logic, the URL and the label of a Menu item when I make use of e.g. a Dojo MenuItem widget?
What I currently have is this:
<auth:isRole role="admin">
<div dojoType="widget.Menu.MenuItem">
<a href="<html:rewrite page="... complicated url ..."/>">
<bean:message key="label.goes.here"...
Hi,
I wonder if is possible to get the text inside of a PDF file by using only Javascript?
If yes, what libraries should I use?
I know there are some server-side java, c#, etc libraries but I would prefer not using a server.
thanks
...
How to retrieve the Image height and width from the IMG tag using jQuery and use this value in div style.
like
<div class=top> </div>
<img src="source.jpg" width="200" height="400" alt="" />
<div class="bottom"> </div>
I want to use the height of the Image and and apply to the DIV.
like 400px-20px. div width.
THanks
...
Hi there
I've been writing a Firefox extension, but have recently read a few articles explaining that it's bad practice to avoid variable name clashes by simple appending the application name to the front of the variable.
Unfortunately I have been doing this. What is the best practice instead? I assume it's to somehow namespace the var...
Within jQuery.ajax we have the blessing of setting a timeout in milliseconds and an Error callback to process that timeout.
However, the some people are simply on slow connection, with small amounts of patience. What I want to do is simply display a message stating "This is taking longer than usual".
The Timeout arguement in jQuery w...
I run a website that has lots of affiliate links. These links are loaded via AJAX. I'd like to be able to track outbound clicks on these links.
The standard approach to using Google Analytics to track links is to use the pageTracker._trackPageview() function. I've tried this to no avail. Here's my code:
<a href=<?php echo $link_loc...