javascript

Get all Attributes from a HTML element with Javascript/jQuery

Hi I want to put all attributes in a Html element into an array: like i have a jQuery Object, whichs html looks like this: <span name="test" message="test2"></span> now one way is to use the xml parser described here, but then i need to know how to get the html code of my object. the other way is to make it with jquery, but how? the...

CSS - js rendering links useless...

Ok, well, thanks to people here, I figured out the portion of my js code that's rendering my links useless is what's pasted below... Still trying to figure out why, but if someone has any insight, that'd be great... function initJumpMenus() { // Turns all <select> elements with the 'jumpmenu' class into jump menus var selectE...

Single Click issue in IE 6

I have the following code. The code populates a list box basing on the selection done. But my code works on IE 7 & fails on IE 6. //---------------------------------------------------------------------------------------------- //fill the location list on the basis of Country function FillLocationList() { var opt = document.create...

Popup window Maximize button

How to enable the maximize and restore button of the popup window using Javascript? ...

Javascript Radio Button Count and Calculation for Questionnaire

Hi, I am trying to create a simple questionnaire for a website but am fairly new to javascript and html I do have a basic function to calculate a percentage and have created the html form with radio buttons and a submit button There will be about 20 questions in the questionnaire which will have yes/no radio buttons. What I need to d...

How to split String using jquery

hi, how to split 12345678 using jquery? No i want 1 2 3 4 5 6 7 8 separated ...

Is there a way to Show/Hide elements without CSS?

Hello All, I am making one Web UI 508 compliant and one requirement states "working with Web UI when CSS is disabled". We have several places where we show/hide elements using style=display:inline and style=display:none and calling them accordingly using JS function calls. When i disable the CSS (using WAT2.0), the hidden elements are a...

[Need help]: Issue with submit button and html file input control’s Click() method

Scenario: On click of a button, we dynamically create html file input (file upload) control on the page and call that file input controls Click() method. User then selects the file from the disk. There is a “Submit” button to upload the selected file. Problem: The problem is, when clicked on “Submit” button first time, the input value...

Can I register external JS files on a page via Javascript?

In my CMS I add modules to the page via Javascript, these modules may include external JS files which get registered on page load into a collaborated external file. When the modules are added via JS these scripts are therefore not registered until the page is reloaded. Is there a way for me to register these scripts dynamically via t...

Button disabled.. But...

I have one form, it includes 3 text boxes and 2 link button as Edit and delete. these controls are Operated (enabling & disabling)by a Button. On loading the delete button enable property set to false. but when i click on the delete button it shows the delete confirm box. what i do for avoiding this Magic ? ...

jquery check class problem,

hello, I have a button that depending on a class value should send different values to the POST however what ever happens it is only running one condition, whatever I do I can only get it to send the POST the method=add data. This is my code $("a.navlink").click(function (ev) { $(this).removeClass("active"); var url = $(this).a...

javascript for loop with a pause

I have a for loop that runs through an array of functions and invokes each one. ideally I would like to invoke them in a particular sequence since the output of one might effect the output of the others after it. is there anyway to do that without setting time intervals or timers? Sorry...I guess i should have explained a bit more.. the...

How to implement google-maps-like zoom-and-pan system in web?

Hello, I'm writing a ticket-shop-system atm for reserving tickets for various concerts. What I have is a php-backend and a webpage that shows a .swf with some actionsscript-3 code in it, to draw in flash some sort of map and make available seats clickable for the end-user. The problem with this solution is, that there are quite large hal...

javascript: finding the absolute size of an anchored link

Hi guys I need to calculate the position, height and width of every anchored link in my page. I know how to find the x,y coords, but I have a problem with the height and width. The problem appears when the link has children inside (images, divs etc), so heightOffset and widthOffset won't work. Is there a way to do this without going on ...

How to let the page reload specify div in RoR?

I modify my RoR application to calling a create.js.rjs after created an item. I want to reload a specify div in my page after I create an item, how can I do that? When my div have a ruby object like this: <div id="categoryList"> <% @categories.each do |category| %> <%= content_tag(:dt, category.name, :class => "menu-table")%><%...

Is there a way to access an object defined on a view in a Master Page in ASP.Net MVC

Hi all, So I've got a partial in my MVC project that creates a JSON array. I want to move this chuck of code from the top of the html page body to the bottom with the rest of the JS for speed reasons. That is to say I want to store the JSON created as a string in C# and access it on the Site.Master. What's the best option here? Thank...

Confusion about window.onload in javascript

Hello, I have one paragraph of javascript code. And i don't understand it very well. Can you expain it line by line for me? Thanks a lot. function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload();...

Modify Firefox titlebar through Javascript Extension

I have an extension for Firefox written in Javascript that I would like to make able to append text to the window's titlebar. Is this possible? ...

Subtracting long numbers in javascript

Why is q == 0 in the following script? <script> var start = 1234567890123456789; var end = 1234567890123456799; var q = end - start; alert(q); </script> I would think the result should be 10. What is the correct way to subtract these two numbers? ...

What is the best alternative for jQuery thickbox

As jQuery thickbox is not maintained anymore (as of ThickBox 3.1), what is the best alternative for jQuery thickbox currently available under GPL or similar license. Looks nyromodal is best available so far, but is there anything better. (nyromodal has some problems in IE 6) I am looking for a plugin which can handle ajax forms, inline ...