This is my JavaScript code I use to create my cookie............
document.cookie = "Name=" + Name + ";expires=Friday, 31-Dec-2011 12:00:00 GMT; path/";
I create it in www.example.com/folder/file.html and it works.
But I cant read the cookie from www.example.com/index.html or www.example.com/folder2/file2.html.
What is wrong with my ...
Hello,
Let's imagine that we have object Animal
$.Animal = function(options) {
this.defaults = { name : null }
this.options = $.extend(this.defaults, options);
}
$.Animal.prototype.saySomething = function() {
alert("I'm animal!");
}
Now I'd like to create Cat object. It is absolutely similar to $.Annimal, but method saySome...
Hi,
I'm looking to create a wrapper control for JQuery date time picker control to be used in asp.net website. Once the user control is ready, it will be used in simple web forms / grids / data lists or repeater controls. User control will also expose below mentioned properties for customization.
TimeHourFormat: "12" or "24" (12 (AM/...
I have added some code to automatically submit the form when a selector is changed:
<select name="template" id="templateselector" onchange='this.form.submit()'>
{{foreach $templates as $t}}
<option value="{{$t}}"{{if $t==$template}} selected="selected"{{/if}}>{{$t}}</option>
...
hi i want to call function changeDivHTML which pass the image
<a href="javascript:void(0)" onclick="changeDivHTML(<img src='.DIR_WS_IMAGES .$addimages_images[$item]['popimage'].'>)">
and the function add this images to particular id's div.
function is this
<script language="javascript" type="text/javascript">
...
I'm working on some HTML content as part of an iPad app. We may need to lock the content of the UIWebView to portrait mode, but the app has already been submitted to Apple and the only reference I've found to achieveing this is in this question which gives this example
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientatio...
Hey,
I want my users to be able to take a screenshot of the webpage (or me defining the size of the screenshot) and then allowing them to save it to their computer.
Does anyone know of a good JS lib that allows you to do this?
I know there are addons for the browser, but i wanted something pure JS so that the user can just click in a ...
Afternoon all.
I have the following scenario:
I have a search page where by a client searches for a product from a drop down list, upon clicking a button, a gridview is produced display the spec.
What I would like is the functionality for the user to make their selection and a new window pops up with the spec.
So I have a simple code...
I have the following task:
All items within categories should be sorted alphabetically except for Examples. Special characters and numbers should be displayed before letters.
I'm facing with a problem. Most of standard sort functions and plugins are being used the ASCII table. In this table the following symbols: ~,},{ etc. have the in...
I'm trying to replace a DOM element (a div) using Prototype's Element.replace() operation. It seems to do the replacement OK, but leaks a single DOM node in the process. I checked this with sIEve; all but one of the existing DOM elements is freed by the innerHTML="" bit. This is in turn leaking memory, which I can't afford in a long-runn...
I am working on a web application where I have to encode and decode a string at the JavaScript side and Ruby backend of the code. the only problem is that the escape methods for JavaScript and Ruby have a small difference. in JavaScript the " " is treated as "%20" but in ruby the " " is encoded to "+".
Any way to solve this? Another Rub...
my firefox extension has an object myExt .
myExt = {
request: function(){
//adds dynamic script element to the current webpage's head tag
},
callback: function(json) {
//do something with this
}
};
myExt.request adds a dynamically added script element to a server that returns json, i want the json to be sent to myExt.c...
Hi there all,
Basically I use a javascript SOAP plugin to send and receive XML from a web service.
Recently I've been experiencing intermittment (1 in every 20-30 times) errors in IE when trying to access data in the XML file.
Bear with me on this, I'm going to try and go into a fair amount of detail to help anyone who is willing to r...
Hi,
I wanted to generate a random number 32 characters in length from a specified set of characters.
For example:
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ";
var string_length = 32;
Which would then return a random number of length 32 using the specified characters.
...
I need to generate HTML snippets using jQuery. The creation of those snippets depends on some data. The data is stored server-side, in session (where PHP is used).
At the moment I achieved this
- retrieving the data from the server via AJAX in form of JSON
- and building the snippets via specific javascript functions that read those dat...
Hello all, my first post here.
I am not much of a programmer, I can tailor some things for my personal needs but thats about it.
I am looking for a script (jQuery preferred I suppose) which is easy to incorporate and bind to a few DIVs to be updated dynamically.
Nothing too deep, just something that can updated price at check-out...
...
using this as a guide: http://msdn.microsoft.com/en-us/library/dd250846.aspx
can someone help me with the jquery call?
Do I actually pass in the javascript code for the callback, or just the name of the function?
BingSearch = function($bingUrl, $bingAppID, $keyword, $callBack) {
$bingUrl = $bingUrl + "?JsonType=callback&JsonC...
UPDATE:
Here is a jsbin example demonstrating the problem.
UPDATE 2:
And here is the fixed version thanks to fudgey.
Basically, I have the following javascript which scrolls the window to an anchor on the page:
// get anchors with href's that start with "#"
$("a[href^=#]").live("click", function(){
var target = $($(this).att...
Hello frineds,
I need to retrieve the current date in asp.net and then compare that with the date given by the user in textbox1.text(mm/dd/yyyy format), if date date given is greater than current date then error else add 4months2days with that date and display it in textbox2.text.
help me please,
thanking you guys,
Indranil
...
Hi guys, been bagging my head over some Javascript, please help, I cant see why it simply wont find my cookie in IE 7 or 8
I am setting the cookie true through another event, but I just want to see IE pick up the cookie which I initially set. Works in firefox too, thanks in advance.
var t=setTimeout("doAlert()",8000);
var doAlertVar = ...