javascript

Can search engines index JavaScript generated web pages?

Can search engines such as Google index JavaScript generated web pages? When you right click and select view source in a page that is generated by JavaScript (e.g using GWT) you do not see the dynamically generated HTML. I suppose that if a search engine also cannot see the generated HTML then there is not much to index, right? ...

Good Javascript A/B (Split) Testing package/library?

My boss for some reason wants to try to implement A/B Testing (or Split Testing) in JavaScript. Anyone know of any good JavaScript packages/libraries/solutions to implement A/B Testing? ...

Weird port being reported in WCF for remote client

I have a IIS hosted WCF service that is configured with a WebHttpBinding. It is the same default WCF service VS2008 creates when you create a new one. The only changes I have made is to allow it to be called from javascript. In the test method GetData(int value), i return a string that displays the remote clients IP address, port, and ...

Introductory JavaScript programming task for an expert developer.

What would be a good mini-project to get intimate with JavaScript, as an advanced 'introduction' to the language? I want to actually code an application in JS, not hook up bits of it to enhance a web application. ...

JavaScript: changing the value of onclick with or without jQuery

I'd like to change the value of the onclick attribute on an anchor. I want to set it to a new string that contains JavaScript. (That string is provided to the client-side JavaScript code by the server, and it can contains whatever you can put in the onclick attribute in HTML.) Here are a few things I tried: Using jQuery attr("onclick",...

How to autocomplete in ASPX with original page request only?

We are developing an ASPX (.NET 2.0) page that includes a select list with far too many elements in it (200+). We need some form of autocomplete to make this into something that behaves like a text box, but with autocompelte suggestions. We would like to use JQuery. So far our searching has only turned up autocompletes that require som...

Trouble calling an applet method from page

I know it's not optimal, but I have to work with it, a page making calls to the applet. My problem is, when I do so, I recieve a rather cryptic error message: "uncaught exception: Error calling method on NPObject! [plugin exception: java.lang.reflect.InvocationTargetException]." Can anyone decode this? Even multiple possibilities wo...

jquery.ui sortable issue

Hello, I have created a nested list with drag/drop functionality. My issue is that I want each nesting to sort in itself. For example: -first_level -first_level -second_level -second_level -first_level "First level" should not be able to go into "Second Level" and vice versa. I thought I could do this with the containment option...

Odd behavior in javascript

I have a table like so <table> <tr id="trRow1" runat="server" style="display: none"> <td>First Name:</td> <td><asp:Label id="lblFirstName" runat="server"></asp:Label></td> </tr> <tr> <td>Last Name:</td> <td><asp:Label id="lblLastName" runat="server"></asp:Label></td> </tr> </table> As you can see, initially the...

A RegEx for: {0}

I feel like an idiot for asking this but what would a regular expression be to match the literal string: {0} This would be used in JavaScript with the string object's replace function. I've tried several things and nothing seems to work. Thanks, Frank ...

How can I send the contents of a table or results of a sql query to the clipboard from an asp Page?

There are many examples on the internet of doing this type of thing. But none of them work in Firefox. So I thought I'd set the challenge for Stack Overflow users. Basically I need a very easy to use way for a user of a page to get the results of a query into the clipboard so that they can paste it into excel. It can either be getting ...

Will all javascript libraries work with Iphone? Aptana question.

I am trying to use Aptana to build an IPhone web application. I've never use Aptana. I downloaded the iphone support and started a new project. It is now asking me if I want to import a javascript library and lists the "big ones." Will IPhone's Safari be able to use these, specifically jquery? I saw that jquery had a special iphone ...

UpdatePanel and UpdateProgress not working.

If I use: OnSelectedIndexChanged like this: <asp:DropDownList ID="ddl1" AutoPostBack="true" OnSelectedIndexChanged="Test_SelectedIndexChanged" runat="server"></asp:DropDownList> UpdatePanel and UpdateProgress work correctly, meaning it shows my little gif etc. However as soon as I change this to call javascript code, like this: <as...

Assign file names to eval code in Microsoft Script Editor or Microsoft Script Debugger

I'm debugging dojo-based javascript running in IE6 with Microsoft Script Editor. Everything works fine, but in order to find the dojo files I need, I have to open sometime 100+ 'eval code' files in Microsoft Script Editor/Debugger and manually inspect them for their 'dojo.provide' clause. Is there a way to get Microsoft Script Editor t...

Use the get paramater of the url in javascript

If I am on a page such at http://somesite.com/somepage.php?param1=asf in the javascript of that page, I would like to set a variable to the value of the paramater in the GET part of the url so in javascript: <script ...> param1var = ... // ... would be replaced with the code to get asdf from url </script> What would "..." be?...

Provide feedback to view from controller in ruby on rails

I am using multiple file field in a view to upload multiple files. I would like to update the user of progress while uploading. I tried using something like this def create params[:upload_data].each do |file| unless (file =="" or file== nil) @photo = Photo.create({:approved => false, :user_id => @current_user.id}) ...

How can I get smoother animation for sliding content with JavaScript/jQuery?

I have some content sliding here. http://www.smallsharptools.com/downloads/jQuery/Slider/slider.html The HTML structure is simple. There is an outer box with a fixed height and width with the overflow set to hidden. Then there is an inner container with the width set to the full width of the content inside of it which is a series of di...

Strategies for authenticating users one time without pre-shared identifier.

I am creating a script that takes a list of names and email addresses and sends an email inviting them to register for our department's secure website. The list of names and emails are available on a public facing page on the same site. I need a way to give them a unique token that will identify them when they follow a link in the emai...

Emulate clicking a link with Javascript that works with IE

I want to have java script clicking a link on the page..I found something on the net that suggests adding a function like this: function fireEvent(obj,evt){ var fireOnThis = obj; if( document.createEvent ) { var evObj = document.createEvent('MouseEvents'); evObj.initEvent( evt, true, false ); fireOnThis.dispat...

Is there a way to detect closing page by javascript?

I watched a few threads here,mostly used this: window.onbeforeunload = function (e) { var e = e || window.event; //IE & Firefox if (e) { e.returnValue = 'Are you sure?'; } // For Safari return 'Are you sure?'; }; but seems this will mix the situation of refreshing page and close page, is there any possibility to distinguis...