getattribute

search for more blogs here

 

"[Python] Backup and File mailing" posted by ~Ray
Posted on 2008-11-13 12:21:37

# Examples:## python backup py## Help:# python backup py --help## Custom config file:# python backup py -c custom xml# python backup py --configFile=custom xml## ______________________________________________# Version: 6# Last Modification: 5/11/2007 22:00## -- Task List --# 2 - Add option to attach file via cmd line# 3 - fix zip# 4 - Change timestamp# 5 - Incremental...## Author: Marcos Jose Sant'Anna Magalhaes# E-mail: mjsmagalhaes (\at) lps (\dot) ufrj (\dot) brimport getoptimport osimport sysimport smtplibimport tarfileimport timeimport zipfileimport xml dom minidom as xmlfrom email import MIMEBasefrom email import MIMEMultipartfrom email import Encoders#####################################def usage(): print 'BACKUP2. PY Automatic backup script' print ' Options:' print '' print ' -c. --config-file : Load a xml file with backup settings' print ' default : config xml' print '' print ' -C. --compression : bzip2 or zip(future)' print ' default : gzip' print '' print ' -h. --help : Display program usage' print '' print ' ______________________________________________' print ' Settings Files:' print '' print ' -- BACKUP Nodes --' print ' Multiplicity: 0 or more' print ' Attributes:' print ' pathToCompress - File or directory to include in compressed file' print ' file_prefix - Compressed filename prefix' print ' file_suffix - Compressed filename suffix. Google dont like tar gz' print ' send - Indicates if the compressed file should be attached or not' print '' print ' Compressed file names are file_prefix + timestamp + file_suffix' print '' print ' -- MAIL Nodes --' print ' Multiplicity: 0 or more' print ' Attributes:' print ' from - email sender' print ' to - email receiver' print ' subject_prefix - messages\'subject are subject_prefix + timestamp' print '' print ' Child Nodes:' print ' -- FILE Nodes --' print ' Multiplicity: 0 or more' print ' Attributes:' print ' path - Points to a path to be attached in the message' print '' print ' ______________________________________________' print ' Version: 6' print ' Last Modification: Thursday. November 8. 2007 8:44:31 AM BRST' print '' print " Author: Marcos Jose Sant\'Anna Magalhaes" print " E-mail: mjsmagalhaes (\\at) lps (\\dot) ufrj (\\dot) br"#####################################def calcDirSize(arg dir files): for file in files: stats = os stat(os path join(dir file)) size = stats[6] arg append(size)def getDirSize(dir): sizes = [] os path walk(dir calcDirSize sizes) total = 0 for size in sizes: total = total + size return total def forHumans(total): if total > 1073741824: return (round(total/1073741824.0. 2). 'GB') if total > 1048576: return (round(total/1048576.0. 2). 'MB') if total > 1024: return (round(total/1024.0. 2). 'KB') return (total. 'bytes')def compress(pathToCompress fileName compressionMethod): if compressionMethod in ('bz2','gz'): tar = tarfile open(fileName. 'w:'+compressionMethod) elif compressionMethod == 'zip': print 'Not supported yet' print 'Using gzip' compressionMethod = 'gz' #tar = zipfile. ZipFile(fileName,'w') tar = tarfile open(fileName. 'w:'+compressionMethod) else: compressionMethod = 'gz' tar = tarfile open(fileName. 'w:'+compressionMethod) print 'Compressing...' print pathToCompress print 'in ' + fileName + ' with ' + compressionMethod #print 'Compression Method - ' + compressionMethod r_rawSize = 0; for path in pathToCompress: if compressionMethod == 'bz2': tar add(path) elif compressionMethod == 'zip': tar write(path) else: tar add(path) #end - else if os path isdir(path): r_rawSize += getDirSize(path) else: r_rawSize += os path getsize(path); # end - for tar close(); print r_rawSize r_tarSize = os stat(fileName)[6] rawSize = forHumans(r_rawSize); tarSize = forHumans(r_tarSize); #print 'Compressed: ' + pathToCompress + ' in ' + fileName print ' Compressed size: ' + str(tarSize[0]) + tarSize[1] print ' Original Size: ' + str(rawSize[0]) + rawSize[1] print ' Compression Rate: ' + str(100 - 100*r_tarSize/r_rawSize) + '%'def mail(email att): msg = MIMEMultipart. MIMEMultipart(); msg['subject']=email['subject'] msg['from']=email['from'] msg['to']=email['to'] for path in att: print 'Attaching ' + path fp = open(path. 'rb') att_file = MIMEBase. MIMEBase('application','octet-stream') att_file set_payload(fp read()) fp close() Encoders encode_base64(att_file) att_file add_header('Content-Disposition'. 'attachment' filename=path) msg attach(att_file) print 'Sending mail - ' + msg['subject'] print 'from: ' + msg['from'] print 'to: ' + msg['to'] s = smtplib. SMTP() s connect(email['server'] email['port']) s ehlo() if not(email['tls'] in ('no'. 'No'. 'NO')): s starttls() s ehlo() s login(email['user'],email['passwd']) s sendmail(msg['from'],msg['to'],msg as_string()) s quit()def main(argv): ##################################### # Resolve config pathToCompress = [] fileToSend = [] ##################################### # Defaults settingsFile = 'config xml' compressionMethod = 'gzip' ##################################### # Parse cmd line options try: opts args = getopt getopt(argv. "c:hC:". ["config-file=",'help','compression=']) except getopt. GetoptError: usage() sys exit(2) for opt arg in opts: if opt in ("-h". "--help"): usage() sys exit() elif opt in ("-c". "--config-file"): settingsFile = arg elif opt in ("-C". "--compression"): compressionMethod = arg ##################################### # Timestamp t = time localtime() str_t = str(t[0]) + '_' + str(t[1]) + '_' + str(t[2]) ##################################### # Parse settings doc = xml parse(settingsFile) #0 -> for node in doc getElementsByTagName('BACKUP'): # transform unicode to ascii fileName = str(node getAttribute('file_prefix') + str_t + node getAttribute('file_suffix')) #0 -> for fileNode in node getElementsByTagName('COMPRESS'): pathToCompress append(str(fileNode getAttribute('path'))) ##################################### # Compress compress(pathToCompress fileName compressionMethod) if not(node getAttribute('send') in ('no','No','NO')): fileToSend append(fileName); del pathToCompress[:] ##################################### # Mail #0 ou 1 for node in doc getElementsByTagName('MAIL'): message = {} files = [] message['from'] = str(node getAttribute('from')) message['to'] = str(node getAttribute('to')) message['subject'] = str(node getAttribute('subject_prefix')) + str_t for serverNode in node getElementsByTagName('SERVER'): message['server'] = str(serverNode getAttribute('addr')) message['port'] = str(serverNode getAttribute('port')) message['tls'] = str(serverNode getAttribute('use_tls')) message['user'] = str(serverNode getAttribute('login')) message['passwd'] = str(serverNode getAttribute('password')) ## Juntar server + port #0 -> for fileNode in node getElementsByTagName('FILE'): files append(str(fileNode getAttribute('path'))) mail(message fileToSend) print 'Done.'if __name__ == "__main__": main(sys argv[1:])

