javascript

Javascript validation For .net dropdownlistbox control?

i have 3 dropdownlistbox.. 1.country 2.state 3.cities when i am seleting country name.. as per it..state name and city name change. in that if i am changing state name then city name is changed in dropdownlist box.. using only javascript not postback of .net control. i have faced so much problem by making array of country,states and ...

pass variable to child in javascript?

I want to pass a variable in my parent window to an iframe html document (child). Example: var myValue = 10; want to pass myValue to a child element (hidden input)... How would I do this? ...

is it possible to do this on a input type ="file"?

I need to pass the filename of a file-input to a parent page... is this even possible? The input type ="file" has a value, but can I use it like this? I have used the value of the file-input to check the extension of the file, and it works! So I guess there is a value, but can this be done and is it reliable? If not, how would you hav...

Sharepoint: Submit form data from Edit form and then redirect to display form.

This is for a custom Editform.aspx being used to submit data to a custom list. Once the user completes the form, he should be able to hit a button or even the OK button, and have sharepoint submit the form data to the list, then redirect to the items Display form (dispform.aspx?ID='itemid'). I was able to get the ID of the current item ...

Help me understand objects in DOM

I have a question about DOM objects. What I have learned is that everything in a document are objects? <form name="myform" action="script.js"> <input type="text">type something</input> </form> If we look at the example, is form an object with properties name and action? But are name and action themselves also objects? i don't qu...

JavaScript large number library?

Is there a library available in javascript to handle large numbers with accuracy (sort of like what oracle does by storing the number as a string) and allows for operations like add/subtract/multiply/divide/mod/etc ? Basically I need to add large numbers like 1234567890.1234567890 + 1234567890.987654321 and get a precise result. ...

How to prime HTML for use with JS accordion effect?

I've got a website set up with well structured pages, eg. <h1> for the website name, <h2> for the page name and <h3> for the different sections on the page. Anyway, I was looking to set a bunch of the really long pages (an FAQ page for example) up with an "accordion" effect, with the <h3> elements being the toggle and the content direct...

How does one identify an empty element using jQuery that might contain a comment tag?

I'm trying to identify an empty element that might or might not contain a comment tag and/or white space. The following HTML structure is common place in the environment I'm working with: <div class="container container-no-title"> <div id="dnn_ctr6735_ContentPane" class="container-padding DNNAlignright"> <!-- Start_Module_6735 --...

Swfobject and MooTools: Dynamic movie height

Greetings. I am developing an animated homepage for a Flash-HTML hybrid website, and for the sake of standards, my solution is proving difficult. I am not a Javascript pro, so any help is appreciated! Here is the run-down: For Flash users, HTML page loads a variable-height AS3 Flash movie that will start at 556 pixels high, and after...

Fx on Javascript: How to fade stuff, etc without frameworks?

Hi, I would like to learn how to do fade, and similar effects on Javascript. I often get answers, like why not use Jquery, mootools, etc ? Well, I want to learn how stuff works, then I wont mind using any of these frameworks. I'm currently learning about making changes on the DOM, so, I've read a lot of stuff on this theme. Also, I've ...

How do I resolve this "Undefined function" JavaScript Error?

I keep getting a "Undefined function" JavaScript error in my error console. Any idea why? <div id="counter" style="width: 40px;"></div> <script type="text/javascript"> var seconds = 60 document.getElementById('counter').innerHTML = seconds function countDown() { if(seconds <= -1) { seconds += 1 } else { ...

Need to move through galleria generated images using a numbered menu

I'm using the lovely Galleria Jquery image gallery. It all works fine but i need to create another way of traversing through the images as there will be quite a few images in the gallery and scrolling through using the normal controls would be quite laborious. So what i want to make is a grid of numbers like this: 01 02 03 04 05 06 07 ...

Where is the prototype property on strings in JavaScript?

I just noticed that there is no prototype property on strings in JavaScript. This is a pedagogical question while I try to wrap my head around the JavaScript type system but what gives? How come "abc".toString() works? And how would I go about extending strings? If I wanted to be able to do "hey you!".alertDialog() for example? ...

Hover next / previous element

I need to be able to have the next element / previous element to change the background color with the current element. How do I do that. The element that I am working is TR, table row, and nextSibling, previousSibling doesn't do the trick for me, don't know why ? ...

drop right menu

I'm looking for a drop-right menu, not dropdown. Based on list of lists, ex html <ul> <li> item1 <li> fold1 <ul><li> fold1it1 <li> fold1it2 </ul> <li> item2 <li> fold2 <ul><li> fold2it1 <li> fold2it2 </ul> </ul> When you mousover fold1, it would expand to the right right (drop right) item1 fold1 fold1it1 fold1it2 fold2it3 ...

JQuery UI; Stop propagation of selectable events

Basically I am using jQuery ui's selectable functionality on a ul, but the ul will often times have a scrollbar, and this scrollbar becomes unusable in Webkit browsers since when you try to click on it to grab it, the lasso for the selectable functionality is drawn overtop instead. I have formulated a solution, which involves checking t...

How do I make sure that an automatically closed window closes all its spawned windows as well?

I have the following scenario: A user on one our customer's website clicks a link. It performs an automatic signon with their credentials to our site, which is launched in a new window. User on our site logs out, and is sent to a page which does a JavaScript window.close(), which closes the window. If they were a customer that logged i...

Is it possible to use JSP/JSTL to generate dynamic css/javascript files?

If so how do you do this? (jboss/tomact embedded/jdk 1.5) not embedded js/css but an actual file... ...

Passing a value from child window to parent

Here is my scenario: i have a parent web page, in my javascript code I open a new window. This new window is a server-side aspx page. This child page needs to save some data in the database, and after saving it returns an ID. Now, I need to pass this ID from the child server page to the parent's javascript. Essentially I need the child ...

How to start/stop CrossSlide (jQuery)

I found that CrossSlide causes video playback on the same page to stutter quite badly. My thought was to have the cross slide effect on the same page stop or pause during video play back, annd then start again when video stops. Id doesn't look like there is any start stop function included. Does any one know how I might be able to acco...