search for: setattribut

Displaying 20 results from an estimated 104 matches for "setattribut".

Did you mean: setattribute
2006 Jun 03
12
How to get dynamically created inputs from html form back to rails app
...code that inserts the new row into the table in the browser context (not the backing RDBMS): function insertAnswer () { table = document.getElementById ("answersTable"); body = document.getElementById ("answersBody"); row = document.createElement("tr"); row.setAttribute("id",""); // need to build a Ruby friendly naming scheme for // elements so they can be passed as parameters data = document.createElement("td"); row.appendChild(data); data = document.createElement("td"); row.appendChild(data); data = documen...
2006 Jan 11
2
extending the Element.prototype to provide a setAttributes function
Hi folks, I''m pretty new to javascript and prototype, so I just want to get some peer-review on a function I wrote that makes a handy (at least, it seems handy) way to set a group of attributes on an element easily. Object.extend(Element.prototype, { setAttributes: function(attrs) { var el = this; $H(attrs).each( function(attr) { el.setAttribute(attr[0], attr[1]); }); } }); You pass it a hash of attr => value pairs, like so: $(''testing'').setAttributes( { test1: "test 1 value", test2: "test 2 valu...
2010 Apr 07
1
[PATCH] Connection: Handle case of cdrom with no <source> element
...>toString()); + $dom->toString()); - # If the disk is a floppy or a cdrom, blank its source - my $device = $disk->getAttribute('device'); - if ($device eq 'floppy' || $device eq 'cdrom') { - $source_e->setAttribute($source->getName(), ''); - } + my $path = $source->getValue(); + + # Die if transfer required and no output target + die (user_message(__"No output target was specified")) + unless (defined($target)); + + # Fetch the remote stor...
2005 Aug 09
7
trunk restructuring, new util.js
Hi all, The latetest trunk revision 1983 features are more streamlined directory layout and a new util.js file, that acts as a collector for stuff that doesn''t fit in elsewhere. To get a grip at the new Builder functionality look at the test in test/unit/builder_test.html (works only with Firefox). Note the "klass" instead of "class", this circumvents a
2007 Apr 04
2
Simple RJS Calls Not Working
...(confirm(''Are you sure?'')) { var f = document.createElement(''form''); f.style.display = ''none''; this.parentNode.appendChild(f); f.method = ''POST''; f.action = this.href;var m = document.createElement(''input''); m.setAttribute(''type'', ''hidden''); m.setAttribute(''name'', ''_method''); m.setAttribute(''value'', ''delete''); f.appendChild(m);f.submit(); };return false;\">Delete</a></td>\n</tr>\n&quo...
2009 Dec 21
1
[PATCH] snapshot: Explicitly remove unused disk source attribute
...ot.pl index f089a77..e2cc33c 100755 --- a/snapshot/v2v-snapshot.pl +++ b/snapshot/v2v-snapshot.pl @@ -529,8 +529,10 @@ sub _commit_guest # Update the domain XML with the location of the backing store if($backing_type == Sys::Virt::StorageVol::TYPE_BLOCK) { $source->setAttribute('dev', $backing_path); + $source->removeAttribute('file'); } else { $source->setAttribute('file', $backing_path); + $source->removeAttribute('dev'); } # Update the domain XML with with a driver...
2010 May 26
1
[PATCH] RHEV: Only mark the first disk as bootable
....pm | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Sys/VirtV2V/Target/RHEV.pm b/lib/Sys/VirtV2V/Target/RHEV.pm index c35379d..231fe5c 100644 --- a/lib/Sys/VirtV2V/Target/RHEV.pm +++ b/lib/Sys/VirtV2V/Target/RHEV.pm @@ -874,8 +874,9 @@ sub _disks $diske->setAttribute('ovf:format', 'http://en.wikipedia.org/wiki/Byte'); # IDE = 0, SCSI = 1, VirtIO = 2 $diske->setAttribute('ovf:disk-interface', $bus eq 'virtio' ? 2 : 0); - # The libvirt QEMU driver marks all disks as bootable - $diske->setAttri...
2006 Apr 06
4
problem with IE
hello there, im having a little problem with Internet Exploiter, im doing this: //// CODE //// var m = $(''XYZ'').cloneNode(false) m.setAttribute(''id'', ''XYZ_2''); m.value = ''''; var onblur = "alert(''hola'');"; m.setAttribute(''onblur'', onblur); y6.appendChild(m); //// CODE //// where "XYZ" is an input text and y6 is a...
2006 Jun 15
8
Loading CSS for AJAX apps.
I am working on an update to my content management system and I am using a lot of AJAX to load in the different "Modules" I want each module to be self contained, including all its specific js and CSS. Does any one know of a good solution for loading in new CSS to go with the code loaded in via the AJAX call? Thanks.
2006 Jul 14
3
Rails newbie: How does the submit_tag work?
...ascript_include_tag "prototype" %></head> <SCRIPT LANGUAGE="JavaScript"> <!-- Beginning of JavaScript - function checkboxClick(element) { inputValue = element.firstChild if (inputValue.getAttribute ("value") == "off") { inputValue.setAttribute ("value", "on") element.setAttribute ("background","/images/cbChecked.png"); } else { inputValue.setAttribute ("value", "off") element.setAttribute ("background","/images/cbUnchecked.png"); } } /...
2010 Mar 31
1
[PATCH] Add LocalCopy transfer method to transfer local files to a target
...driver element if none exists - unless (defined($driver)) { - $driver = - $disk->getOwnerDocument()->createElement("driver"); - $disk->appendChild($driver); - } - $driver->setAttribute('name', 'qemu'); - $driver->setAttribute('type', $vol->get_format()); - - # Remove the @file or @dev attribute before adding a new one - $source_e->removeAttributeNode($source); - - # Set @file or @dev as...
2011 Mar 11
2
[PATCH 1/2] Allow reading more data than the reported size of a volume
If a volume is not an exact multiple of 512 bytes, qemu-img will report its size rounded down to a 512 byte boundary. However, when copying, the file is still read until EOF, which will return more data than was expected. This change prevents that causing a failure in itself. The situation is still not resolved, however, as there are still situations where this will cause a failure. For example,
2012 Apr 22
2
Cisco AnyConnect on 6.2 32-bit?
...Description: vpnapi version 2.5.0217 () Initializing. Apr 22 14:53:50 keyhole vpnui[3122]: Function: addProfile File: ProfileMgr.cpp Line: 836 Invoked Function: found profile Return Code: 0 (0x00000000) Description: /opt/cisco/vpn/profile/myaccess2.xml Apr 22 14:53:50 keyhole vpnui[3122]: Function: setAttribute File: HostInitSettings.cpp Line: 348 Invoked Function: setAttribute Return Code: -33554423 (0xFE000009) Description: GLOBAL_ERROR_UNEXPECTED Invalid preference ID or not handling attributes for element UseStartBeforeLogon Apr 22 14:53:50 keyhole vpnui[3122]: Function: setAttribute File: HostInitSe...
2006 Aug 08
0
Equivalent of request.setAttribute(key, value) in Rails??
Hi All I come from Java/J2EE background and I was wondering if there was any way of setting an attribute-value in request. As far as I understand the equivalent is/are the controller instance variable that are exposed to the view(templates/layout). But they are not the same as storing values in request objects in Java servlets. Plus I feel this can give rise to race condition and data swapping
2006 Jan 11
2
RE: extending the Element.prototype to provide asetAttributes function
...m, try this... (removed your var and added the bind(this) after the function declaration. I didn''t test it though so you might want to give it whirl. It might introduce a different scope problem with the "attr" var but I think it should work. Object.extend(Element.prototype, { setAttributes: function(attrs) { $H(attrs).each( function(attr) { this.setAttribute(attr[0], attr[1]); }.bind(this)); } }); -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@...
2013 May 15
1
[LLVMdev] Attributes & CloneFunctionInto
...of 3.3 trunk, but the API changed about a hundred times. Now as it apparently has stabilized, I moved to a the 3.3 release branch just to find that even my previous workarounds don't work anymore. I can't understand why the API of llvm::Function does not simply provide two functions - setAttribute(unsigned paramIdx, AttributeKind A) and - removeAttribute(unsigned paramIdx, AttributeKind A). Cheers, Ralf On 5/15/13 5:39 PM, John Criswell wrote: > On 5/15/13 10:27 AM, Ralf Karrenberg wrote: >> Hi, >> >> I am again struggling to find my way around the Attribute classes....
2010 Feb 08
1
[PATCH] Converter: Prefer detected arch of OS if it's available
...--- a/lib/Sys/VirtV2V/Converter.pm +++ b/lib/Sys/VirtV2V/Converter.pm @@ -224,9 +224,8 @@ sub _configure_os $os->appendChild($type); } - # Set type/@arch unless it's already set - my $arch_attr = $type->getAttributes()->getNamedItem('arch'); - $type->setAttribute('arch', $arch) unless(defined($arch_attr)); + # Set type/@arch based on the detected OS architecture + $type->setAttribute('arch', $arch) if (defined($arch)); } sub _configure_default_devices -- 1.6.6
2010 Mar 30
3
[PATCH 1/2] Refactor guest and volume creation into Sys::VirtV2V::Target::LibVirt
...$path = $vol->get_path(); # Find any existing driver element. my ($driver) = $disk->findnodes('driver'); @@ -156,37 +155,24 @@ sub _storage_iterate $disk->appendChild($driver); } $driver->setAttribute('name', 'qemu'); - - # Get the volume format for passing to the qemu driver - my ($format) = - $voldom->findnodes('/volume/target/format/@type'); - - $format = $format->getValue() if (defined($format)); -...
2006 Jan 09
6
drag and drop problem
I am working on a resource planning problem. I like to use a nice drag and drop interface for that. E.g. have a box of persons and a box of projects, now I would like to assign a persom to project by dragging it from the available resources box to a recieving project box. I have studied the amazing drag and drop shopping card code listed here http://demo.script.aculo.us/shop What I need to
2010 Mar 31
1
[PATCH] Default to IDE when VirtIO isn't available
...drive => $device, - xml => $dom->toString()))) + die("Previously detected drive $device is no longer present in domain ". + "XML: ".$dom->toString()) unless (defined($target)); - $target->setAttribute('bus', $virtio ? 'virtio' : 'scsi'); - $target->setAttribute('dev', $prefix.$suffix); - $suffix++; # Perl magic means 'z'++ == 'aa' + # Don't add more than 4 IDE disks + if (!$virtio && _suffixcmp($suffix, &...