javascript

Javascript to determine where the user is on the page.

When you view a long thread in gmail a div appears at the bottom of the screen showing the name of the author of the next message. As you scroll and view more messages this div gets updated, always with the name of the author of the message which is after the message you are viewing. How do you think this feature is implemented? I have...

Is there a reason this doesn't work?

A simple HTML form: <form enctype="application/x-www-form-urlencoded" method="post" action="/view/album/id/4"><ol> <li class="no-padding"><div class="element"> <input type="hidden" name="media" value="" id="media" /></div></li> <li class="no-padding"><div class="button"> <input type="submit" name="add_to_favorites" id="add_to_favorites...

What is an FE Developer?

I just got a job offer to be a FE Developer, but I've never heard of that term before. Strong HTML, CSS, Javascript, jQuery, XSL skills required. I consider myself proficient in all of those fields except for XSL and I've never heard of that term before. Can anyone enlighten me? ...

How do I grab the entire exact contents of an iframe and also be able to edit it?

I know you can get the innerHTML doing something like this, with jQuery, $('iframe').load(function(){ alert($(this).contents().find('body').html()); }); This gets the innerHTML of the body tag. But I want it all. I want the HTML tag and the doctype. The whole source code basically. And I want to be able to edit it as a whole as well...

IsClientScriptIncludeRegistered question

In The Page_Load event of an ASP.NET USercontrol, I have the following Code: If Not Page.ClientScript.IsClientScriptIncludeRegistered("ProperCase") Then 'doesnt seem to work but no apparent harm. Page.ClientScript.RegisterClientScriptBlock(GetType(String), "ProperCase", GetJavaProperCase()) End If And here's a function...

Center Google Map Based on geocoded IP

Basically whenever someones opens up my (Google) map I want it default to their approximate location. Is there an easy way to do it with Google's API or do I have to write a custom code (this is python based app)? ...

IE script error with my jQuery plugin

I cannot seem to figure out I am getting the following error in IE 8 (only IE version I've tested so far). The script runs fine in all (chrome, ff, safari) other browsers I've tested. What am I doing wrong? Error: Message: Object doesn't support this property or method Line: 52 Char: 29 Code: 0 URI: http://www.ntierdesign.com/jquery/...

javascript interrupt event

Here is the situation : If i am in page-1 now i am clicking a link from page-1 to navigate to page-2. Before page-2 is loaded i am hitting escape so that still i am staying in page-1. At that point i want to track that event. Is there any javascript event so that i can track the above scenario. More Info : To avoid concurrent reques...

Instantiate a JavaScript Object Using a String to Define the Class Name

Here's what I'm trying to do -- this is pseudo code and doesn't work. Does anyone know how to accomplish this for reals: // Define the class MyClass = Class.extend({}); // Store the class name in a string var classNameString = 'MyClass'; // Instantiate the object using the class name string var myObject = new classNameString(); ...

Add a red dot and a title to an image

I've got a html-page with a picture on it and would like allow the user to click on the image to add a red dot and a title to the red dot. After adding some dots he should be able to save or print it. What's the best way to implement this with ruby on rails, html, css and (or without) javascript. ...

How to display XML in a HTML page as a collapsible and expandable tree using Javascript?

How to display a XML document in a HTML page as a collapsible and expandable tree? I'd like to display a XML document inside a HTML page as a nicely pretty printed tree structure. I'd like to be able to expand and collapse tree branches. For example Firefox browser does this when you load a plain XML file. Surely there is a some kind o...

Jquery Question - select and change background color of all hyperlinks save link clicked

Hi guys, need a quick help here. I have a series of hyperlinks all with the same class name. I want that when I click on anyone of the links - the background colors of all the other hyperlinks change except the link I have clicked. ...

How do I select inputs having a name like "abc[]" with Prototypejs ?

I want to select an input with Prototypejs and its $$ function. I am able to do this : $$('input') But I want to be more accurate in my search, with a name of an input. The name of the input I want to select is "array[]" : $$('input[name="array[]"]') I think the [ and ] in the name are creating troubles because the result I get ar...

Javascript: sharing data between tabs

What is the best way to share data between open tabs in a browser? As an example, Facebook panel: when you open a chat window in a tab, it's opened in other open tabs too. ...

Can't assign jQuery jqModal to dynamically added links

I've been having problems getting jqmodal modal dialogs to display on links added dynamically by client side code. I've demonstrated the problem at the following URL: http://www.neil-burton.co.uk/jqmodaltest/index.htm Any help would be appreciated ...

Throwing a JavaScript exception from C++ code using Google V8

I'm programming a JavaScript application which accesses some C++ code over Google's V8. Everything works fine, but I couldn't figure out how I can throw a JavaScript exception which can be catched in the JavaScript code from the C++ method. For example, if I have a function in C++ like ... using namespace std; using namespace v8; ... ...

foreach object/array in jQuery

Hai all i have a problem, i have X <input type="checkbox" /> ind my code, now i what to foreach this object/array its out put. - look my code. $("#denied_seekrs").click(function() { if (!isCheckedById("selectname")) { alert ("Please select at least one event"); return false; } else { ...

Share code between JavaScript and an ActionScript library without a bridge

I'm involved in writing a Flex/ActionScript library and in the future I will be involved in writing the same library in JavaScript. Rather than writing a library in each language and having to maintain them separately I was wondering if it was possible to: 1) Write the code in one language and share the code into the other e.g. Write th...

Is processing Javascript Server-Side a solution to duplicated logic?

Web-Applications these days make extensive use of Javascript, for example various Google Products like Gmail and Calendar. I'm struggling to how NOT having duplicated logic server and client side. When requesting a page or state of the application, i would prefer to send the complete UI, meaning: not just some javascript, which in turn...

How to browse every 10 records using MYSQL and jquery ajax calls

Hi i want to browse every 10 records on a click. The AJAX call should fetch next 10 records each from SQL QUERY when clicked on next or previous. At the initial page i have a SQL QUERY which fetches 10 records SELECT VENUENAME FROM VENUES LIMIT 10 <a style="float:right" id="next-nav" href="#">Next</a> $("#next-nav").click(function(){...