javascript

How do I ask/hint to Google not to index something on a page?

I have a web site that mostly displays images that contain text. It is heavy with JavaScript. In a noscript tag we have the usual "You must have JavaScript enabled" message followed by the text extracted from the image. My problem is that Google indexes the "You must have JavaScript enabled" message. So when you get a hit on my site, thi...

Copy textarea text to clipboard html / javascript

hey, i know there's lots of tutorials out there but none seem to be working for me. I have this : <textarea name="forum_link" type="text" style="width:630px; height:90px;"> [URL=http://www.site.net/video/&lt;?=$_GET['id']?&gt;/&lt;?=$_GET['tag']?&gt;]&lt;?=$video-&gt;title?&gt;[/URL] [URL=http://www.site.net/video/&lt;?=$_GET['id']?&g...

jQuery $ is not a function in Firefox, works in Chrome and works with $(document).ready()

Hello, I'm implementing jQuery in a site and am getting the "$ is not a function" in Firefox when I try to use a selector, but $(document).ready() works perfectly right before it. My code looks like this <script> $(document).ready(function(){ alert("hi") }); // Works fine function showDiv(){ $("#trad...

JQuery Formatting Issue

I can't get this to work for the life of me. The URL concat messes up. The answer doesn't seem obvious... function(data){ $('#dataDisplay').prepend("<img src='http://url"+data+"moreurl' />").fadeIn("slow"); }); Firebug throws missing end argument errors. ...

blocking in STA COM object

I'm about to write a control that has this defect. Why exactly is this bad? Your ActiveX control has a common defect that single-threaded apartment (STA) ActiveX & COM objects must avoid: STA COM objects cannot perform blocking operations on the STA thread, unless the COM object also pumps Windows messages. Therefore, ...

javascript: history.go(-1) not working in internet explorer 7

I am executing this line from a function -having this code only- that is called on onclick event on a link. document.getElementById("backButton").href="javascript: history.go(-1);" But this is not working for IE 7. Can anyone help me on this? Here is the other part of code: <a id="backButton" title="Go Back To Previous Page" href="....

How do I get an asp.net 3.5 textbox input into JavaScript?

Looking at many forums this seems to be the solution, however, it doesn't seem to work for me: function update() { alert("hello world"); var test = document.getElementById("<%=InCL.ClientID%>").value; alert(test); } and the asp/html is: <asp:TextBox ID="InCL" runat="server" Text="" value="" onchange="u...

EVAL in jQuery, this is the correct way?

I need to call a jQuery function with EVAL (but I don't know how to do it), then I solve with this solution, but I don't think that this is the correct way... <script> jQuery.fn.customfunction = function (data) { alert( data ); } </script> <div id="eval_div"></div> <form><input role="button" myFunction="customfunction"/></form> <script...

Javascript performance with creating large tables.

I have a database table. I want the user to be able to modify the values in that table, through a web UI. As such, I have my back-end retrieve the table's values, pass them to my Javascript through JSON. My Javascript builds objects representing table rows, and then uses prototype templates to generate HTML table rows, from the data. t...

onmouseover issues with Safari

Hello Everyone, I am trying to get a onmouseover and onmouseout effect in a xhtml page for my navigation menu. This code only works in Firefox, but nothing else. Can someone please tell me how to get it to work on all browsers? Here is my code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/D...

Get the dom element that represents the javascript tag where the code that is running is embebed

Example: <script> // I want to have the dom element of the script tag that is holding the code that goes here </script> If I do: <script> alert(this) </script> this is the window. I want to access the script tag itself. ...

Is there a safe delay in JavaScript?

A way that doesn't hog resources, just stops execution for 1 second then executes? What I want to do is dynamically move a Google gauge from one value to another, creating the effect of it moving to the value instead of jumping to it. i.e. - for(original_value; original_value < new_value; original_value++) { data.setValue(0, 1...

reload/set to default a particular html tag or id

How can I reload or set to default (using javascript or jquery) only a particular tag (or id) in my html page. For instance, if I want to set the following select option to default "selected", if something else is currently in selection, without reloading the entire page through javascript confirm() function as follows: var answer = con...

CouchDB Directed Acyclic Graph (DAG)

If my structure looks like this: [{Name: 'A', Depends: []}, {Name: 'B', Depends: ['A']}, {Name: 'C', Depends: ['A']}, {Name: 'D', Depends: ['C']}, {Name: 'E', Depends: ['D','B']}] How would I write the map and reduce functions such that my output is: [{Key: 'A', Value: []}, {Key: 'B', Value: ['A']}, {Key: 'C', Value: ['A']}, {Key: 'D...

JavaScript: Where could I find the the code of original event handler?

Where could I find the the code of original javascript event handler? Is it in JavaScript? Thanks. ...

Javascript library for BlackBerry.

Hi All I'm currently starting in the web mobile development along with come trench brothers. I've done some things for iPhone and Android using jQuery and JQTouch. Recently we've been playing with the idea to also support BlackBerry devices to an application we are developing (which promises a lot of rework). Our initial tests with the ...

jQuery events not being called when triggering 'change' event via fireEvent.

Problem appears on IE7-8. Here is simple demonstration: <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"&gt;&lt;/script&gt; <script type="text/javascript"> // Selenium's trigger from scripts/htmlutils.js function triggerEvent(element, ev...

How to include a definition language file in javascript?

I have a big javascript file common.js with all my functions and stuff...and i would like to write a separate file Js to store only the definitions for all the alert/courtesy messages etc spread along the file...i don't want to seek and change one by one... i have created something like this in php, where I have my file, en.php / fr....

How do you store an elements text with selenium in a javascript variable?

I have this html: <div class="title"> <div class="subtitle"> <div id="flhcd1> <h3>Hello</h3> <span></span> </div> <div class="subtitle2"> </div> </div> I want to be able to use selenium and javascript to store the text in the <h3> (Hello) in the variable titleText . I will be using this code in browsermob for monitoring tests. ...

Detect if no system activity from browser (including activity outside the browser)

I need to detect if the is no user activity in the system (e.g. what screensaver does) - all from a web browser. As far as i'm aware it is not achievable using pure JavaScript. There is a library for detective idle input within a browser though: jquery-idletimer-plugin For system idle events I'm thinking ActiveX control or SilverLight....