javascript

Javascript runtime error in ASP.net MVC

Hi, I created a new ASP .net mvc 2 web application with that default template provided in VS 2008. I wanted to check the document.ready to see on how it fires. So in Site.Master I included the jQuery Scripts in the following way: " <script src="<%=Page.ResolveClientUrl("~/Scripts/JQuery/jquery-1.3.2-vsdoc.js")%>" type="text/javascr...

Setting tooltips for disabled input text boxes in javascript and CSS

I am trying to display a tooltip when you hover over a textbox which has been disabled to indicate why the textbox has been disabled. Setting the title attribute works on IE but doesn't seem to work in Mozilla Firefox. Does anyone know of a simple solution in Javascript and CSS without using JQuery or any other Javascript library. ...

How are JavaScript/JSON based OData calls authenticated?

I'm new to OData (most everyone is I think). If I have an OData service, how do I secure it from unauthorized use? I'm looking at using WS-Trust/SAML, or standard authentication if that matters. ...

Only run code when variable is not equal to null

I'm having a problem. I have this code: setInterval(function() { $.ajax({ url: url, success: function(data, count){ var obj = jQuery.parseJSON(data); var content = obj.results[0].content; }}) }, 2000) Now this code is running every 2 seconds and making an ajax call. I keep getting the error that obj is null on ...

Javascript seems to be altering form field style

Hello, The form with the class="checkMax3" below displays text a few pixels lower than it should. In Chrome, letters like lower-case "p" and "q" extend below the bottom of the field. In IE 8, the bottom portion of these same letters does not display. If I recall correctly, this problem started after I applied the Javascript below to ...

Creating Javascript function called from PHP

I have a piece of Javascript that invokes a social publishing widget overlay. When you load the page the overlay will popup and this is the script that calls it: <script type="text/javascript"> RPXNOW.loadAndRun(['Social'], function () { var activity = new RPXNOW.Social.Activity( "Share your comment", "commented on '...

JSON from a .js File

Hi all, I am working on something using JSON and I can't seem to figure out how to do this. I'm receiving a JSON object that looks like this: {"List" : ["ob1":"c1","ob2":"c2"...]} I am getting this from a .js file. How do I use the object? So far I've only worked with files that have objects like this: Object = {"List" : ["ob1":"c1",...

select specific text on page and remove it

Is is possible to select specific text string on the page directly without a id, class, etc... I have this text string "ERROR: AffiliateID invalid" that I would like to remove from the page. Is it possible? ...

Browser detect contenteditable features

I realise browser detection is not generally a good idea, however as each browser has a different implementation of contenteditable, I need a way to separate out my fixes for each. Specifically: gecko and webkit require a <br /> to be inserted at the end of empty paragraphs, otherwise they are automatically deleted. ie and opera treat...

On mouseover change auto to false

I have this code and i want the mouseover to change the variable auto from true to false. if ($featuredArea.length) { $featuredArea.et_switcher({ useArrows: true <?php if (get_option($shortname.'_slider_auto') == 'on') { ?>, auto: true, autoSpeed: <?php echo(get_option($shortname.'_slider_autospeed')); ?>...

Javascript implementation question: how to make this function display values.

Please forgive me, but I do know js basics and how to write/call a basic function, but in this case I'm trying to match an alpha sorted list of categories from the DB to match against my set (non-alpha) order of said categories as specified below (this is code suggested for use by another user on a question I asked about how to map the o...

Saving login status with JavaScript cookies

Hey guys, I'm working on the login/ucp module of an application and I'd love to add a "remember me" option to remember the currently logged-in user and keep them logged in next time they visit. I know this requires JavaScript cookies, and I've never done anything like this before. Do you have any boilerplate code or tutorials that cou...

How to design analytics solution (Django stack)

I need to add analytics feature to our web service so we can provide our customers a way to understand their own content. I was wondering if anybody can provide some pointers, guidelines on designing such solutions. I know this is a little too open-end. Here is a list of concrete questions, and I have a vague idea on some of them but I w...

Exclude variables from object

So basically I understand you can loop through an array in either of these ways. var testarray = new Array(1,2,3,4); for(i in testarray)console.log(testarray[i]); //outputs 1,2,3,4 for(var i=0;i<testarray.length;i++) console.log(testarray[i]); //outputs 1,2,3,4 My question how can I duplicate/emulate that array. With support for both...

how to write Javascript in Eclipse.

i am using eclipse for java coding. Can i use javascript in eclipse. How to use it, Please give ideas. ...

Best way to achieve jQuery scroll effect

I am having problems implementing the following jQuery effect to my navigation. There will be the following image on the top of the screen: When the user clicks on this, the following menu should scroll out: my HTML is as follows: <div class="left_corner"><img src="images/homepage_menu_lft.gif" alt="corner" /></div> <div class="...

Need help with modifying an existing regex search extension

I would like to ramp on extension development by modifying an existing extension. I have zero experience with JavaScript, but i do have experience with C, C++, Java and Python. I chose the Regular Expression Search extension by bizsimon. Here is the JavaScript code of the content script which i am trying to understand. chrome.extension...

Flot mousehover algorithm to detect purely based on x location?

Using jQuery's flot, there's a way to allow items to be selected by hovering over them. In the options, grid[mouseActiveRadius] may be set to a number to indicate the desired length of the radius of the selection circle. For instance, if you set it to 10, then any mouse hover event will highlight the closest point in a 10 pixel radius c...

Access the clicked element

Hi, I have an element like this: <p id='foo' onclick='go()'>hi</p> function go() { } how do I get access to the element that generated the click (the p element in this case)? Do I just do: function go() { var clicked = this; } Thanks ...

How can I create a side menu from some menu subItems in the same page?

I have a horizontal menu, some of the Items have expandable subItems and all this is built with scripts that I do not have access to, I can only add and remove items through the dashboard and style and interact with the html templates (BigCommerce). I would like to reuse one of this menu Items and it's subItems as an additional side navi...