Transferring Value From 1 Select To Another....but Not Shwoing In Source?
Apr 7, 2010
Here's the function I am using to change the value of one select to another....
PHP Code:
function transferItem(srcId, destId) {var destObj = document.getElementById(destId);var srcObj = document.getElementById(srcId);for(var i=0; i<srcObj.length; i++)if
[code]....
View 4 Replies
ADVERTISEMENT
Jun 5, 2009
I have a multiple select box and want to be able to select from this box and transfer the selection accross to a div using an "Add" button. I have this working fine but I want to append to the list, rather than replace the list when further selections are made.
I somehow need the function to remember the original selected array and then merge the new selected array and the old array if another sleection is made. This is all I have so far...
function editOptions(action)
{
var optionsBox = document.getElementById('optionsBox');
var selectedArray = new Array();
[Code]....
View 7 Replies
View Related
Jul 23, 2005
When I put the following code on a page the image on the page changes
when I mouse over the links. Now I was thinking I could instead create
a popup menu to change the image on the page, see second code sample.
But it doesn't work. What am I doing wrong? Or is this just not
possible? What am I missing? Code:
View 5 Replies
View Related
Jul 26, 2006
let me say up front that my experience with JavaScript and "Ajax"
interactions has been horrific. There are weeks I will never get back
because of it. Whenever I encounter something so horrific that it
makes me blank my memories of the event, I find myself going back and
trying to take different approaches to understanding what happens.
This current round of experiments involves sending and receiving what
is effectively an associative array. That is, I want to send dom names
and the associated values via XMLHttpRequest calls and on return, get a
set of dom value pairs and push them back into the current environment
in the browser.
what I need to figure out how to do is associate a series of DOM's with
a button, extract the information when the button is pressed, and then
present the entire array to a CGI. On return, I would need to take the
same array from the CGI and transfer the contents into the specified
DOM's
if this is not practical, tell me so and I go do something else which
is probably more fun. If it is practical and has been implemented in
some toolkit, fantastic. It saves me some pain. If it hasn't been
implemented, well, there goes the more hours that I will never get
back.
View 7 Replies
View Related
Jul 20, 2005
i got this javascript-function that changes the entries of a selectbo
depending from the selection of another selectbox:
function changeBezug(selectedEntry, '$exhibits', .....) {}
the string '$exhibits' holds all the entries for the option Entry i
the first selectbox;
Unfortunately i get javascript error unterminated string literal an
the error pointer points at the first apostroph:
function changeBezug(selectedEntry, '
I tried replacing all special chars in $exhibits, even putting th
string directly into the function code with php and tried using quote
instead..
Now im out of ideas!
Maybe im using the wrong replacement for the apostroph...
i use ' is that wrong? i also tried ' to no good either..
what's the right one?
View 3 Replies
View Related
Mar 18, 2009
I have 2 fields for phone number.one is of size 3 and another is 7.After reaching maximum size for first field it automatically focus next field.I coded it as
<input type="text" name="phone1" id="phone1" size="3" maxlength="3" class="resultable_text" onfocus = "setFlagForTextFieldFocus();" onkeyPress="KeyPress(this,event,3,'document.openaccount.phone2.focus();"/>
[code].....
View 3 Replies
View Related
Apr 1, 2010
I went to the PHP section of this site and posted this same question, but someone told me it's a javascript question. I'm trying to carry a string from one webpage to another. The user inputs some data on page 1, the info gets tested for certain elements, then gets sent to page 2. The problem is the strings aren't transferring and I don't know how to use sessions to transfer them. I need recipeNameEl, ingredientsEl, and descriptionsEl to be stored to a string and then transferred to the page the form's action="" attribute points to.
<script>
function checkFields() {
var recipeNameEl = document.getElementById( 'recipeName' );
[code]....
View 2 Replies
View Related
Feb 23, 2011
I got some code that loads divs from other web pages into a particular div in my main page. In other words, I click on a button, and this tells jquery to load afragment of a particular page into my main page. For instance if I have 5 web pages onrock stars, I could have 5 buttons, and each button could load one rockstar's biography into a div on the main page (and replace whatever was there before). This works, and I do see the content that it loaded. But when I do 'view source' in IE, I do not see that content (the bio of the rock star). Another clue that this content is not really there, is when I try and run some code on that content. The content (from those external pages) have divs with specific names, and I try and make them into collapsible panels by running the following short function:
var IdentifyPanels = function() {
$("DIV.ContainerPanel > DIV.collapsePanelHeader > DIV.ArrowExpand").toggle(
function() {
[code]....
View 2 Replies
View Related
Aug 30, 2010
i don't know so much about jquery so just i use them with indication from their web site. so my problem is how can i use multiple source of jquery without one source stop the other,and that what i need:
[Code]....
View 2 Replies
View Related
Jul 11, 2009
recently i noticed that all of my embedded JavaScript code and external style sheets are being shown IN "view source."
this happens in all browsers ( IE, FF, Chrome, and Safari [windows]) ... oddly enough it only happens when viewing on my vista or win2k3 machines. is this something added to these OS's or the result of an installed program? has anyone seen this before?
View 9 Replies
View Related
Nov 23, 2009
I have a website that I frequently visit (FWIW, Firefox 3.x is my browser of choice) with many image sources referring to URLs that end with "-thumbnail.jpg". However, for better image quality, I am trying to use Greasemonkey to replace all instances of "-thumbnail.jpg" in the source of images on this site with "-bigthumbnail.jpg". The closest I could think of was to somehow use getElementsByTagName and innerHTML.replace, but realized that innerHTML does not do HTML, only content.
Below is as far as I tried to get on my own,
var as,ae;
as = document.getElementsByTagName("img");
for (var i = 0; i < as.length; i++) {
ae = as[i];
ae.innerHTML = ae.innerHTML.replace(/-thumbnail/gi, "-bigthumbnail");
}
})();
View 2 Replies
View Related
Jun 16, 2011
I've seen a variety of implementations around that enable selecting all or no checkboxes by using a checkbox to toggle that choice. However, I'm trying to find a way like this: I have two text links on my page: Select All, and Select None. How can I get those links to call a jquery function to select all or select no checkboxes in my form? As a little food for thought:
<head>
$(function() {
//function for selecting all or none...is there a way to make a single function that passes in a parameter to differentiate between selecting all or selecting none, or do I need a separate function for both?[code]....
View 2 Replies
View Related
Jul 23, 2005
Is there any way by which I can display the source of a html page
using the 'view:source' command, in an iframe??
I tried using this
viewer.location = "view-source:" + viewer.location.href;
where viewer is an iframe.
but it opens the source in a notepad.
Instead of the source getting displayed in the notepad, I would like
the iframe to display the source.
View 6 Replies
View Related
May 25, 2010
If there is any method by which i can get the source code of a webpage in a program by using the URL. what i want to do is that am developing a javascript webpage which requires some info to be taken out of a certain webpage, and in the url of that webpage i can enter the query, so i wanted to know if there was any method to get the source of the webpage and store it in a varabile so i can scan it for the required info.
View 9 Replies
View Related
Aug 28, 2011
I would like to ask if there is anyway to get a variable from any webpage source using javascript.Something like javascript: document.getelement?
View 2 Replies
View Related
Jan 29, 2009
i am doing project where i need to convert recorded voice to text format means that i can convert mp3 or wav to text
View 1 Replies
View Related
Aug 30, 2005
how can i change the text into the location bar without reload or go to this new url?
View 2 Replies
View Related
Jul 23, 2005
Is it possible on Mozilla based browsers and IE based browsers to get
the complete source for the current page that is opened?
document.body.innerHTML does well but only gets what's within the
page's BODY tag. document.body.outerHTML doesn't work with Mozilla.
Is there such a thing as document.src.value or something simple like
that?
View 2 Replies
View Related
Jul 23, 2005
It's possible to protect the source code of a js file? With PHP?
View 15 Replies
View Related
Feb 20, 2006
I have been trying to achieve this since yesterday night and am not
able to figure out any solution as yet.
There's an XML page with RDF information inside. I want to simply get
the source of this page and save it in a file.(basically i want to do a
'save as' without prompting the user.
I'll use the FSO for putting it into the file but to get the source of
the page in a variable :
I think document.body or document.html do not work in Firefox. Also
document.documentElement.getElementByTagName('xml' )[0].innerHTML is of
no good.
View 3 Replies
View Related
Mar 22, 2006
I've a problem: I need to retrieve (in javascript) the soure HTML code
from a url without loading the page then put the HTML source code in a
string variable to manipulate it. From this variable I need to get all
the links to perform some operations.
View 4 Replies
View Related
May 2, 2006
ok, I am just learning this stuff, small stupid question here...I am
trying to swap images in a little ajax application, and the code
handling that looks like...
document.placeholder.src =xmlHttp.responseText
/
no big deal i know, if i print xmlHttp.responseText to the screen the
link is correct, but anytime I assign it as a src, i get the link+(all
the page html attached on the end) and i dont know why?
View 8 Replies
View Related
Oct 14, 2006
I notice when I view the source of a lot of Google pages (for example,
my GMail Inbox page source) that the src option in <scripttags will
refer to addresses like "?foo=bar&bla=bla". How does this work
exactly? Does the server side script return a string containing
javascript code? How does it know which server side script to call?
Does it look for an index file of some type?
Something else I just noticed in the address of this page (I know this
is off topic, sorry)... this page sends GET data to a "place" named
'post', but 'post' has no file extension. How does this work?
View 1 Replies
View Related
Apr 17, 2007
Is it possible to read the address of a page from another domain fully
loaded in an iframe, because when i call the page i ask to a cgi
script which returns an encoded url with a unic hashmac key i must
catch to create a temporary account with this key.
I tried many things but all what i got is the address i sent first.
View 1 Replies
View Related
Jul 20, 2005
function foo () {
var xyz = 123;
function bar () {
var abc = 456;
}
}
I can alert (foo) to see the function source
Is there an alert (<something>) that will show me only the source of
function bar inside function foo ?
View 5 Replies
View Related
Dec 19, 2011
I am using this widget from Twitter on my WordPress platform, to display the list in my sidebar [URL]. As you can see, I have this small twitter icon at the bottom and if I set up a white background for the container, that background image won't be too visible so I have to change with jQuery.
I've tried like that but doesn't work for me:
<script type="text/javascript">
$(document).ready(function() {
jQuery(".twtr-ft div a img").attr("src", "http://www.my-url.com");
});
</script>
View 4 Replies
View Related