javascript

Search field using Ultraseek

So i realized today that using IE to do a search on my site, for instance the term "documents" returns the search results. if i use FireFox or Chrome the data in the input field is not recognized... now i looked at the code, and realized that there are no tags around the input fields... BUT if i put them, then IE does not work... wha...

Use Javascript to copy Text from Label

Hello All- Label1 (asp.net control) is located inside Panel1 of my webpage and I have a button called bt. What is the Javascript to copy the Text from Label1 to the clipboard? Thanks, @ artlung, I placed the below code just outside of my form but inside the body. The last line of code I placed inside Panel1 of my form. Anything wro...

CSS Page Layout w/ Breaks

I'm trying to make a webpage where it basically looks like a word document. There would be multiple boxes that would scroll down and the text would flow and page break from one page to the next. Does anyone have any idea where I would even start? Thanks. Edit: It should be right in the browser, looking similar to this: (Ignore the c...

Gdata JavaScript Authsub continues redirect

I am using the JavaScript Google Data API and having issues getting the AuthSub script to work correctly. This is my script currently: google.load('gdata', '1'); function getCookie(c_name){ if(document.cookie.length>0){ c_start=document.cookie.indexOf(c_name + "="); if(c_start!=-1){ c_start=c_start + c_...

CSS Doozie: Replacing BG Image on SELECT dropdown

I need to be able to change the background-image property of a SELECT drop-down using JavaScript/CSS. We have been able to accomplish this in Firefox, but it doesn't appear to be supported at all in IE. From what I've read, IE won't support this. But I'm wondering if there's anything else I could try. Does anyone here have any recommend...

Displaying the infoWindow in Google Maps at the same time as the marker

Hi all, I have developed a Google Map page which displays a marker where I tell it to. If you click the marketr, the infoWindow pops up. However, I was wondering if anybody knows how to open the infoWindow and display the marker at the same time? (as in onload) Here's the page: http://www.sportingemporium.com/map_test3.htm This seems l...

Setting javascript prototype function within object class declaration

Normally, I've seen prototype functions declared outside the class definition, like this: function Container(param) { this.member = param; } Container.prototype.stamp = function (string) { return this.member + string; } var container1 = new Container('A'); alert(container1.member); alert(container1.stamp('X')); This code prod...

Iterate over framesets in JavaScript?

How can I list all FRAMESET elements in an HTML document using JavaScript? I believe it to be possible to select these elements in the DOM tree because the DOM Inspector plugin for Firefox is able to list all the FRAMESETS in a page. ...

How can I set the order of events in Prototype?

I need to be able to set the order of event handlers for a click event using Prototype. I need to insert an "Are you sure?" pop-up before an Ajax call modifies data. Due to the way the program is structured, I can't change the order of js click bindings. I love jQuery and there's an elegant solution to this problem right here on Stack...

Does HTML5 make Javascript gaming safer (more secure)?

I know that Javascript is an incredibly unsecure way of programming a persistent game, where for instance you are doing battle calculations in an RPG and then award XP through linking to a PHP page when they win that adds XP to a database (since the player could make their own javascript to always win or just look at the PHP page that yo...

Firefox extension js object initialization

Note: this is about Firefox extension, not a js general question. In Firefox extension project I need my javascript object to be initialized just once per Firefox window. Otherwise each time I open my window a new timers will be engaged, new properties will be used, so everything will start from scratch. hope example below will demysti...

How do you submit a form with javascript with a <input type="button">

How would you use a div to submit a form, for example? Javascript please ...

How do I ensure jQuery ajax call does not send a local copy of file?

$.ajax({ type: 'GET', url: "string.txt", cache: false, success: function(str){ alert("Data is: "+ str); } }); In this example, string.txt is sent to the cache (\Temporary Internet Files) How do I ensure that the file is not sent. I do not want copy to be sent. Only a read from the server. Am I missing an option? ...

How do I display field when I click on a link? (javascript)

how do I create it so that when I click "report user", a box displays and it shows a list of reasons why to report the user and a submit button. I rarely use javascript...can someone point me in the right direction. ...

Is Flash/Actionscript any safer than Javascript for persistent online game?

I'm finding lately how unsecure Javascript is when programming a game (I'm trying to do a turn based RPG and currently the battle calculations are done through Javascript which any player can cheat with of course giving themselves as much XP as they want), so I'm wondering if I were to move my battle screen to flash if this would be any ...

I am looking to create a static menu when a user scrolls near the bottom of the page

Using Javascript, Jquery preferably, I want to be able to trigger the visiblity of the div when a user is at a certain page height. NYtimes has an example of this when you scroll to the bottom of a story, a slider pops out with another news story, and goes away if you scroll up. ...

Use Javascript RegEx to extract column names from SQLite Create Table SQL

I'm trying to extract column names from a SQLite result set from sqlite_master's sql column. I get hosed up in the regular expressions in the match() and split() functions. t1.executeSql('SELECT name, sql FROM sqlite_master WHERE type="table" and name!="__WebKitDatabaseInfoTable__";', [], function(t1, result) { for(i = 0;i < result...

Using Jquery to check if a URL is valid

A long running background process creates a text file to indicate the completion of the process. From the frontend, I'd need to check every few seconds if the text file has been created or not. I am doing this check from http://DomainA.com However the file is created in http://DomainB.com/Mytext.txt Can someone help me write a jquery s...

HOw to make image stay inside the div box on scrolling

I have the image position fixed inside div and code is gven below #content{ margin-top:100px; width:900px; color:#009; border:1px solid red; overflow:hidden; display:block; } img { float:left; position:fixed; top:140px; padding:50px; } #text{ display:block; border:1px solid green; width:500px; height:1200px; float:right; overflo...

does the submit button have to be contained in the form

Hi All, I want my submit button to be positioned somewhere that outside my form element? Do I have any options? With the exception of jquery. Thanks, rodchar ...