Lets say you need to attach some JavaScript functionality to an ASP.NET User Control of which there might be multiple instances on any given page. Because JavaScript has shared global state, what techniques can you use to keep the client state and behavior for each instance of a control separate?
...
Greetings!
I'm calling a Web service from Javascript when a user clicks on a link. I need to get the coordinates where the user clicked so that I can display a DIV in an appropriate location. My client-side script looks like the following:
var g_event;
function DoWork(event, theId)
{
if (IsIE())
g_event = window.event;
...
I have configured my default page to be say "abcd.aspx" and is under ~/View//abcd.aspx and I have my javascripts under ~/Contents/Scripts/.js
For some reason, only "../Content/Scripts/.js" works for including the js file on the page and "~/Contents/Scripts/.js" does not. This works only when i access the page with the full url: http:///...
Hi
I am looking for a Ajax Grid control that can be used easily for binding data using js methods. I have tried using the GridView in AjaxDataControls, and its okay - but i am also looking for multiple select support in the gridView. Any pointers would be much appreciated.
Thanks.
...
How do you safely encode a URL using Javascript such that it can be put into a GET string?
var myUrl = "http://example.com/index.html?param=1&anotherParam=2";
var myOtherUrl = "http://example.com/index.html?url=" + myUrl;
I assume that you need to encode the myUrl variable on that second line?
...
I have a page which work like a navigation and a iframe in this page which show the content.
Now there are some situation when the inner page is directly shown in the browser.
eg: if somebody types the inner page's url in the browser address bar, the page is displayed in the window.
I want to prevent this.
Better still, I would li...
I'm trying to make a pull down menu post a form when the user selects (releases the mouse) on one of the options from the menu. This code works fine in FF but Safari, for some reason, doesn't submit the form. I re-wrote the code using jquery to see if jquery's .submit() implementation handled the browser quirks better. Same result, wo...
I am using VS 2008 to write my Javascript code ( mostly in JQuery). However the js file was not updated when I was done with the editing and pressed F5 to call out the debugger. I need to close my vs2008 and reopen it in order to see the latest changes in js file.
Any idea on how to fix this?
...
I'm just talking about JavaScript here, not CSS or implementation of the DOM.
I know getters and setters are now available in the latest release of all major browsers except IE. What other JavaScript features are available cross-browser if we have the latest versions of the other browsers and forget about IE for a minute?
...
I need to make an AJAX request from a website to a REST web service hosted in another domain.
Althouht this is works just fine in Internet Explorer, other browsers such as Mozilla and Google Chrome impose far stricter security restrictions, which prohibit cross-site AJAX requests.
My problem is that I have no control over the domain nor...
Is there any way to generate Excel/CSV through Javascript?
(It should be browser compaatible too)
...
These ribbon in stackoverflow and uservoice.com looks nice. is there any javascript library/jquery plugin for that effect?
...
I am looking for advice on how to create a drag and drop interface similar to Yahoo Pipes: dragging and dropping elements and linking them together.
I really don't care if it's Flash or JavaScript or SVG or Open Source or Commercial (although reasonably priced would be better).
Ideally I would like to describe my elements as JSON or ...
Is it possible to do a HTTP Head request solely using an XMLHTTPRequest in JavaScript?
My motivation is to conserve bandwidth.
If not, is it possible to fake it?
...
Hi Guys,
I tried following code to get an alert while closing browser window.
<script language="JavaScript" type="text/javascript">
window.onbeforeunload = confirmExit;
function confirmExit()
{
return "You have attempted to leave this page. If you have made any changes to the fields without clicking the Save button, you...
I want to link to a page which contains multiple support topics.
When the user clicks on the link while being on an external site, the topic should be expanded as soon as the user arrives on the support page.
Example:
I link to this page
http://www.nintendo.de/NOE/de_DE/support/nintendo_ds_lite_159_142.html
Topic I want to be opened...
Hello,
I have a very simple html page here:
http://www.nomorepasting.com/getpaste.php?pasteid=22407
And I have 4 layers on the page. The reason for this is it is the framework oif a much more complicated site, I have simplified it to ask my question. Basically, I want to be able to click on different links in layer 2 and have the image...
I'm making modifications to a members-based site whose owner wants to be able to track time spent on site (login/logout) for all users in a DB backend. Login is easy; there's one point of entry (the login form) and as a result, logins can be thrown in the database as soon as they happen.
Logouts, however, are a bit trickier, as unless ...
I'm working on an useragent that logs into teamcity and I'm trying to move the password encryption from js to c#.
this is the javascript
the section called rsa.js and encrypt.js are important. They make a function call with
rsa.setPublic(publicKey,"10001");
The exponent looks like its a hex number x10001 which is 65537 base10 as f...
I am building a slideshow with a few hundred images and would like to build a nice loading bar, so the idea was to preload the images using JavaScript, then initialize the rest of the UI afterwords.
Preloading the images is not a problem, but getting the browser to update the status as things load is. I've tried a few things, but the br...