The issue I have is that I'm trying to use document.write to get 2 different bits of information from 2 different scripts, but the function names happen to be the same. Because they are information from different sites I have no control over, I can't alter the function names. Is there any work around for this? Maybe it's so simple that can't see past my own face!!!!! My knowledge is a bit limited using CSS and JS together.
I have just started learning JQuery and have a doubt in the below code. $.get('myhtmlpage.html', myCallBack);The doubt is should the 1st parameter of the get function be a HTML file or can it be a unction name?
Captions for the images are called from the parameters of the main function and delivered into a span or div tag with the appropriate id. A very important part of what needs to be in the captions is text compiled by a separate function, in the project library.I've tried this with and without curly, square and round brackets, with and without semicolons and quotes- all with varying results. Sometimes the function is called, but it appears at the very top of the page and nowhere near the proper <span> tag.
addImage(a,b,c,d); // filename, image name and caption are in a, b and c. // d is the variable where I need to write my other function... addRef(t,s); // I need to put addRef in the d parameter of addImage.
Is their a way of iterating thru each tag within a form and returning the value given in the id property, by that I mean the below html would return the values idBoxOne, idBoxTwo, idBoxThree from the FormXX form.
I'm sure I'm missing something basic, but I can't seem to find what I'm looking for. If I have an xml doc where the parent node and child nodes contain elements with the same name ("name" in this case), how would I go about just getting the client's name? Here is a slimmed down version of the structure:
for my gallery I am using the fallowing HTML. The Images are defined as '1.jpg', '2.jpg', '3.jpg' etc.I would like to change it to 'text.jpg'. However, when I change the image names, thumbnail names and the HTML, I only have a loading screen. So there seems to be a part of the JS which needs to be changed. Any idea how to do that?
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http:www.w3.org/1999/xhtml">
I am trying to adapt a script for use validating a drop-down menu in a form.
The script works fine in my lttle demo. In the head of the page I've got...
HTML Code: <form action="demo.php" method="post" name="testForm" id="testForm" onSubmit="return checkList();"> <p> demo select menu <select name="demoSelect" id="demoSelect"> <option value="" selected>Please Select</option> <option value="1">Attrib1</option> <option value="2">Attrib2</option> <option value="3">Attrib3</option> </select> </p> <p>Submit <input type="submit" name="Submit" value="Submit"> </p> </form> No problem, works fine. The problem is that I am trying to apply this code to a PHP page in osCommerce where the name of the drop-down menu (i.e. demoSelect) is generated dynamically. It is only for use in one particular situation where I know the name of the drop-down menu is generated as id but it wont work when I replace the demoSelect for id.
I have a table that I populate with an array using ASP. As each row is created, the form object names are appended a numeric, such as:
i = 1 <select name="select<%=i%>"> ... ... ... i = i+1 next
var ps = 'platSymbol' + I; alert(ps) var sel = 'document.frmUpdPlatGrp.' + ps + '.value' alert(sel)
I know I'm wrong, as this comes back as a complete string. Ultimately I want to have something like this:
var s = document.frmUpdPlatGrp.platSymbol2.value - so that I can actually get the value.
In attempting to modify a script of a menu, that I wanted to add the ability to have sub menus, I first wanted to find out if an ordered list element, contained a secondary unordered list and what their names are so I could out put the items to the console.