javascript

How to make accessible popup using jquery unobtrusively?

How to make Accessible popup using jquery with custom size and poition in perfect center on screen on any resolution? if JavaScript would be disabled then link should be open like normal link in new window/tab. I need unobtrusive method to add class to link also in script not in xhtml. ...

Calling href from JavaScript

I'm developing a script for Greasemonkey, but I'm stuck trying to activate links via JavaScript. The script should check the web page for a certain href link and, after finding it, it must activate it (like clicking on the link). If it helps, the href I'd like to activate is a "javascript:FUNCTION" kind of link. ...

Determine whether element has fixed or percentage width using JavaScript

Using Mootools Element.Dimensions I can get the computed size, in pixels, of any element. However, I can find no way of telling whether an element has been sized using pixel or percentage values (other than in the special case of its having an inline style). Is there a sensible way of doing this? The only solution I can think of (which ...

js adding a value to a element in an array

hi guys!! I found some answers to similiar questions but I'm still not getting it. but I hope it's a short problem so I dont make too much trouble! ;-) I have a js array arr = [ a, b, c] How can i add value to this elements dynamically? For example I want that each element get the value true So it should look like this afterwards:...

Javascript - How to program a click counter?

I have tried before, but it doesn't work. Is it any wrongs of the code? <script type ="text/javascript"> function count() { var x = 0; x += 1; document.getElementById( "counting" ).value = x; } </script> </head> <body> <input type ="button" value = "Click" onclick = "count()"/><br><br> <input id = "counting" type = "text" /> </body> ...

Invoking button click event on one page from another page ASP.NET

Hello friends, I have two aspx pages i.e. default1.aspx and default2.aspx. Default1 contains some controls, tables etc. I am showing Default2.aspx into anthor window using hyperlink, setting its target to _blank. What I need is to call a button event which is placed inside Default1.aspx as soon as Default2 is closed (i.e. as soon as the...

jQuery dialog continue click event on form validation

On pdf downlaod link need to open a jQuery dialog and have a form taking name, email and a confirmation checkbox. There will be some validation on the fields eg. required min and max size etc... Have initialised the dialog on page load and the dialog is opened on pdf download link. $("#dialog").dialog({ bgiframe: true, autoOpen: f...

'Access is denied' Javascript error

Hi , i am opening a file in IE6.0 from a directory using JavaScript. but iam getting 'Access is denied' error in javascript.My code in javascript function poponload() { testwindow = window.open("C:\Searchtool\asd1.wrl", "mywindow", "location=1,status=1,scrollbars=1,width=300,height=300"); testwindow.moveTo(0,0); } if i use the same f...

Bizarre timeout in Web CMS, ideas?

I know this kind of thing cannot be adequately answered without a link to the live example. Unfortunately, I can't set one up right now as it's a back-end login and creating a safe public login would be too much to do at this point. Sorry. I'm hoping for ideas and input from people who may have experienced something similar in the past. ...

Call href from JavaScript

This is the same question as THIS ONE, I can't answer that anymore, so I'm re-posting it with my account. Sorry for the mess. I need a Greasemonkey script that on a page load activates a href link like 'javascript:FUNCTION'. I've seen this code: <script language="Javascript" type="text/javascript"> function somescript() { ...

page load from javascript

hi,, i m building a website in asp.net using c#.. can nyone tell me ..is it possible to either call a pageload function or load a page from javascript ...

Question About FCK Editor? And Control validation?

I have added FCK Editor in my project. In that user can able to create a form with the controls provided in FCK At last the project will be shown to the customers they don't have any idea about HTML.So they might enter the same name for all the controls? while saving source of a FCK Editor once all form creation is done into the Database...

I try to add a new button to Firefox, but it's the old button that gets added!

Once, I tried adding a button with "bookmark-item pagerank" as class to PersonalToolbar. Now, the code... function createToolbarButton() { const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var anitem = document.createElementNS(XUL_NS, "toolbarbutton"); anitem.setAttribute("id", "Testing-Doit-But...

What does the javascript snippet mean?

if(self!=top){ window.open(self.location,'_top'); } Can someone explain this? EDIT What does self!=top and window.open(self.location,'_top') mean respectively? ...

javascript problem

consider a path="~/uploads/" how can i get the no. of files in it through javascript ...

Singleton Pattern and Abstraction in JS

Although the example below exploits ExtJS, one can easily extrapolate to another framework. I am a fan of abstraction and data hiding (and OO in general); does anyone else hide data and members/functions or do you consider this attempt to be overkill? (Note: I believe strongly that DOM IDs should almost never be hardcoded. And, thou...

in javascript is it possible to construct an object literal with expressions evaluating to strings for property names?

i.e. is it possible to do this: var fruit = "banana"; var x = { "app" + "le" : 5, // "apple" : 5 function(){return "orange"} : 8, // "orange" : 8 "" + fruit : 3 // "banana" : 3 }; ...

Using HTML/Javascript display the value of a radio button in a form textbox

Hi all, How can I display the value of a radio button in a form text box? I'd like it to change when the radio button is clicked. Here is my radio buttons: <input type="radio" name="testPassed" id="TestPassed" value="TestPassed"> <input type="radio" name="testFailed" id="TestFailed" value="TestFailed"> The text box: <textarea name=...

passing an argument in javascript function

i have a button with id Button1 on page load function i m trying to call javascript function like this int l = files.Length; Button1.Attributes.Add("onclick", " alertMe(l);"); where files.length is some integer value,now i m trying to pass this value in alertMe function can anyone tell me is it a write way to pass the value if yes how...

How to stop jQuery affecting all elements, when I only want one element to change

OK, I have a list of <li>s with some content in like so: <div> <ul> <li><h4>...</h4><div>...</div></li> <li><h4>...</h4><div>...</div></li> <li><h4>...</h4><div>...</div></li> <li><h4>...</h4><div>...</div></li> <li><h4>...</h4><div>...</div></li> <li><h4>...</h4><div>...</div></li> ...