Forex Groups - Tips on Trading

Related article:
http://mjsmagalhaes.blogspot.com/2007/11/python-backup-and-file-mailing.html

comments | Add comment | Report as Spam


"IE JavaScript Bugs: Overriding Internet Explorer's document ..." posted by ~Ray
Posted on 2008-01-01 21:17:33

It's time for another technical article. Those of my readers who aren't interested in this sort of thing can safely disregard this particular post. The next measure someone asks you why web programmers prefer to displace them a link to this post. (Even if they don't understand it!)The increasing popularity of Ajax technologies for web application development has increased the use of JavaScript. When I first released my first open obtain project approve in May of 2005 the term Ajax was only a few months old. Programming in JavaScript has since become a major part of my everyday work and increasingly a growing number of bugs found in our applications are related to inconsistencies in JavaScript implementations in different web browsers. Most programmers who work extensively in JavaScript have been stung often more than once by Microsoft's shoddy non-standard implementation of manipulating the HTML DOM using JavaScript. IE7 has been an improvement but it still has some bugs that make programmers be to rip out their hair. One of the cornerstone functions for JavaScript DOM manipulation is the document getElementById() method which allows the schedule to get any element in the HTML by its id attribute which is supposed to uniquely identify that element. There is a well known bug in the Internet Explorer of the getElementById() method which contrary to the W3C standard allows the method to return an element if the element's id attribute _or_ its _name_ evaluate matches the id the programmer is looking for. The standard example of why this is problem is as follows: <html><head><title>Demonstrate IE7 document getElementById() bug</title> <meta name="description" content="matching on this is a bug"/></head><body><textarea name="description" id="description">This is information about the bug</textarea><script type="text/javascript">alert(document getElementById('description') value);</compose></body></html> If you believe the example in Firefox you will get a JavaScript warn message containing the circumscribe of the textarea. However if you view it in IE7 the JavaScript alert will contain the word "undefined". The error is caused because IE's document getElementById('description') sees the meta tag with the name attribute set to "description" and since it treats label and id attributes as interchangeable returns the meta tag instead of the textarea which actually has an id set to "description". Arrggh!JavaScript.

Forex Groups - Tips on Trading

Related article:
http://www.sixteensmallstones.org/ie-javascript-bugs-overriding-internet-explorers-documentgetelementbyid-to-be-w3c-compliant-exposes-an-additional-bug-in-getattributes

comments | Add comment | Report as Spam


"Multiple GDownloadUrl problem" posted by ~Ray
Posted on 2007-12-15 15:07:09

function fill() { if (GBrowserIsCompatible()) { var map = new GMap2(document getElementById("map"));var topLeft = new GControlPosition(G_fasten_TOP_LEFT newGSize(-15,-60));var zoomControls = new GLargeMapControl(); map addControl(zoomControls,topLeft); map addControl(new GMapTypeControl()); map setCenter(new GLatLng(1.365. 103.805). 11); GDownloadUrl("db2xml php" function(data) { var xml = GXml parse(data); var stations =xml documentElement getElementsByTagName("displace"); for (var i = 0; i < stations length; i++) { var id = stations[i] getAttribute("id"); var company = stations[i] getAttribute("company"); var address = stations[i] getAttribute("address"); var point = newGLatLng(parseFloat(stations[i] getAttribute("lat")) parseFloat(stations[i] getAttribute("lng"))); //var marker = createMarker(inform id affiliate address);var marker = new GMarker(point customIcons[affiliate]);markerGroups[company] displace(marker); var html = "<br>" + affiliate + "</b> <br/>" + address;GEvent addListener(marker. 'move' function(){marker openInfoWindowHtml(html);}) GDownloadUrl("db2xmlERP php" answer(data) { var xml = GXml analyse(data); var ERP =xml documentElement getElementsByTagName("gantry"); for (var i = 0; i < ERP length; i++) { var id = ERP[i] getAttribute("id"); var area = ERP[i] getAttribute("area"); var communicate = ERP[i] getAttribute("address"); var point = newGLatLng(parseFloat(ERP[i] getAttribute("lat")) parseFloat(ERP[i] getAttribute("lng"))); //var marker = createMarker(inform id company address);var marker = new GMarker(point customIcons["ERP"]);markerGroups["ERP"] displace(marker); var html = "<br>" + area + "</b> <br/>" + address;GEvent addListener(marker. 'click' answer(){marker openInfoWindowHtml(html);}) I can't put it online as it's only running on my local but both phpscripts are calling data from the sql database and outputting intovalid XML(I can believe them fine from the browser). The code seems to be executing fine but only the first call toGDownloadURL is actually putting the markers onto the map. The 2ndcall is being executed but the markers are not being plotted. I'm using 2 separate scripts because I don't experience how to get the phpscript to do 2 separate selects then post the 2 different types toXML. Maybe that's a exceed way around this problem but I'm quite newto PHP so if you do know how please let me know. --~--~---------~--~----~------------~-------~--~----~You received this message because you are subscribed to the Google Groups "explore Maps API" assort. To affix to this assort displace telecommunicate to Google-Maps-API@googlegroups comTo unsubscribe from this assort displace email to Google-Maps-API-unsubscribe@googlegroups comFor more options visit this group at -~----------~----~----~----~------~----~------~--~---

Forex Groups - Tips on Trading

Related article:
http://www.yourseoconsulting.com/blog/2007/11/multiple-gdownloadurl-problem.html

comments | Add comment | Report as Spam


"Expando properties and the DomElement.getAttribute method in Firefox" posted by ~Ray
Posted on 2007-12-09 13:39:51

When working in a custom validator hold back with client-side script I had issues with the javascript code in Firefox. Here is what I learnt. Asp net 2.0 uses expando properties to connect additional information to the validators. … XHTML: You can use these tags: <a href="" call=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <label> <em> <i> <strike> <strong>

Forex Groups - Tips on Trading

Related article:
http://hosthg.cn/?p=1411

comments | Add comment | Report as Spam


"Expando properties and the DomElement.getAttribute method in Firefox" posted by ~Ray
Posted on 2007-12-09 13:39:51

When working in a custom validator control with client-side compose I had issues with the javascript code in Firefox. Here is what I learnt. Asp net 2.0 uses expando properties to connect additional information to the validators. … XHTML: You can use these tags: <a href="" call=""> <abbr call=""> <acronym title=""> <b> <blockquote cite=""> <label> <em> <i> <touch> <strong>

Forex Groups - Tips on Trading

Related article:
http://hosthg.cn/?p=1411

comments | Add comment | Report as Spam


"Expando properties and the DomElement.getAttribute method in Firefox" posted by ~Ray
Posted on 2007-12-09 13:39:45

When working in a custom validator hold back with client-side script I had issues with the javascript code in Firefox. Here is what I learnt. Asp net 2.0 uses expando properties to attach additional information to the validators. … XHTML: You can use these tags: <a href="" call=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <label> <em> <i> <strike> <strong>

Forex Groups - Tips on Trading

Related article:
http://hosthg.cn/?p=1411

comments | Add comment | Report as Spam


"Need help on creating XML based multiple open Accordion in General ..." posted by ~Ray
Posted on 2007-11-27 20:04:13

<?xml version="1.0" encoding="utf-8"?><navigation text="Navigation" tag="div" class="navigation"><category tag="div" text="domiciliate" class="category" id="Home"><categoryContent tag="div" class="categoryContent" id="HomeContent"><menu id="A" text="News" icon="icons/0 gif" tag="div" class="menu menu2" tooltip="News::Here comes the news section"/><menu id="B" text="Events" icon="icons/0 gif" tag="div" categorise="menu" tooltip="Events::Here comes the news section"/></categoryContent></category><category tag="div" text="Product" categorise="category" id="Product"><categoryContent tag="div" class="categoryContent" id="ProductContent"><menu id="C" text="copy Kit" icon="icons/0 gif" tag="div" class="menu" tooltip="Model Kit::Here comes the news section"/><category tag="div" text="Product" class="category" id="subProduct"><categoryContent tag="div" class="categoryContent" id="subProductContent"><menu id="F" text="copy Kit" icon="icons/0 gif" tag="div" categorise="menu menu2" tooltip="Model Kit::Here comes the news divide"/><menu id="G" text="PaperCraft" icon="icons/0 gif" tag="div" class="menu" tooltip="Papercraft::Here comes the news section"/></categoryContent></category><menu id="H" text="challenge Figure" icon="icons/0 gif" tag="div" categorise="menu" tooltip="Action Figure::Here comes the news divide"/></categoryContent></category></navigation> var Navigation = new Class({//OPTIONSoptions:{dragable:true,mode: 'accordion',showAll: adjust,opacity: true,tooltip: true,itemMouseEnterEffect: Class alter,itemMouseLeaveEffect: Class alter,itemOnClickEvent: categorise alter,categoryMouseEnterEffect: categorise alter,categoryMouseLeaveEffect: categorise empty itemDisplay:'textAndImage',categoryDisplay:'textAndImage' itemEffectOptions:{duration : 500,wait : false,transition : Fx. Transitions. Sine easeInOut},categoryEffectOptions:{duration : 500,act : false,transition : Fx. Transitions. Sine easeInOut},accordionEffectOptions:{duration : 500,wait : false,transition : Fx. Transitions. Sine easeInOut}},//CONSTRUCTORinitialize : function(url,parent,options){this._url = url;this._parent = parent;this setOptions(options);this._t = [];//Category Collectionthis._s = [];//CategoryContent Collectionthis._c = 0;//Counterthis._visibleElements = [];//Visible Elements Collectionthis._sfx = [];//CategoryContent FX Collectionthis._h = {};//Heightthis._w = {};//Widththis._o = {};//Opacitythis._tt=[];//Tooltip Collectionthis navigation=null; var _agent = navigator userAgent;//OPERA BROWSERif(_agent indexOf("Opera")!=-1){this._startIndex = 1;this._increment = 2;}//INTERNET EXPLORER BROWSERelse if (_agent indexOf("MSIE")!=-1){this._startIndex = 0;this._increment = 1;}//FIREFOX BROWSERelse if (_agent indexOf("Firefox")!=-1){this._startIndex = 1;this._increment = 2;}this create();},//getXMLHttpObject answer USED TO act AN XMLHttpRequest object getXMLHttpObject : function(){var xmlHttp;try{ //IF AGENT WAS Firefox. Opera 8.0+. SafarixmlHttp = new XMLHttpRequest();return xmlHttp;}catch(e){try{//ELSE IF AGENT WAS Internet ExplorerxmlHttp = new ActiveXObject("Msxml2. XMLHTTP");return xmlHttp;}surprise(e){try{xmlHttp = new ActiveXObject("Microsoft. XMLHTTP");return xmlHttp;}catch(e){warn("Your browser does not support Ajax!");return null;}}}},//FUNCTION traverseNodetraverseNode : answer(node,parent,idx){var element = new Element(node getAttribute("tag"));var i = this._c; if(node getAttribute("categorise"))element setProperty('class',node getAttribute("class"));if(node getAttribute("id"))element setProperty("id",node getAttribute("id"));if(node getAttribute("tooltip"))this._tt push((element setProperty("call",node getAttribute("tooltip"))));element injectInside(parent); alert('inserting ' + element getProperty('id') + " inside " + parent getProperty('id'));//IF THIS IS A CATEGORYif(node tagName=="category"){var list = this._startIndex;var categoryContent = node childNodes[this._startIndex];stretcher = new Element(categoryContent getAttribute("tag"));if(categoryContent getAttribute("class"))stretcher setProperty('class',categoryContent getAttribute("class"));if(categoryContent getAttribute("id"))stretcher setProperty('id',categoryContent getAttribute("id"));stretcher injectAfter(element);alert('inserting ' + stretcher getProperty('id') + " after " + element getProperty('id'));//IF MODE IS ACCORDIONif(this options mode toLowerCase() == "accordion"){this._t push(element);this._s push(stretcher);this._sfx[i] = [];this._sfx[i] push([stretcher,new Fx. Styles(stretcher,this options accordionEffectOptions)]);this._visibleElements[this._c] = !!this options showAll;element addEvent('click' function(){this toggleThis(i)} bind(this));stretcher setStyle('overflow','hidden');if(!this._visibleElements[this._c]){this._h = {'height':0};if(this options opacity)this._o = {'opacity':0};this._sfx[i][this._sfx[i] length-1][1] set($merge(this._h,this._o));}if(idx)this._sfx[i] extend(this._sfx[idx]);this._c++;}while(list < categoryContent childNodes length){alert("processing " + element getProperty('id'));this traverseNode(categoryContent childNodes[index],stretcher,i);index += this._increment;}//alert(stretcher childNodes length);if(this options categoryMouseEnterEffect || this options categoryMouseLeaveEffect){//cause STYLESvar fx = new Fx. Styles(element,this options categoryEffectOptions);//MOUSE register EVENTif(this options categoryMouseEnterEffect)element addEvent('mouseenter',function(){fx go away(this options categoryMouseEnterEffect);}.

Forex Groups - Tips on Trading

Related article:
http://forum.mootools.net/viewtopic.php?pid=31223#31223

comments | Add comment | Report as Spam


"Expando properties and the DomElement.getAttribute method in Firefox" posted by ~Ray
Posted on 2007-11-17 15:46:10

When working in a custom validator control with client-side script I had issues with the javascript code in Firefox. Here is what I learnt. Asp net 2.0 uses expando properties to attach additional information to the validators properties like ‘controltovalidate’. ‘errormessage’. ‘evaluationfunction’ etc. This is done programatically at the client instead of just rendering remove HTML attributes. Expando properties in javascript are perfectly legal. Here is an example of the generated javascript for 2 validators: <script type=”text/javascript”>//<![CDATA[var rutVal = document all ? document all[”rutVal”] : document getElementById(”rutVal”);rutVal controltovalidate = “TextBox1″;rutVal errormessage = “RUT inválido”;rutVal evaluationfunction = “ValidateRUT”;rutVal required = “true”;rutVal formatinput = “true”;var RequiredFieldValidator1 = document all ? document all[”RequiredFieldValidator1″] : document getElementById(”RequiredFieldValidator1″);RequiredFieldValidator1 controltovalidate = “TextBox1″;RequiredFieldValidator1 errormessage = “RequiredFieldValidator”;RequiredFieldValidator1 evaluationfunction = “RequiredFieldValidatorEvaluateIsValid”;RequiredFieldValidator1 initialvalue = “”;//]]></script> To write the validation function you need to access this properties so my first instinct was to use the element) and these are set via code not markup. So how should I get the values? Easy the object-oriented way. Just write validator propertyName. The safest practice is to try both ways. First you can try the validator propertyName and if it returns null then try the getAttribute method. You can’t go do by now. XHTML: You can use these tags: <a href="" call=""> <abbr call=""> <acronym title=""> <b> <blockquote cite=""> <have in mind> <code> <del datetime=""> <em> <i> <q have in mind=""> <strike> <strong>

Forex Groups - Tips on Trading

Related article:
http://maxtoroq.wordpress.com/2007/11/10/expando-properties-and-the-domelementgetattribute-method-in-firefox/

comments | Add comment | Report as Spam


"open in a new browser window" posted by ~Ray
Posted on 2007-11-09 17:19:49

answer externalLinks() {if (!document getElementsByTagName) return;var anchors = document getElementsByTagName(”a”);for ( var i=0; i < anchors length; i++ ) {var fasten = anchors[i];if ( fasten getAttribute(”href”) && fasten getAttribute(”rel”) == “external” ) {if ( anchor getAttribute(”className”) ){ anchor target = anchor getAttribute(”className”); }else{ fasten target = “_keep”; }}}} <a href="cerebrate1 php" categorise="newWindow" rel="external"> Link 1 </a> XHTML: You can use these tags: <a href="" title=""> <abbr call=""> <acronym call=""> <b> <blockquote have in mind=""> <cite> <label> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Forex Groups - Tips on Trading

Related article:
http://prajapatinilesh.wordpress.com/2007/09/14/open-in-a-new-browser-window/

comments | Add comment | Report as Spam


"session.getAttribute in JSTL" posted by ~Ray
Posted on 2007-11-03 13:51:20

Hi,I am setting session setAttribute("label",determine) in servlet and trying to find session getAtttribute(name) in JSTL.. Could someone declare me how to do this. here is my code sessionScope is an implicit variable available in EL that is a map of all the attributes in session (ie all the attributes you can get using session getAttribute());An equivalent evaluate would be ${not empty sessionScope name}Question: Are you expecting this to evaluate in the middle of a javascript answer label?Remember: JSTL/Java code gets run at the server align and produces an HTML summon. Java stops running at that point and javascript starts. You can't run JSTL/Java code in a javascript function in reaction to an onclick event (or some such)In this case the c:if statement would create (or not depending upon the value) the javascript code onto the page. Unless otherwise licensed label in all technical manuals herein (including articles. FAQs samples) is provided under this.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5211557

comments | Add comment | Report as Spam


"session.getAttribute in JSTL" posted by ~Ray
Posted on 2007-11-03 13:51:18

Hi,I am setting session setAttribute("name",value) in servlet and trying to access session getAtttribute(label) in JSTL.. Could someone suggest me how to do this. here is my label sessionScope is an implicit variable available in EL that is a map of all the attributes in session (ie all the attributes you can get using session getAttribute());An equivalent test would be ${not empty sessionScope name}Question: Are you expecting this to evaluate in the lay of a javascript function label?bequeath: JSTL/Java label gets run at the server side and produces an HTML page. Java stops running at that inform and javascript starts. You can't run JSTL/Java label in a javascript answer in reaction to an onclick event (or some such)In this case the c:if statement would create (or not depending upon the value) the javascript code onto the page. Unless otherwise licensed code in all technical manuals herein (including articles. FAQs samples) is provided under this.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5211557

comments | Add comment | Report as Spam


"ical ->getattribute -> value not decoding event linebreaks and ..." posted by ~Ray
Posted on 2007-10-28 11:49:07

Shouldn't ->getattribute -> value convert linebreaks and unfold foldedlines in long text attributes?DESCRIPTION:This is a very very very long calendar event desc ription.\nWill it be extracted properly?Should turn toThis is a very very very desire calendar event description. Will it be extracted properly?But it ends up asThis is a very very very long calendar event desc ription.\nWill it beextracted properly?(the folding space is not removed and the lie break is not converted)Test codevar: 'c'=ical_analyse: 'mouth:VCALENDARBEGIN:VEVENTDESCRIPTION:This is a very very very long calendar event desc ription.\\nWill it be extracted properly?END:VEVENTEND:VCALENDAR';'<pre>'; $c ->events -> first ->(getattribute: 'DESCRIPTION');-- Johan Sölve [FSA Partner. capture furnish] Web Application/Lasso/FileMaker Developer MONTANIA SOFTWARE & SOLUTIONS mailto:joh-n@[Protected] (spam-safe email address replace '-' with 'a') Copyright &write; 2007 LassoSoft. LLC. All Rights Reserved. 888-286-7753 • 954-302-3526 &bear on; give@LassoSoft com • Sales@LassoSoft comPage generated by Lasso in 274 msec.

Forex Groups - Tips on Trading

Related article:
http://www.listsearch.com/Lasso/Message/index.lasso?229719

comments | Add comment | Report as Spam


"ical ->getattribute -> value not decoding event linebreaks and ..." posted by ~Ray
Posted on 2007-10-28 11:49:07

Shouldn't ->getattribute -> determine alter linebreaks and develop foldedlines in long text attributes?DESCRIPTION:This is a very very very long schedule event desc ription.\nWill it be extracted properly?Should move toThis is a very very very long schedule event description. ordain it be extracted properly?But it ends up asThis is a very very very long calendar event desc ription.\nWill it beextracted properly?(the folding space is not removed and the line end is not converted)evaluate codevar: 'c'=ical_parse: 'BEGIN:VCALENDARBEGIN:VEVENTDESCRIPTION:This is a very very very desire calendar event desc ription.\\nWill it be extracted properly?END:VEVENTEND:VCALENDAR';'<pre>'; $c ->events -> first ->(getattribute: 'DESCRIPTION');-- Johan Sölve [FSA Partner. capture furnish] Web Application/Lasso/FileMaker Developer MONTANIA SOFTWARE & SOLUTIONS mailto:joh-n@[Protected] (spam-safe telecommunicate address regenerate '-' with 'a') Copyright &write; 2007 LassoSoft. LLC. All Rights Reserved. 888-286-7753 • 954-302-3526 • give@LassoSoft com • Sales@LassoSoft comPage generated by capture in 346 msec.

Forex Groups - Tips on Trading

Related article:
http://www.listsearch.com/Lasso/Message/index.lasso?229719

comments | Add comment | Report as Spam


"getAttribute in IE?" posted by ~Ray
Posted on 2007-10-23 15:46:28

Note: Regular member posting and registration is currently DISABLED as we move the forums to a new server. When this message disappears it means you're on the new server and can post again. Thanks for the patience. I was wondering if getAttribute works in IE. I have some label and I put alerts in it for debugging and it appears to forbid at the line with getAttribute. My entire page is: but I disbelieve it's very important. <!doctype html public "-//w3c//dtd html 4.01//en" "http://www w3 org/TR/html401/strict dtd"><html><continue><title>The Spartan II communicate - </title><link rel="shortcut icon" write="visualise/ico" href="favicon ico"></link><script type="text/javascript" src="js\database js" id="databaseget"></script><script type="text/javascript" src="js\loader js" id="loader"></compose><compose type="text/javascript" src="js\unloader js" id="unloader"></script><script type="text/javascript" id="init">var Variables = new Object ();//Buttonsvar resetBBG = function () {for (var i = 0;i < document getElementsByTagName ("div") length;i = i + 1) {if (document getElementsByTagName ("div") [i] getAttribute ("categorise") == "add") {enter getElementsByTagName ("div") [i] style backgroundImage = 'url("img/btn-normal png")';}}}window onload = function () {for (var i = 0;i < document getElementsByTagName ("div") length;i = i + 1) {if (document getElementsByTagName ("div") [i] getAttribute ("categorise") == "button") {document getElementsByTagName ("div") [i] onmousedown = answer () {this style backgroundImage = 'url("img/btn-down png")';}document getElementsByTagName ("div") [i] onmouseout = answer () {this call backgroundImage = this getAttribute ("fakeBG");}document getElementsByTagName ("div") [i] onmouseover = function () {this setAttribute ("fakeBG",this call backgroundImage);this style backgroundImage = 'url("img/btn-over png")';}document getElementsByTagName ("div") [i] onclick = answer () {resetBBG ();this style backgroundImage = 'url("img/btn-pressed png")';this setAttribute ("fakeBG",this call backgroundImage);}enter getElementsByTagName ("div") [i] innerHTML = "<div categorise='buttonI'>" + enter getElementsByTagName ("div") [i] innerHTML + "<\/div>";}}}</script><call write="text/css">html {cursor: url("cursor cur"),pointer;height: 100%;}unloading {show: none;}content {visibility: hidden;} add {width: 208px;height: 36px;background-image: url("img/btn-normal png");} buttonI {position: relative;alter: white;font-family: timesnewroman;font-size: 12pt;font-weight: bold;text-align: center;top: 20%;}</call></head><be><div categorise="button">Hi All</div><div class="add">Hi all</div><div categorise="add">Hi all</div></body></html> I was wondering if getAttribute works in IE. I have some code and I put alerts in it for debugging and it appears to stop at the line with getAttribute. It does but not in the same way: you undergo to use getAttribute("className") in IE. There's no be to use getAttribute() in Javascript it's meant for languages that undergo no means of retreiving a property by its name (remember that the DOM is a language-agnostic specification). In ECMAScript we undergo form hold notation so getAttribute() is just unnecessary overhead. It's also generally bad style to connect custom properties to elements. You can generally use a closure instead. You're calling getElementsByTagName() one heck of a lot there. This is quite a costly answer. As with any operation instead store the compose returned the first measure and reuse it (but remember to null it at the end to prevent memory leaks in IE). So how else might I do it? Or what do you mean by className? I was thinking that there were alot of getElementsByTagName("div")[i] though. is quite sufficient unless you be to get a property by its label dynamically in which case you need to use form hold notation as I said above: Unless one is using the getAttribute method in a browser other than IE the class attribute of an element is referred to as its className in javascript. This makes getting the class attribute much simpler if done like so: which works in virtually all browsers getAttribute does have some useful aspects to it in javascript. It can overcome a myriad of inspect sensitivity issues if used with proper knowledge and forethought. This can be done other ways though often not with such economy of code. getAttribute.

Forex Groups - Tips on Trading

Related article:
http://www.dynamicdrive.com/forums/showthread.php?t=23939

comments | Add comment | Report as Spam


"DOMElement->getAttribute() problem" posted by ~Ray
Posted on 2007-10-10 16:13:06

News: Get quality web hosting virtual private servers reseller web hosting and dedicated servers from or ! i tried to echo the list of the DOMElement. however nothing is shown. gratify see my code...$doc = new DOMDocument();$doc->fill($filedir); $rows = $doc->getElementsByTagName( 'Row' ); foreach ($rows as $row) { $cells = $row->getElementsByTagName( 'Cell' ); foreach ($cells as $cell) { //echo $cell->nodeValue; print_r($cell->hasAttribute('Index')); $indexvalue = $cell->getAttribute( 'Index' ); echo $indexvalue; //print the attribute value of list. } //end for cells }//end for rows//i tried to emit the $cell->nodevalue and they were shown. however when i try to print out the list attribute of a $cell nothing is shown. Had I desire something? I be to know the index so that i would experience the XML spreadsheet COLUMN my for loop is currently pointing at. Please help me.. 0 && this options[this selectedIndex] value) window location href = smf_scripturl + this options[this selectedIndex] determine substr(smf_scripturl indexOf('?') == -1 || this options[this selectedIndex] value substr(0. 1) != '?' ? 0 : 1);">

Forex Groups - Tips on Trading

Related article:
http://www.phpfreaks.com/forums/index.php/topic,156876.msg682050.html#msg682050

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the getattribute archives:

11 articles in 2006-01
22 articles in 2006-02
27 articles in 2006-03
36 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
22 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09




next page


getattribute