I am working on a website that uses a random header. I have been trying to figure out how to adjust the code so that the header also serves as a clickable link.
Here is the code that I have:
What do I need to add in order for the header to also serve as a link? I am completely new to JavaScript and I don't understand it very well.
Quick question regarding basic cookies. I have a button that runs a function that creates a cookie onclick;document.cookie = ("cookie1=500");whenever i display this later, despite the fact i've clicked the button 3 times. It only displays once. Is there a way I could display this AS MANY TIMES as the button was clicked.
<script type="text/javascript"> var cookies = document.cookie; var cookie_name = new Array();
Well it seems that i have a textbox and a textarea under it. Both sizes are 20 but they don't seem identical. Is there a way to make them identical vertically?
I have groups of elements that are scattered around my page but have identical id's so that I can reference them all at once (as a group).These elements are sitting inside of an iFrame, that is sitting inside another iFrame (that is building a nested navigation bar).So what I want to do is have a script sitting in the top document that when a button is pressed it will reference those double-nested identical id's and toggle their display.and this is what I have so far...(while testing, I do not have any identical id's)
I want to check whether all the values in an array are identical using javascript.Does javascript support this?If so please provide me the js statement.I know it can be done with conditional statements but I want to know the efficient way to implement this.
1) I have one hundred identical links on my page 2) I have a function that changes a clicked link to "display: none" (using the toggle functioon)
Is it possible for me to set it up so that only the link that is clicked (that is, only one element) gets affected? I don't want to click and have all the links disappear.. just the one that was clicked.Would this code below work in all browsers? [code] And secondly, may I ask whats the difference between $("a") and $('a'). I've seen people use single quotation makrs and double. Which is better ??
Isnt it following two script is identical? but they seems to contradict in different browser.
--following works in IE9 but not chrome <script type="text/javascript"> var el=document.getElementById('myLink'); window.onload = function(){ el.trigger('click'); }; el.click(function(e) { e.preventDefault(); });
I need to declare a variable (astString) and initialise it with a string of asterisks. astString needs to be the same length as another variable (otherString). otherString changes it value regularly so I think I need to use the .length property in some way but I can't see how
trying to fix this code up to display the following line at the end:The maximum distance was 6km run on Tue and Fri (the word 'and' not required)So far I have got it to only describe Tue and it stops before it gets to Fri and i have no idea how to get it to write it out in any case.The code also has to work if you comment the lines 22 and 23 where it should display the line The maximum distance was 5km run on Frisorry for simplistic code im very new to javascript!
I'm trying to make a form where a user can check boxes, and depending on if certain boxes have been checked, other boxes will grey out or un-grey.
What the code does is look at the checkbox name and depending on the family (f), and whether or not the box is a child (c) or a parent (p), the code will grey out certain boxes.
Now that I've sat back and thought about the code, I think there is probably a better way to achieve what I want. Maybe I can specify checkbox names instead of doing the parent child hierarchy that i'm trying. Code:
On my site, I have some click-able spans (will be referred to as toggle spans) that show or hide other spans (that contain the content I want on my site; will be referred to as content spans). The layout of these spans is like this:
when I load a new page with location.href, ie doesn't set the http referer header while firefox&mozilla does...
I tried the click() method on a hidden link, this times it works on ie, but firefox says that click is not a function
[... <a id="ref" href.......>...</a> .... document.getElementById("ref").click(); ....] Is there any method which I can set this header manualy or make ie set it properly? Or any other idea?
I have a situation where I'm currently using Basic authentication (the server issues a 401, the client pops up its window, etc., etc.).
Instead of having the server send out a 401, I would like to send out my own page that would create the proper header field for all subsequent requests from that client. Can such be done with JS? Can someone point me to an example?
I do not need encoding. This is on an intranet and the authentication is being used mainly to return different information to different users as opposed to trying to keep out the "bad guys".
Is there a way to set the value of HTTP header Referrer to null or to any specified value?? I have tried doing this
document.Referrer= null
but document.Referrer is a read only property therefore the value can't be changed and a Javascript error is occuring. Any ideas on how this can be achieved.
I have 6 headers that are animated gifs. They transition, 3 of them left to right, the other 3 right to left.I would like to have them to change to next header in sequence no matter which page on my site they click.I'm not sure this can be done, but think javascript is my best bet. Can anyone point me in the right direction?
I am trying to implement the "Freeze pane" feature in javascript as it is in excel. I am almost there but am not able to get one last thing. The row header freezing is achieved first column freezing is also achieved. However, the top left column cell (which is supposed to stay frozed during both horizontal and vertical scroll) is not frozen.
I'm writing a web server and an Ajax-y web UI for an embedded system. My server is just plain dumb and quite resource constrained and right now I have code in the server to skip over all the POST header fields. I'd rather not use bandwidth to send them and CPU to skip them. Can I minimize my request header? I was looking to do something like:
req = new xHttpRequest(); for (f in req.header) { if (f != "Content-Type:') { req.header[f] = null; }}
But I haven't found a reliable way to get the header fields. Maybe I haven't looked hard enough. Pointers...?