Is there a way in Javascript to access a field with [] in it for example
destList[]. I need to have this since the field is a listbox and it contains multiple options. it gets posted to the server and handled by PHP. in order to have all the options submitted to the server the name of the field needs to have a [] on the end of it.
I call a javascript function in my page load that accesses an iframe and I get an error. But if I wait till the page completely loads and access the iframe through a click event everything works fine.
I'm trying to set some of the iframe's properties on page load. Can I do this?
Is it possible to take an ASP textbox that has an attribute of visible='hidden' and make it visible from javascript? I dont want it to be visible until data on the page has been entered and thus need a way to dynamically change its visibility?
I'm loading an XML document and grabbing a node with content in it including html. I can't figure out how to grab the src of the first IMG tag that appears in this text string
all on the same page that are accessed by the classic show/hide DIV functionality.
So user clicks button 2, which shows story 2, hide stories 1 and 3. (all on the same page).
The issue is that I've been asked to provide a method to directly link to story 2 or 3, which currently isn't possible since you need to load the page, then click the button to show story 2 or 3 (naturally 1 loads by default).
So I'm looking for any method to go right to story 2/3 from a link.
Perhaps I can pass a variable through the URL which executes the function as soon as the new page loads (which would mean a quick double page load but I could handle that)
Here's the function: var showMe = function(me) { document.getElementById(me)["style"]["display"] = "block"; }, hideMe = function(me) { document.getElementById(me)["style"]["display"] = "none";
</html> It didn't work. I also tried both of these: document.getElementsByTagName('body').setAttribute('bgcolor', '#000'); document.getElementByTagName('body').item(0).setAttribute('bgcolor', '#000');
I'm trying to access a div within another div, but get an error stating that the firstChild object of the div is not an object. The code I am using is as follows:
I'm not an ace JSer by any means--the problem I'm about to pose could easily be solved with pointers in C++ (the language with which I am most familiar), unfortunately that is not an option.I am making a webapp using the google visualization API:URL...My problem may be related to the API, but I think it's more Javascript oriented--the Google group for the API is helpful,I have a function, drawDash(), which declares some elements of the visualization, some filters for the visualization, then binds them together and draws them. Now what I need to do is access the elements of one of those vars, specifically a filter, and add/change properties of it with an HTML form.
I've set up an onclick function for a set of checkboxes in my form that calls another function. The problem I face is that I can't really access the filter correctly.[code]So basically, I want to have a function be able to edit the var serviceSearch from another function.
I have a page with a link and a DIV with visibility=hidden. The target of the link is to a hidden IFRAME. The link executes a script in the hidden IFRAME. When the user clicks the link, I change the DIV's visibility to visible. Depending on a condition in the script executing in the hidden IFRAME, I want to change the DIV's visibility back to hidden. How would I do this?
document.parentWindow.all("DIV").style.visibility = "hidden" but it didn't work.
This is probably a ridiculously simple task, but I am new to Javascript, so here goes. Is it possible to get the 'id' (and other attributes) of a 'div' area after I have clicked into it?
I'm trying to develop a google maps a site with two frames.In frame one i have a line of code as follows:var myPano = newGStreetviewPanorama(document.getElementById("pano"));The problem is that "pano" is the id of a div in frame 2, so I'm wondering how to access it.
I have a situation where I'd like to read/parse the content of a file I've read into an <IFRAME>. I've looked through various FAQs and searched forums, and the closest I get to accessing the file content is
myIframe.contentWindow.document.body.innerHTML
where myIframe is the node from getElementById(). But while I can see the content of the file on my web page, I get an empty string from the above reference. How do I get to the file?
Firstly, I am aware of all the issues that are introduced with frame pages - this was not my decision - it is just what I have to work with...
I have a frame page that looks like this ------------------- | topFrame | ------------------- | navFrame | ------------------- | ContentsFrame | |------------------
Within the contents frame I have a NEW FRAME set which looks like this -------------------- | | | |treeFrm | frmDisp | | | | --------------------
I know that this is awful. I have a link in the contentsFrame. When I move over that link, I need to get a layer that already exists in the frmDisplay to become visible..
I have this problem in xsl wherein i want to access a variable in javascript and use it my xsl. How would i access or use a javscript variable in my xsl file?
IOW, why are there 0 elements named div at the time the <body> element's onload handler is invoked? When can I retrieve this named div from the document hierarchy?
This exercise is necessary since code I have written using the DOM (that works) has to run on God-forsaken browsers such as IE 5.1 for Mac whose support for the DOM is spotty at best.
I have a javascript function that needs to access methods of a java object(localTag). In my JSP I'm trying to include hidden fields for the Strings returned from the getter method calls of the object like so:
If I can do something like this, what is the correct syntax and how do I access this property in my javascript? When I have a hidden field that is just a String, I access it in the javascript like "document.getElementById("theString").value" and it works fine, but I can't seem to find how to access the String value of a method call.
I have seen web pages sites, when you drop down a list box, it seems to go back to the server to retrieve some data without reloading the whole page (e.g. select make of car and it retrieves a list of models from the server to populate another list box).
I'm having an issue with CSS, JS and the DOM. It's gonna drive me batty. I am trying to access the properties of a layer in JS which have been initially set in an external CSS. The problem is that for some reason JS isn't receiving NULL for all the properties of the layer. For instance:
HTML <div id="blarg">.....</div>
JS var t = document.getElementById("blarg").style.left;
CSS #blarg{ position: absolute; left: 200px; }
t == NULL and I can't figure out why. It is this way for any CSS attribute I attempt to read (width, positional, the whole kit and caboodle).
It does work if I set the attribute in JS before I read it.
JS document.getElementById("blarg").style.left = 30; var t = document.getElementById("blarg").style.left;
t now == 30. The only thing I can think of to explain this is that when the document gets loaded my layers aren't getting their attributes filled out. The object gets created and the attribute fields are blank until I fill them in. Thusly my creation of CSS's was a waste of time. Grr...
Any ideas/suggestions? Google has been of no help. :-( This is occurring in IE 6, and the gecko engine browsers.
I have implemented a jquery tab, which displays a form with some fields into it. I want to access those field values through javascript that are displayed in the tab.
I've been writing a script using the Flickr API. Basically it takes photos from a certain set and user and puts those in the fancybox format. The problem I have now is that whenever I want the set to change, I have the edit the javascript,. Instead I want to be able to change this in the html where it's being called.
Currently I have one issue where i have defined my four input tags inside a div.Now the issue is arising that i need to separate them each using the table tag or either the nested div tag to make their width..currently my show is like this