I have a selection list in my form. I also have an iframe in this
document.
I am trying to access the selection list from my iframe as given
below. It works in Firefox but not in IE.
var aaa = "navigator";
var bbb = aaa.appName;
var selopt = "";
if(bbb == "Microsoft Internet Explorer")
{
selopt = parent.document.getElementById("select1"); - - - - -
here i am able to get the object
}
else
{
selopt = parent.document.getElementsByName('select1')[0];
}
IE :
var val = selopt.options[0].value; - - - - - - -here i am not getting
the value.
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?
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?
The iframe has a bunch of <span> elements in it. I need to access the innerHTML of the spans, to check for data and use the data elsewhere. Each span has an unique ID assigned to it. What would be the syntax to read this information? I've tried all sorts of document.frames["search_frame"].getElementById("ID").innerHTML variations to no avail.
But depending on the users settings there could be 3 or 30...each div has a button. On press 1 it opens that div(by opens I mean populates with some data. When you press another button on another div, I want it to check the page and close any other div that may be open so you can only have one open at once.I'm familiar with loops and arrays but I'm not quite sure if this is totally possible. I'm not looking for the code, per-se, just a push in the right direction
I have a page that creates one unordered list from the contents of another list. The second list is created from a database query and is hidden on the page. I have written a JQuery function shown below that does an AJAX call which causes the hidden list to be created and that is working perfectly. The problem is that when the code following the AJAX call is executed it doesn't see the hidden list. The alert message displays 0 the first time. clicking on the Load button a second time results in the first list being displayed. If I click on the Load button a third time, the previously loaded list is displayed; click on a fourth time and the new list is displayed.
In other words, it takes two cycles to display the correct list. I am at a loss as to what might be the problem. Other than this issue the code does what I need it to do.
how do i pass the values of listbox[] to javascript?
below is my javascript:
function Add() { Obj=(document.getElementById("scopeid[]")); alert(Obj.value); }
alert gives me only the last selected value and not the entire values. i.e if the user has selected 2 ,3 and 4th option, it gives me value of only 4th item instead of all three. how to do it?
I'm trying to pupulate a web page with javascript. I have 2 functions. One that runs on-load so I can populate a dropdown list. The second one to process the selection when the user selects an item from the list. I have a global variable in the top of my javascript that I use in the functions and as long as I set it in it's global scope, everything works fine. But what I really want to do is to pass this into the javascript running on this page via [URL]
I cannot get this to work. First here is what I have that works: <script type="text/javascript"> weekNumber = "00" function processSelection(sel) {..... ... [includes references to weekNumber] .....}
I've got the code to gets the variable passed in properly: var sGet = document.location.search; sGet = sGet.substring(1); // Eliminate the leading "?" var sGetPairs = sGet.split("&") //Get 1st pair var sGetValue = sGetPairs[0].split("="); //Split it var weekNumber= sGetValue[1]; //Save it
Where do I put this code so that I can use it to set the global variable "weekNumber"? I've tried putting this code in the populateList function. I've tried referencing it via window.weekNumber and this.weekNumber. I've spent far too many hours trying to understand this without success. Where to put this code so I can set the global variable weekNumber?
I am relatively new to javascript and am working on a script where I want to utilizes a couple of iframes and format text in them. I have run into a problem with getting the following code to work in mozilla. It seems to work in ie.
Eventually I will be replacing the H1 node with a table until I can get the H1 node to show up in mozilla there is not much point.
I have tested using both a javascript created iframe and one built in the html file. In both cases the iframes have an id of something_ifr...
I have a page that displays a list of people playing in a tournament. I need to be able to generate a Leaderboard based on which players are manually selected by the admin. Next to each person there is a drop-down list. An admin can go in and select a "slot" that a player should be in on the leader board from 1 to 8, or leave it blank if none. What I need to figure out how to do is the following, when a change event happens on a drop-down list, and say the value 5 is selected, I need to check to make sure that 5 is not already selected in one of the other players drop-down lists, in other words, that the 5th leaderboard slot is not already full. if it is, display an error message and make them change that one first. how to do that with jQuery? I'm thinking it will have something to do with the each() function, but not sure exactly how the logic should work.
I am trying to write a Greasemonkey script using jQuery to automate various processes on a web site. One of them involves automatically filling in a form located in a dynamically generated iframe. When the frame is generated I can do $('#NewFrame').length and get 1 confirming it is now available. However, when I do $('#NewFrame #TheForm').length I always get 0 even though I can clearly see the form there in the iframe.
<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font:inherit;">Is this possible? Been trying but doesn't seem to work...</td></tr></table>
I have a web page A that loads another page B using an iframe (or anobject tag), the B page is an external page (it's not on my server)and contains a form.I want to be able to auto fill the form with pre-defined values. Injquery i think it's impossible due to security reasons,I hope I explained the problem correctly, if you need more info just
i can't sucessfully get the values out of the <select> and <option> elements in my HTML page. This is really annoying because i am using the same code as i always use. And infact, it is identical to the code in a previous project (a Product Quote Calculator). It should work, but for some reason it doesn't. The Error Console is telling me that that element's value is "null". However, i have used the DOM Inspector, and it is not a null value (as the Value="3" is set - the DOM inspector also verifies this). There is another problem, but i'll leave that for another posting *grin*. I'll still be working on that one until someone gets back to me on this problem. Anyways...here's the code:
the code is actually a bit long, so i added it as an attachment. maybe it will fit into a post window.
<html> <title>Sketch Book v1.0</title> <head> <script Language="JavaScript"> var SketchDataFolder = "c:data.txt";
I have a MySQL table with 90 columns and I want the users to be able to select any columns they concern and output the result accordingly. In the front-end, I can use a group of checkbox which looks very ugly and I can not setup the orders for selected columns. Is there a plug-in or some examples in jQuery, that I can make 2 parallel boxes (i.e. an original-box and a selected-box). the original- box lists all of the column names at the beginning and there is a way to move items between two boxes. And the order of items in the selected-box can be adjusted. the items in the selected-box will be used to build into an array in my backend code.
I have two Select Boxes on my web page, 2nd being populated based on selection of first select box. Now I am suppose to get the selected value of 2nd Select and put it in a link i.e. Code: <a href='abc.html?id=<2nd select box value>
I can get the selected value using Javascript with the following code: Code: 2ndid = form.2ndodf.options[form.2ndodf.options.selectedIndex].value; Where 2ndid is a global javascript variable. How I can use this variable into <a href> tag.
I've been beating my head against a wall for a few days trying to get this working. I'm trying to create a dynamic menu where a user selects one item and another select list is shown, then another and another (and so on). Here is my JS, it *should* be taking the ID of the div, comparing it to the selected value and then showing another div by settings it's class property to visible:
When a user changes the select list called "reason_code_master" I need the uodatecodes() function to update all the other select list with the id of "reason_codes" with the same . How can I do this.
iam trying to use 5 drop downs in my form for user to select languages and each select drop down should not allow the user to select the same language again and all my drop downs are populating individually from the DB on the page so if "English" is selected for "dropdown 1" then again "drop down 2" should not allow "English" to be selected.
I know that normally you can get the selected value of a select list by using :selected. But in my scenerio I have a number of rows in my table that are added dynamically and the inputs all have prefixes through which I select them. But once I select them I'm not quite sure how to get to the values of the select list. Here's what I have already and I get undefined for the list value.[code]...
If I instead do this I get the correct value but it's not specifying the list to get the value from so I'm afraid that if I have more than 1 select list it might get the value from the wrong list.[code]...