I have a website with five links, each with its own id. onClick I would like to create a cookie for the user that adds the link id that they have clicked.I am planning to do this using an array, however, I am a bit confused about the theroy behind a cookie.It is just a text file that can hold any data correct? So I could store an array with
array = hi.html array = hello.html
and later on pull up what is in array to diplay it on the page? Can I do this with one cookie or would I need a new cookie for each link?
i have a dropdown list where a user can select, 'Yes','No', and 'Other'. What i need to have happen, is that if a user selects other, i need a textfield to appear so the user can enter a custom variable. does anyone have code for this?? Code:
I have this website that logs users clicks and their referrals clicks. I have graphs for each of these things. I currently have it working that when a user clicks a link on a page, it opens up another page and shows the graph. I want this to be sort of like a "drop down" window when they click. Here is a picture of when the link is not clicked: And when the blue circle (the thing boxed in red) is clicked:
I'm trying to open a div that holds several images when the user clicks on a link. Each clicked link will open the div and display a specific pic. Plus each time a link is clicked the div should close before opening the div with the appropriate pic. Since I'm new to jquery I'm a bit lost on this one.
I have a drop down box (select) in my website: [URL] that works fine; but the problems is if the user click on a wrong option, it will show a box and if the user click on another option from the box, the last one will be on display and won't go off..
Like this select something and then at the same box change the selection you will see the code will build up boxes on the screen.. How I do for it not happens if the user change the option in the last box, the one before disappears!
When a user in somewhere of a site, he/she may want to login to access some user restrict pages. He/she clicks a login link on the menu and sign in on the login page. How to use JQuery to let the user back to the page where he/she clicks the login link?
To put things short, I just started with Ajax and was abel to update categories without reloading whole page. I even was abel to add the new categori to the drop down menu of categories. The problem comes when I try useing the new option.Now to expand on this. I have something like.
Code: var optn = document.createElement("OPTION"); optn.text = document.categoryForm.category.value;
I am trying to make a form where the user is only able to select an option from one of the drop down menus and if they click both then submit an error should pop up telling them to select just one. Now I have found this code:
the first problem is that my menu must be named "id2" which causes a problem due to the bracketed 2 and the 2 after. Is there any way around that?the second problem I forsee is that this will only work with 1 drop down box being unselected. I need a code that will give the warning if nothing is selected OR if something is selected in both drop downs.
I am trying to pop-up a window when the user clicks on an image. The problem is that when the user clicks on the image and the window pops up OK, but the window underneath also proceeds to the image. The desired behavior is that when the pop-up is invoked, I want the underlying window to stay put. Code:
I am trying to get a way by which I'll know exactly when user goes out of my site by clicking on close button in browser, So that w/e user click close button in browser, I can send a signal to server.
This seems to be achievable with body unload events, but it is little too much, as even if user navigate within my site, this event will be generated, this can be avoided by handling onclick of each link, so that I'll know exactly which link is clicked, but honestly this looks over doing to me, any other smart short cut for finding out when user click on X in browser?
I want to execute a script when the user clicks the button. Currently in my html doc. i have the button declared. <input type="button" id ="button" onclick='notEmpty() value="Play"/> When the button is clicked, i execute the notEmpty() function and I want to execute a script inside the notEmpty().
I need to learn how to clear form fields when a user clicks on them. Here is the site in question: [URL] They used to work, but then I changed the field value and now it doesn't work on some of the fields (whichever ones I changed). Here is a link to the .js file:[URL]
I made a drop-down list that is opened when a user clicks on a button. If the user selects an item, the drop-down is rebuilt so the list is closed. If the user clicks on the button again, the drop-down closes using .toggle() on the button click event, and these two scenarios work great.However, I also need the drop-down to close when the user clicks anywhere outside of the drop-down. This seems simple, but I've been having a really difficult time figuring this out. I tried .focusout(), but this makes the events I have tied to selecting an item not fire at all. I also found this little bit of code from a drop-down plugin that should work perfectly, but it fires when the user clicks on the button, so the drop-down never opens: