I would like to get the id of a html check box when the client clicks it. I want to do this on the client side so i need to use java script. I want to be able to do this in both fire fox and ie window.event.srcElement works great for ie but not for firefox do not tell me to use Event.target for firefox because that does not work. At least it is not working for me anyway.
After clicking the checkbox, I like to get the value of the checkbox submitted. Why the following page always get the value "20" for checkboxChoice and checkboxvalue no matter which checkbox I clicked?
I have put the following code into a sharepoint aspx page. So that when I change the value in a drop down box it runs a function (in this case it displays "Works").
<script language="javascript" type="text/javascript"> function getField(fieldType,fieldTitle) { var docTags = document.getElementsByTagName(fieldType); for (var i=0; i < docTags.length; i++) { if (docTags[i].title == fieldTitle) { return docTags[i] }}}
function TestFunctionName() { alert("Works"); } getField('Select','DropDownBoxName').onchange = function() {TestFunctionName()}; </script>
What I'd like to be able to do as well is when a check box is changed or clicked on the same thing happens. I dont seem to be able to achieve it though. I've change the line... getField('Select','DropDownBoxName').onchange = function() {TestFunctionName()}; to... getField('Input','CheckBoxName').onchange = function() {TestFunctionName()}; and getField('Input','CheckBoxName').onclick = function() {TestFunctionName()};
I very new to JavaScript and I need to validate a text field after a checkbox has been clicked. This is part of a larger form validation. I am looking for the simplest and easy solution to this issue. I have seen a couple of other examples that are far too complicated for the my needs. The form is asking a user to identify a referral source. If the referral source is a website, it wants the user to provide a URL. To clarify, all it needs to do is verify that if the website checkbox is clicked then there is text in the corresponding textbox. Here's what i'am been trying to make work
I have a form, what I want to happen is that a user clicks a checkbox and a list appears or is enabled so that the user can then select a option. Also when the checkbox is unchecked again, I want the list to disapear or become unabled and it's value set back to whatever was the default.
After a bit of looking around I thought I has done it, but no luck. Can anyone let me know whats going on here? Code:
I have a lot of information on my site that is in multiple categories. I have a list of categories, each with its own checkbox. By default, all the information is displayed (therefore all the checkbox's are checked by default).When someone unchecks the box I want to hide the divs with that class, and when someone rechecks the box, they should reappear. Here is my code so far. It is hiding the div's fine, but they are not reappearing when user tics the checkbox again.
<script type="text/javascript"> function toggledisplay(category){ if(document.getElementById(category).checked){
I need to have a textbox of a form field greyed out, inaccessable, blocked, until a checkbox is checked(or if it's already activated, it becomes inaccessable when turned off.
After clicking the checkbox, I like to get the value of the checkbox submitted. Why the following page always get the value "20" for checkboxChoice and checkboxvalue no matter which checkbox I clicked?
I've made a code that finds the factors of an inputted number. Here's the script code...
However, when I factor it, It will go to a blank unformatted page to list the factors. How can I list the factors on the webpage itself like a div? I tried using a <div> and innerHTML but it only lists one factor.
i have a problem with fading things in and out using jquery. Please check it out.THe problem is that sometimes the fading in happens before the fading out. What can be done to fix it?
i'd like to change the color of this span id by pressing the button. so in this case it would change red, yellow green and last:
changing the font in a bold tag bold by pressing a button
html code: (note, the font weight in normal in css for bold) <b>i want this bold when you hit the button!</b> <input type="button" value="Set Bold" id="btnBold" />
Are there pointers in Javascript available, like for example in Turbo Pascal 7? :)
So i could use function TestFunc(PointerToFunctionA, FunctionAItself) { FunctionAItself('Hallo')); //And how to use the Pointer then? PointerToFunction('Hallo')...??? } function PassedFunction(TextToShow) { alert(TextToShow); }
I'm trying to make selected text appear / disappear depending on what the user clicks on. It works perfectly (as far as i can tell) in firefox, but in IE i get "Could not get the display property. Invalid argument". the strange thing is, it will make things disappear, but not show. I'm trying to change the display from 'none' to 'table-row' because that's the only thing that would display properly in firefox. here is the applicable [code]...
i have found an engine that i would like to edit, in the following javascript code, it will contain code on moving a player to the left, what i want is for every 32px it moves the player left, i want it to also to scroll the map at the same time (it's all contained in a div called "global_map") -
function player_move_left(user_id, bloc_id, charaset, prefix) { var player_id = prefix + user_id;[code]....
how to scroll 2 things at the same time (the player div and the global_map div)
I'm developing a website utilizing Jquery Drop Shadow and thickbox and other things. I just implemented the thickbox and thought that maybe the slow response was my system (I've had photoshop, 12+ browser windows up, etc). I realize that may not be the case and I suspect jquery's drop shadow is a hog. I don't want to go through the entire code and implement a different shadow method at this point. Instead I'm wondering if anyone can verify this issue
[URL]... Click on the "Film Reel" and it may be especially slow to load. If you suspect it is my use of the Jquery Drop Shadow, can you recommend ways I could optimize it? One idea I have is to toggle it off and on when thickbox is opened and closed. However I don't know how to do that yet.
How can I make something in jQuery slideDown without pushing things under it down? To take it out of the flow so it just overlays a slidedown like a typical dropdown menu? Can slideDown be used for that?