javascript

Get source of some http url with javascript

Please, I have another simple question for experienced programmers. Is it possible to get source code of any webpage with javascript at client side? With AJAX maybe? But I need that the server I am downloading the url from does see the IP of the client.. with AJAX it will show my script server IP, right? Thank you in advance. ...

How to get the click event on sIFR embedded tag in IE?

I have implemented Scalable Inman Flash Replacement (sIFR) to convert text. The issue is, I'm unable to do onClick event over the iSFR embed tags. $(function() { $("embed").click(function(){ alert('clicked over embed'); }); }); This works in Firefox but not in Internet Explorer. Can anybody help me? ...

What is the basic level of Accessibility for UK local government web site?

Hi, I'm designing a new site for a local government department in Scotland and I want to make sure I meet the minimum accessibility level for the site. I had planned to use some jQuery effects, and also to AJAXify the content. But I realised all this JavaScript probably won't be accessible. We will be using VS2008 ASP.NET 3.5 framewo...

TinyMCE wraps my text in <p></p>. Can I avoid this?

Hello everybody. I am using TinyMCE (http://tinymce.moxiecode.com/) in a .NET page. Whenever I load a text myTMCE.value=mycontent; I can see that my text gets wrapped in <p></p>. This is not desirable for me, so I am trying to avoid it. Trying to initialize in <script> tinyMCE.init({ force_p_new...

Javascript: Can I access source of the file that is loaded in the hidden iframe

I have found this code for putting hidden iframe into my html and loading url into it: var i = document.createElement('iframe'); i.style.display = 'none'; i.onload = function() { i.parentNode.removeChild(i); }; i.src = 'http://www.google.com'; document.body.appendChild(i); And I would like to ask, can I access in javascript the source...

how to implement Master details classes find function in javascript?

I have this code: function Item(id, itemType, itemData, itemCategoryId, itemRank) { this.id = id; this.itemType = itemType; this.itemData = itemData; this.itemCategoryId = itemCategoryId; this.itemRank = itemRank; } function Category(id) { this.id = id; } And i want to write a function for the Item class wh...

Point-in-rectangle testing

I have this matrix /// as if the create a rectangle int [][] loc = { {5, 15},//(x1, y1) {5, 30}, // (x1, y2) {20, 15},// (x2, y1) {20, 30}, // (x2, y2) } // this are the point that i want to check if they are in the rectangular range or not int [] [] point = { {6, 16}, //(x, y) {3, 17}, //(x, y) } I want i method that ca...

How to hold a html select expanded while adding options

Hi, i am trying to add options to a select in its onclick event and works fine in firefox and ie but... ie close the list after fill it although mozilla holds the list expanded ¿Are there any way to hold expanded the list (or reexpand the list with javascript) in IE? (i am using ie 7.0) thanks! ...

Javascript: Referring to control before page is loaded

I have a composite control on an ASPX page. There is Javascript on the ASPX page that gets loaded before the control. Now, since the script refers to the control element which does not exist when the script is loaded, this is throwing a Javascript error of "Obect not defined". Attaching the script to the onload event of the control give...

Mechanize and JavaScript

Hello folks; i'm new with ruby and coding just for fun. i just found WWW::Mechanize and i loved it at the first time, There is my question: i'm connecting to a web site, logging in. website redirects me to new pages and mechanize deals with all cookie and redirection jobs. bu i cant get the last page. i used firebug and did same job ag...

Use JQuery UI Datepicker with Icons from Jquery UI Theme

I have a datepicker control setup using the JQuery UI, I am also using the JQuery UI themes which provide a bunch of default icons that I want to use. The DatePicker allows for specifying a specific image, i.e.: <script type="text/javascript"> $(document).ready(function() { $("#DateFrom").datepicker({ showOn: 'button', buttonImag...

How to convince fellow programmers to use Gettext?

I have used GNU Gettext successfully in many projects I have worked in, but at my latest job I have suddenly found myself forced to work with a really awkward localization system. The current system stores translations in database and adding new translation goes something like this: add function call with translation key to source cod...

Keeping track of selected list item in a master page

As per the functionality of the headers in stackoverflow (Questions, Tags, Users, Badges, ...), I would like to keep track of which list item a user has selected in an ASP.NET MVC view so I can apply a different style or image. What is the best way to do this? ...

Is there any good plug-ins for developing javascript in Eclipse

Duplicate: What is the best Javascript plugin for Eclipse? jseclipse? ...

Why is document.write considered a 'bad practice'?

I know document.write is considered bad practice; and I'm hoping to compile a list of reasons to submit to a 3rd party vendor as to why they shouldn't use document.write in implementations of their analytics code. Please include your reason for claiming document.write as a bad practice below. ...

javascript date manipulation library

I'm looking for a javascript date manipulation library. I googled around some and came up with datejs. The latest version is an alpha-1 release from 2007 so i'm not sure about its quality. Has anyone used this library or do you have another one you can recommend? I need functions like getWeekNumber(), getFirstDayOfMonth(), getFirstDayOf...

Newlines in Javascript and PHP5

Hi, I have a CSV string that is embedded within an XML document, which is necessary for a flash chart which uses XML. The problem is that the chart gets the settings from the HTML file through a javascript snippet, like so: <script type="text/javascript"> // <![CDATA[ var so = new SWFObject("/gr/amstock.swf", "line", "100%",...

JavaScript permissions errors stemming from an IFrame

I have a .jsp that contains an IFrame with a page that has some embedded JavaScript. This JavaScript accesses some DOM elements in the parent page (the one containing the IFrame). The embedded page is going to be on a seperate sub-domain from the parent page, and I realize that there are some security implications. My impression is that...

Retrieving the value of a asp:TextBox

I have a disabled TextBox that I am editing the value of on the client side with JavaScript. When I try to retrieve the value on the server side it does not reflect the change made on the client side. If I set the TextBox's enabled attribute to true I can retrieve the value, but the user is able to put focus and edit the TextBox. Is the...

Display Google Keywords that brought a user to the site

I am looking to display something like: Hello, you've reached this site by looking for [google keyword(s)] I'm pretty sure I've seen this done before but I am having troubles figuring out how to grab the keywords that were used to lead a user to my site. Anyone know the answer? ...