Hi ,
How to save xml file on client side using javascript...?
if (window.XMLHttpRequest) {
xhttp = new XMLHttpRequest();
}
else // Internet Explorer 5/6
{
xhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xhttp.open("GET", "User.xml", false);
xhttp.send("")...
Hi all,
I have a JSF 1.2 application (Sun RI, Facelets, Richfaces) that was used only on IE6 browsers. Now, we must also support Firefox (yeah !).
In one of my pages, I have a form that contains a button that will re-render the whole form. After the re-rendering, some links (<h:commandLink/>) are added in this form.
The JSF code looks...
I tried this but failed:
var win = showModalDialog('http://localhost/index.php');
win.close();
...
In my project I have a lot of Ajax methods, with external client-side scripts (I don't want to include JavaScript into templates!) and changing URLs is kind of pain for me because I need to change URLs in my Ajax calls manually.
Is there is some way to emulate the behavior of {% url %} templatetag in JavaScript?
For example, print ur...
I am using the onclick event of a hashed link to open a div as a pop up. But the middle click does not trigger the onclick event but only takes the href attribute value of the link and loads the url in a new page. How can I use middle click to open the div as a pop up.
...
I have two iframes next to each other at 50% width and am wondering if it's possible to resize one iframe to 80% when that iframe is moused over. Is it possible? If so, can someone post a small how-to on getting this to work?
...
Hi guys,
Just trying to implement these buttons at the moment: http://particletree.com/features/rediscovering-the-button-element/
Can't decide which to go for, since here we mostly use IE6. As far as I can tell...
button:
Lets you submit the form as usual (ie hitting enter on the form), lets you disable it, standards compliant, does...
window.close();
The above will pop up a confirm dialog each time,and not working at all in firefox.
...
Hi all,
I have search through quite a lot of questions here, but havent found one that i think fits my bill, so if you know of one please link to it.
I have an array that i want to search through for a specific number and if that number is in the array, i then want to take an action and if not then another action.
I have something lik...
I am using gdata.js for inserting new Event.
I am able to insert only user's primary calendar.
The primary Calendar Feed uri is http://www.google.com/calendar/feeds/default/private/full
Which feed uri can I use for insert a new event other than primary calendar.
Thanks in advance.
...
I have got my friends list after getting logging in on facebook using Facebook connect Java script client API. I want list of my friends that are online at given time.
...
I have a login form that resides within a div with display: none; I then fade in the form using jquery but the Enter/Return key no longer submits the form. If I change the display to block, it works fine. This problem is IE only.
Any ideas?
Here's an example code that doesn't work;
<div id='formdiv' style='display: none;'>
<form id='l...
Hi All
I have a .Net web service that I call from javascript using:
$.ajax({ type: "POST", url: "http://myServerIP/Myervice.asmx/MyMethod",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "jsonp",
success: function(msg) { alert('sucess ' + msg); }...
Hi, I have script and I'd like to know if it's possible the send the value of a variable to $_session,
<script>
$(function() {
var delivery = 0;
$('#jcart-paypal-checkout').click(function() {
delivery = $('form#delivery2 input[type=radio]:checked').val();
if(!delivery) {
alert('Please choose a delivery option...
I have this code:
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$('a.one').click(function(event){
event.preventDefault();
});
});
function test(event){
even...
Hello.
I am looking for the most proper and efficient way to bind javascript events; particularly the onload event (I would like the event to occur after both the page AND all elements such as images are loaded). I know there are simple ways to do this in Jquery but I would like the more efficient raw javascript method.
Thank you ;)
...
I have a page where i have a sortable list of items (a div with class 'sortable'), which can initially have some items in it or be empty. The items are in another list on the page, and have an 'add' button. When add is clicked, they go into the sortable list.
When the page loads with some items in the list already, the sorting works...
Hi, for security reasons i want the users on my website not to be able to register a username that resembles their email adress. Someone with email adress [email protected] cant register as user or us.er, etc
For example i want this not to be possible:
tester -> [email protected] (wrong)
tes.ter -> [email protected] (wrong)
etc.
But...
Hi,
i have the following unordered list:
<ul id="#lastcompanieslist">
<li style="display: none;" page="0">whatever 1</li>
<li style="display: none;" page="0">whatever 2</li>
<li style="display: none;" page="0">whatever 2</li>
<li style="display: none;" page="0">whatever 3</li>
<li style="display: none;" page="0">whatever 4</li>
<li st...
Hi,
I've this regex (which doesn't do what i want): /^.*\/(eu|es)(?:\/)?([^#]*).*/ which actually is the js version of: /^.*/(eu|es)(?:/)?([^#]*).*/
Well, it doesn't do what i want, of course it works. :) Given this URLs:
http://localhost/es -> [1] = es, [2] = ''
http://localhost/eu/bla/bla#wop -> [1] = eu, [2] = 'bla/bla'
http://loc...