javascript

JavaScript and __proto__ - what browsers use it?

Hi, What web browsers use the __proto__? Mozilla states that: Note that __proto__ may not be available in JavaScript versions other than that in Mozilla. ...

Determine on which row of textarea is the cursor

How to determine on which row of textarea is the cursor with javascript? ...

Querying data with JavaScript

I am currently looking for an intelligent best practice solution for the following problem. Within a web page, I want to make use of data that is currently organised in some MySQL tables. Problem: I cannot access the database from the webserver, so I am not able to query the data using SQL. Therefore, I thought to transform the data in...

Javascript Insert Row

Hi, I have an HTML Table consisting of several rows. I am trying to insert rows at a specific position in the table. For example if I mark an already existing row and click insert a new row should be inserted below. At the moment adding rows at the bottom of the table works. What I need is to insert the already build row at a certain po...

web printing, php or javascript

Hi, how can i print a web page? more exactly i want to print only a table in the web-page. i found out how to print all the page, some thing like this: <A HREF="javascript:window.print()"> i realy don't know javascript. can i modify this to javascript:table.print()? thanks, Sebastian ...

jQuery: Get all Windows

Hey, Im using the Prototype Javascript Library's Window class to create pop up windows in my webapplication. I want to submit a closeonesc command on the Windows and im doing this with jQuery. But atm i have to hardcore the close event on every singel win variable. So i was thinking that there have to be a way to check for all Windows ...

Javascript /jQuery variable print in HTML

I'm trying to add "Make an offer" buttons to the following web-page so people can click and fill out the modal popup form and then it e-mails their details: http://www.colincooke.com/coinpages/pennies_offer.html The modal works fine, but I can't seem to get the variables to output in the HTML. In the page this is HTML code for a table ...

Error: "missing } in XML expression"

my date time picker JavaScript giving the following error ...please resolve my problem following is my code // JavaScript File function SetDate(dateValue) { // retrieve from the querystring the value of the Ctl param, // that is the name of the input control on the parent form // that the user want to set with the clicked date...

Jquery special selection

Hello, I have the following html code: <div class="Radios"> <span class="radio"> <input type="radio" value="1"> yes <input type="radio" value="0"> no </span> </div> <div class="More">hello</div> <div class="More">hello</div> <div class="Radios"> <span class="radio"> <input type="radio" val...

Javascript: How to change attributes of child elements?

I have this hidden link, which is needed for other purposes: <span id="notitle" style="display: none;"> <a href="...Foo" title="Foo" style="..."></a> </span> The link is generated dynamically and automatically includes the title attribute. But I'd like to remove the title attribute since the value is copied when the user copy-pastes s...

What is the problem with this onload event?

I have this password field input class="txtfld" type="password" id="TextBoxLoginPassword" runat="server" value="password" onfocus="javascript:if(this.value == 'password') this.value='';" onblur="javascript:if(this.value == '') this.value='password';" onload="javasc...

Javascript - Getting data from XML for later use... put in array or object?

I am extracting a bunch of data from an XML file using jQuery. I need to use the data to fill in image paths, names, etc. What is the best way to gather all of this data for use? For instance, I get everything like so: $(document).ready(function() { $.ajax({ type: "GET", url: "st...

How to disable mouse right click on a web page ?

I want to disable mouse right click on an HTML page. I have a page where user has to enter the details. I don't want the user to see the menu thats get displayed with the mouse right click. ...

Is there a way to make the jQuery UI slider start with 0 on top instead of on bottom?

Look at this demo of the jQuery UI Slider. Notice how when the handle is down the bottom, the value is 0? Is there a way to reverse this, so the handle up the very top is 0, and the handle down the bottom is the max range? I've played a bit with the options, but so far have been unable to get it to work. Thanks. ...

If am entering some values in text box it should be simultaneously displayed in the other text box using html and js

Hi If am entering some values in text box it should be simultaneously displayed in other text box using html and js in the same page. That is if i enter test in text box then the other text box should contain the alphabet test immediately. Is that possible. If yes how? kindly clarify. thanks in advance ...

How to remove attributes for multiple child elements?

I have system-generated links which I hide manually. Now I want to remove the link's title attributes sicne those are copied when the user copies surrounding text. <html> <head> <script type="text/javascript"> var getElementsByClassName = function (className, tag, elm){ if (document.getElementsByClassName) { getElements...

Process form according to chosen option on alert box

I'd like to modify the way some of my edit forms work...on submitting the form, the user is prompted with an aler box. If he/she chooses "Yes" then the record will be edited...on choosing "Cancel" however, the record will be saved as a new record. Is this possible? ...

JS: Image upload live manipulation, scale, dimensions and crop

I am creating a CMS which has a number of images which a user can upload and attach to various places in the pages. I am trying to find a nice, preferably jquery based plugin or similar for scaling an image before allowing it to be cropped. I have implemented jCrop http://deepliquid.com/content/Jcrop.html which is working great. Howeve...

Get all elements nested in UL tag

Hi, I have HTML code structure: <ul id="main"> <li> <a href="#"></a> <ul> <li><a href="#"></a></li> <li><a href="#"></a></li> <li><a href="#"></a></li> </ul> <li> </ul> Want to select all elements inside UL id="main". Tried to use: var el = document.getElementById("main").getElementsByTagName("*...

jQuery - How can I make this work (tag replacements)

Currently I have: this.html(this.html().replace(/<\/?([i-z]+)[^>]*>/gi, function(match, tag) { return (tag === 'p') ? match : '<p>'; return (tag === '/p') ? match : '</p>'; return (tag === 'script') ? match : 'script'; return (tag === '/script') ? match : '/script'; })); However...