javascript

javascript basic question

Hi While declaring Javascript in a html document. We have 3 ways to do that script section goes in the head tag script section goes in the body tag javascript is references from an external file Which one of these is faster and efficient with respect to performance is considered? Thanks ...

Parse HEX ASCII into numbers?

I have a H/W device that normally uses a serial port for an interface, sending and receiving binary messages to a PC UI program. I've added an Ethernet port and small TCP/IP stack with a small web server that I want to use to replace the serial port UI with a web browser UI. The messages are mostly request/response sort of things, but f...

JQuery Tools: Can you nest non-ajax tabs inside of ajaxed tabs?

Can't seem to get this to work -- my ajax tabs load fine ... but, the nested tabs are not working. Before I post some code, I'm just wondering if this is possible or not. thanks ...

Splitting a string only when the delimeter is not enclosed in quotation marks

I need to write a split function in JavaScript that splits a string into an array, on a comma...but the comma must not be enclosed in quotation marks (' and "). Here are three examples and how the result (an array) should be: "peanut, butter, jelly" -> ["peanut", "butter", "jelly"] "peanut, 'butter, bread', 'jelly'" -> ["peanut", ...

Are there alternatives to the Ext.js JavaScript GUI Library?

Before I choose the first / only JS GUI library I know, I'd like to see what else is there on the market. Reason: For my taste, Ext.js has a too strong "Windows XP" touch which looks really weird on a mac. Mac users are my target customers, so maybe there's something out there that suits this much better or is more neutral. Needed: A ...

Can Google Analytics Track Results from Form POST action?

My product search on my website uses HTTP POST to submit the search information. I want to track the search results page, learning what people are searching for and the results that they get. I'm told that I have to switch to using HTTP GET to make that happen. Is there a way to keep using HTTP POST and still have Google Analytics pick ...

RDFa for videos rendered in javascript

I am trying to add RDFa tags to videos so they can be indexed by Google and Yahoo. However the object and embed code for the videos are inserted by javascript, so they aren't actually in html. Can I put a duplicate object in a noscript tag? Is there another solution? http://www.google.com/support/webmasters/bin/answer.py?hl=en&answe...

Show and Hide a DIV with CSS or Javascript?

I just saw a demo that had this jquery code to show and hide a dive on hover, can't this be done with just regualr css though? And if you can do it with css is there any advantage of doing it with javascript? $('.comment').hover(function() { $(this).children('.delete').show(); }, function() { $(this).children('.delete').hide(); });...

How to Enable Javascript When Making an HttpWebRequest

I need to call a web page that has javascript. At the bottom of the page I have the following: <noscript> <p>Javascript is not supported or enabled.</p> </noscript> When I make my HttpWebRequest request like so, it is clear that the javascript on the page did not execute. Dim req As System.Net.HttpWebRequest = DirectCast(Syst...

Response.write javascript causing newline in Constant

Hey all, I cant figure this out, here is my code: Response.Write("<html><script type='text/javascript'></script></body></html>"); Response.End(); Which is causing this error: Compiler Error Message: CS1010: Newline in constant Im not sure how to get around it. This is c# and asp.net 2.0. Any ideas? Jake It seems to be happening...

"AJAX" Calendar Widget that include Time Selection

Are there any existing AJAX/Javascript Date picker widgets/libraries that also allow you to select a time range? That is, after picking a date, an existing UI pops-up/becomes available to select a time range for the same. I'm looking for example of things like this. UI Libraries that offer some form of date picking, followed by a ste...

What does "Return false;" in onclick event for JavaScript mean?

What does "Return false;" in onclick event for JavaScript mean? <input type="button" runat="server" id="btnCancel" value=" Cancel " style="width:70px;" onclick="document.location.href = 'ReportPanel.aspx'; return false;" /> in the onclick event. It has return false; What does it mean? ...

Can the browser selectively request resources from a website?

I'm trying to dissect some well designed sites, in order to learn more about unobtrusive JS. One problem I am experiencing is that one technique for unobtrusive/graceful degradation seems to be loading a base HTML page and heavily modifying/appending elements with JS. It would be good if there was a tool where I could just selectively l...

"Read" XML with Javascript

Still playing with Chrome Extension and have a little problem when I want to get some information from an XML file. Here is how the XML look : <?xml version='1.0' encoding='utf8'?> <objects> <url> <domain>...</domain> <nb_clics>...</nb_clics> <alias>...</alias> <title>...</title> <source>...<...

JavaScript question

calling a js function using onclick... onclick="SubmitAge(66, 'ctl00_MainContent_arTo_upAgeRange')" function just calls an updatePanel from the client... but its saying object expected at the onclick= part!!! here is the function, is there anything wrong with the code? function SubmitAge(age, UpdatePanelID) { $get('HiddenAge')....

Wordpress like display odd/even comments w/ different class - jQuery ?

I have following code where commentTable is the class. It works fine for current comments displayed on the page. $(".commentTable:odd").addClass("commentTableClass1"); $(".commentTable:even").addClass("commentTableClass2"); but what I really want is that this addition of class be 'live' even when new comments are added. I don't want to...

What's the best way to use a YUI TabView in an ASP.NET MVC app?

I'm creating an ASP.NET MVC web app and would like to use the YUI TabView (because I generally like its default look and I'm using a couple other YUI things, so the additional overhead will be comparatively small) to render a set of tabs in the master page. Here's what I want: Each tab should render the result of a particular controll...

Implications of basing a web application on Open Source like PHP and jQuery

Hi! I am very new to web development and the use of Open Source. I have tried to read about the GPL, BSD, MIT, LGPL licenses, but cant seem to understand what they mean to me in real life. I am asked to develop a web based application for a customer. My agreement with them is that they pay a fixed fee for my development of the applica...

What does the '+new' mean in JavaScript?

Looking through the jQuery source in the function now() I see the following: function now(){ return +new Date; } I've never seen the plus operator prepended to the new operator like this. What does it do? ...

Hover Item with JQuery

Is there a way to hover item using javascript? I don't want to create another class, I just want to hover item with javascript when my mouse pointer is not over this item. For example I have 5 items with the same class and I want to call hover on all of them when one of them is actually hovered. Thanks. ...