Search Results

Search found 429 results on 18 pages for 'cdata'.

Page 11/18 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Several xml errors using Facebook JS SDK with xhtml strict

    - by Landitus
    I'm trying to set up some like buttons to a project. These buttons live inside a jquery slideshow with Aino's Galleria and let you "Like" each different slide. I'm using an xHTML strict document and while in Firefox (and Firebug) everything seems ok, but in webkit inspector I get this: XML self-closing tag syntax used on <fb:like>. The tag will not be closed. [The HTML that caused this error was generated by a script.] XML self-closing tag syntax used on <fb:like>. The tag will not be closed. I get one of these every slide, so there are 28 errors. Looking into it, found some seem to enclose the fb:like into something like this: <script type="text/javascript"> //<![CDATA[ document.write('<fb:like href="<?php echo "http://www.site/image-".$image_id ;?>" width="260" height="80" show_faces="false" />'); //]]> </script> The above, still works in Firefox, but not in Safari. The inspector says: 26 XFBML tags failed to render in 30000ms. Moreover, for the Facebook like buttons to work with the Galleria Jquery plugin, I have a custom function that reloads only the facebook like button concerning the actual slide which appears briefly upon loading the slide: [...] extend: function(options) { // listen to when an image is shown this.bind(Galleria.IMAGE, function(e) { number = e.index + 1; tag = $('.galleria-info-description .info-box-'+number).find('.btn_fb'); $(tag).each(function() { FB.XFBML.parse( this ); }); }); } This thing is getting more complex and really don't know who is causing the problem! Hope somebody can help or ask the right questions!

    Read the article

  • Why Sql not bringing back results unless I set varchar size?

    - by Tom
    I've got an SQL script that fetches results based on the colour passed to it, but unless I set the size of the variable defined as a varchar to (50) no results are returned. If I use: like ''+@Colour+'%' then it works but I don't really want to use it in case it brings back results I don't need or want. The column FieldValue has a type of Varchar(Max) (which can't be changed as this field can store different things). It is part of aspdotnetstorefront package so I can't really change the tables or field types. This doesn't work: declare @Col VarChar set @Col = 'blu' select * from dbo.MetaData as MD where MD.FieldValue = @Colour But this does work: declare @Col VarChar (50) set @Col = 'blu' select * from dbo.MetaData as MD where MD.FieldValue = @Colour The code is used in the following context, but should work either way <query name="Products" rowElementName="Variant"> <sql> <![CDATA[ select * from dbo.MetaData as MD where MD.Colour = @Colour ]]> </sql> <queryparam paramname="@ProductID" paramtype="runtime" requestparamname="pID" sqlDataType="int" defvalue="0" validationpattern="^\d{1,10}$" /> <queryparam paramname="@Colour" paramtype="runtime" requestparamname="pCol" sqlDataType="varchar" defvalue="" validationpattern=""/> </query> Any Ideas?

    Read the article

  • FLEX: the custom component is still a Null Object when I invoke its method

    - by Patrick
    Hi, I've created a custom component in Flex, and I've created it from the main application with actionscript. Successively I invoke its "setName" method to pass a String. I get the following run-time error (occurring only if I use the setName method): TypeError: Error #1009: Cannot access a property or method of a null object reference. I guess I get it because I'm calling to newUser.setName method from main application before the component is completely created. How can I ask actionscript to "wait" until when the component is created to call the method ? Should I create an event listener in the main application waiting for it ? I would prefer to avoid it if possible. Here is the code: Main app ... newUser = new userComp(); //newUser.setName("name"); Component: <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100" height="200" > <mx:Script> <![CDATA[ public function setName(name:String):void { username.text = name; } public function setTags(Tags:String):void { } ]]> </mx:Script> <mx:HBox id="tagsPopup" visible="false"> <mx:LinkButton label="Tag1" /> <mx:LinkButton label="Tag2" /> <mx:LinkButton label="Tag3" /> </mx:HBox> <mx:Image source="@Embed(source='../icons/userIcon.png')"/> <mx:Label id="username" text="Nickname" visible="false"/> </mx:VBox> thanks

    Read the article

  • embedded SWF isn't shown (SWFLoader)

    - by Trantec
    I embed a swf as ByteArray and load it at runtime with the SWFLoader. Here is the internal swf that I want to load: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Label id="rLabel" text="From InternalSWF"/> </mx:Application> The embeding swf loads it with the following code: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="main();"> <mx:Script> <![CDATA[ import mx.managers.SystemManager; import mx.events.FlexEvent; [Embed(source="../../InternalSWF/bin-release/InternalSWF.swf", mimeType="application/octet-stream")] mimeType="application/octet-stream")] private const internalSWF:Class; public function main(): void { var binary:ByteArray = new internalSWF() as ByteArray; // setup swfloader rSwfLoader.trustContent = true; rSwfLoader.addEventListener( Event.COMPLETE, onSWFLoaded ); rSwfLoader.load(binary); } public function onSWFLoaded( event:Event ): void { } ]]> </mx:Script> <mx:Box> <mx:SWFLoader id="rSwfLoader" height="100%" width="100%" scaleContent="true"/> <mx:Text id="rText" text="from EmbedingSWF"/> </mx:Box> The label "from EmbedingSWF" is shown on both, local and on the webserver. But the label with "From InternalSWF" isn't shown on the webserver, just on the local machine. With some tests I found out that the internal swf is loaded correctly, because it's later added applicationComplete-Function is called. Is this a bug in Adobe-Flash-Player or am I missunderstanding something ? Update: Internet Explorer is fine. Firefox and Chrome not...

    Read the article

  • How do I process multipart http responses in Ruby Net:HTTP?

    - by seal-7
    There is so much information out there on how to generate multipart responses or do multipart file uploads. I can't seem to find any information on how to process a multipart http response. Here is some IRB output from a multipart http response I am working with. >> response.http.content_type => "multipart/related" >> response.http.body[0..2048] => "\r\n------=_Part_3_806633756.1271797659309\r\nContent-Type: text/xml; charset=UTF-8\r\nContent-Transfer-Encoding: binary\r\nContent-Id: <A0FCC4333C6D0FCA346B97FAB6B61818>\r\n\r\n<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:runReportResponse soapenv:encodingStyle="http://www.w3.org/2003/05/soap-encoding" xmlns:ns1="http://192.168.1.200:8080/jasperserver/services/repository"><ns2:result xmlns:ns2="http://www.w3.org/2003/05/soap-rpc">runReportReturn</ns2:result><runReportReturn xsi:type="xsd:string">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n&lt;operationResult version=&quot;2.0.1&quot;&gt;\n\t&lt;returnCode&gt;&lt;![CDATA[0]]&gt;&lt;/returnCode&gt;\n&lt;/operationResult&gt;\n</runReportReturn></ns1:runReportResponse></soapenv:Body></soapenv:Envelope>\r\n------=_Part_3_806633756.1271797659309\r\nContent-Type: application/pdf\r\nContent-Transfer-Encoding: binary\r\nContent-Id: <report>\r\n\r\n%PDF-1.4\n%\342\343\317\323\n3 0 obj

    Read the article

  • Flex 3 Close UrlLoader throws exception

    - by gmoniey
    I am trying to simulate a 'HEAD' method using UrlLoader; essentially, I just want to check for the presence of a file without downloading the entire thing. I figured I would just use HttpStatusEvent, but the following code throws an exception (one that I can't wrap in a try/catch block) when you run in debug mode. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()"> <mx:Script> <![CDATA[ private static const BIG_FILE:String = "http://www.archive.org/download/gspmovvideotestIMG0021mov/IMG_0021.mov"; private var _loader:URLLoader; private function init():void { _loader = new URLLoader(); _loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, statusHandler); _loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); _loader.load(new URLRequest(BIG_FILE)); } public function unload():void { try { _loader.close(); _loader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, statusHandler); _loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); } catch(error:Error) { status.text = error.message; } } private function errorHandler(event:Event):void { status.text = "error"; unload(); } private function statusHandler(event:HTTPStatusEvent):void { if(event.status.toString().match(/^2/)) { status.text = "success"; unload(); } else { errorHandler(event); } } ]]> </mx:Script> <mx:Label id="status" /> I tried using ProgressEvents instead, but it seems that some 404 pages return content, so the status event will correctly identify if the page exists. Anyone have any ideas?

    Read the article

  • navigateToURL with GET parameters in local SWF

    - by Michael Brewer-Davis
    I'm running a Flex application locally (local-with-filesystem or local-trusted), and I'm trying to call navigateToURL to a local page using GET parameters. Flash Player seems to be ignoring the parameters when opening the local page, though. I've been scouring the Flash security pages to find a documented prohibition for this, but haven't found anything. Pointers? How would you work around this issue? My Flex app: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ private function onClick(event:MouseEvent):void { var request:URLRequest = new URLRequest("target.html"); request.data = new URLVariables(); request.data.text = "stackoverflow.com"; navigateToURL(request); } ]]> </mx:Script> <mx:Button label="Go" click="onClick(event)" /> </mx:Application> And my target.html: <html> <head> <script language="JavaScript"> <!-- function showURL() { alert(window.location.href); } //--> </script> </head> <body onload="showURL()" /> </html>

    Read the article

  • I need a true mouseOver...

    - by invertedSpear
    Ok, so mouseOver and RollOver, and their respective outs work great as long as your mouse is actually over the item, or one of it's children. My problem is that I may have another UI component "between" my mouse and the item I want to process the mouse/rollover(maybe a button that is on top of a canvas, but is not a child of the canvas). The mouse is still over the component, there's just something else that it's over at the same time. Any tips or help how to deal with this? Let me know if I'm not being clear enough. Here is a simplified code example detailing my question copy/paste that into your flex/flash builder and you'll see what I mean: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="500" height="226" creationComplete="ccInit()"> <mx:Script> <![CDATA[ private function ccInit():void{ myCanv.addEventListener(MouseEvent.ROLL_OVER,handleRollOver); } private function handleRollOver(evt:MouseEvent):void{ myCanv.setStyle("backgroundAlpha",1); myCanv.addEventListener(MouseEvent.ROLL_OUT,handleRollOut); } private function handleRollOut(evt:MouseEvent):void{ myCanv.setStyle("backgroundAlpha",0); myCanv.removeEventListener(MouseEvent.ROLL_OUT,handleRollOut); } ]]> </mx:Script> <mx:Canvas id="myCanv" x="10" y="10" width="480" height="200" borderStyle="solid" borderColor="#000000" backgroundColor="#FFFFFF" backgroundAlpha="0"> </mx:Canvas> <mx:Button x="90" y="50" label="Button" width="327" height="100"/> </mx:Application>

    Read the article

  • Access a view inside a tab navigator when a tab is clicked

    - by magnus.lassi
    Hi, I I have a view in Flex 3 where I use a tab navigator and a number of views inside the tab navigator. I need to be know which view was clicked because of it's one specific view then I need to take action, i.e. if view with id "secondTab" is clicked then do something. I have set it up to be notified, my problem is that I need to be able to know what view it is. Calling tab.GetChildByName or a similar method seems to only get me back a TabSkin object. <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" xmlns:local="*" creationComplete="onCreationComplete(event)"> <mx:Script> <![CDATA[ import mx.events.FlexEvent; import mx.controls.Button; protected function onCreationComplete(event:Event):void { for(var i:int = 0; i < myTN.getChildren().length; i++) { var tab:Button = myTN.getTabAt(i); tab.addEventListener(FlexEvent.BUTTON_DOWN, tabClickHandler); } } private function tabClickHandler(event:FlexEvent):void { var tab:Button; if(event.currentTarget is Button) { tab = event.currentTarget as Button; // how do I access the actual view hosted in a tab that was clicked? } } ]]> </mx:Script> <mx:TabNavigator id="myTN"> <local:ProductListView id="firstTab" label="First Tab" width="100%" height="100%" /> <local:ProductListView id="secondTab" label="Second Tab" width="100%" height="100%" /> </mx:TabNavigator> </mx:VBox>

    Read the article

  • google maps not working anymore at the drop of a hat

    - by Vordreller
    2 days ago, I was working on a project that involves google maps. The website showed the maps on the pages just fine. Now, I come back to my workstation, nothing has changed, expect for the fact that the google maps won't show up anymore. The code is identical, nobody has touched my machine since I was gone, I've checked the html, everything is perfect and still this isn't working... The Javascript console is giving no errors and the code is identical to a backup I make everytime I call it a day. 2 days ago it was working, today it isn't. I've even copied the source code, put it into an html file and tried that, but the same result. I'm at a loss here. This is my code: <script type="text/javascript"> //<![CDATA[ var map; var directionsPanel; var directions; function initialize() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl()); map.addControl(new GScaleControl()); map.addControl(new GMapTypeControl()); //the route description directionsPanel = document.getElementById("route"); directions = new GDirections(map, directionsPanel); directions.load({COMMAND}); } } //]]> </script> The {COMMAND} is something that the PHP template will parse, I've checked it, the format is 100% correct and like I allready said, code now is identical to the backup, and if it worked back then, it should work now. Did google update their API overnight and did a function that I use here become deprecated? I don't know what's going on here...

    Read the article

  • DisplayObject snapshot in flex 3

    - by simplemagik
    i'm creating a visual editor in flex and need to let users export thier projects into Image format. But i have one problem: size of the canvas is fixed and when user add element which is out of these sizes some scroll bars added. And user continue working on the project. but when he want to take snapshot of the canvas he just get the visible part ot the canvas with scrollbars. how to get image of the fullsize canvas? The only solution i found is to check the positions and sizes of canvas child objects and rezise it to fit them. then take snap and resize back. But it hmmmm... too complicated i think. Is there some "easy methods"? <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Script> <![CDATA[ import mx.graphics.ImageSnapshot; private function SnapshotButtonHandler():void { var snapshot:ImageSnapshot = ImageSnapshot.captureImage(AppCanvas); var file:FileReference = new FileReference(); file.save(snapshot.data, "canvas.png"); } ]]> </mx:Script> <mx:Canvas id="AppCanvas" width="800" height="300" backgroundColor="0xFFFFFF"> <mx:Box x="750" y="100" width="100" height="100" backgroundColor="0xCCCCCC" /> </mx:Canvas> <mx:Button id="SnapshotButton" label="take snapshot" click="SnapshotButtonHandler()" /> </mx:Application>

    Read the article

  • How to output KML by GAE

    - by Niklas R
    Hi I use KML for a google map where entities have a geopt.db coordinate and soft memory limit was exceeded with 213.465 MB after servicing 1 requests total. The log says /list.kml 200 13130ms 10211cpu_ms 4238api_cpu_ms The file list.kml which outputs about 455,7 KB is a template as follows <?xml version="1.0" encoding="UTF-8"?><kml xmlns="http:// www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http:// www.w3.org/2005/Atom"> <Document>{% for a in list %} <Placemark> <name> </name> <description> <![CDATA[<a href="http://{{host}}/{{a.key.id}}"> {{ a.title }} </a> <br/>{{a.text}}]]> </description> <Style> <IconStyle> <Icon> <href> http://www.google.com/intl/en_us/mapfiles/ms/icons/green-dot.png </href> </Icon> </IconStyle> </Style> <Point> <coordinates> {{a.geopt.lon|floatformat:2}},{{a.geopt.lat|floatformat:2}} </coordinates> </Point> </Placemark> {% endfor %} </Document> </kml> Is there a memory leak in the template or the python that passes the list variable? Can I improve using other template engine or other framework than default? Is kmz compression a good idea in this case? Thanks in advance for any suggestion where or how to change the code.

    Read the article

  • Flex: How to access movieclips within an imported swf

    - by squared
    Hello, I have imported a swf (not created with Flex, i.e. non-framework) into a Flex application. Once loaded, I would like to access movieclips within that imported swf. Looking at Adobe's docs (http://livedocs.adobe.com/flex/3/html/help.html?content=controls_15.html), it seems straightforward; however, their examples are between a Flex app and an imported swf (created with Flex). Like their example, I'm trying to use the SystemManager to access the imported swf's content; however, I receive the following error: TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip@58ca241 to mx.managers.SystemManager. Is this error occurring because I'm importing a non-framework swf into a framework swf? Thanks in advance for any assistance. Code: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:SWFLoader source="assets/test.swf" id="loader" creationComplete="swfLoaded()" /> <mx:Script> <![CDATA[ import mx.managers.SystemManager; [Bindable] public var loadedSM:SystemManager; private function swfLoaded():void { loadedSM = SystemManager(loader.content); } ]]> </mx:Script> </mx:Application>

    Read the article

  • m2eclipse: How to set Eclipse project settings when importing a maven project?

    - by Marius Andreiana
    Using m2eclipse Eclipse plugin, everybody on the dev team should be able to checkout source code, import Maven project in Eclipse and be good to go. I saw m2eclipse is being merged into Eclipse 3.7, and maven-eclipse-plugin won't be maintained any longer, so I'm looking for a m2eclipse-based solution (without running "mvn eclipse:clean eclipse:eclipse" before project import, which is what maven-eclipse-plugin does). maven-eclipse-plugin allows this in pom.xml <additionalConfig> <file> <name>.settings/com.google.gdt.eclipse.core.prefs</name> <content><![CDATA[ eclipse.preferences.version=2 jarsExcludedFromWebInfLib= warSrcDir=${project.build.directory}/${project.build.finalName} warSrcDirIsOutput=true ]]> </content> </file> The more general question is How would m2eclipse do something similar? For some cases, just saving the eclipse .settings/prefs file works (e.g. org.eclipse.jdt.ui.prefs), but in this case, com.google.gdt.eclipse.core.prefs is always overwritten on m2eclipse project import. A specific question is asked here, with no reply. Thanks! UPDATE: Not possible now, see request

    Read the article

  • asp:login form does not submit when you hit enter

    - by Ben Liyanage
    I am having an issues while using the <asp:login> tag. When a user clicks the "login" button, the form will process correctly. However, when the user hits the enter key, the form self submits and does not process the login, whether it was correct information or not. I am using a combination of MasterPages, and Umbraco. My aspx code looks like this: <%@ Master Language="C#" MasterPageFile="/masterpages/AccountCenter.master" CodeFile="~/masterpages/Login.master.cs" Inherits="LoginPage" AutoEventWireup="true" %> <asp:Content ContentPlaceHolderID="RunwayMasterContentPlaceHolder" runat="server"> <div class="loginBox"> <div class="AspNet-Login-TitlePanel">Account Center Login</div> <asp:label id="output" runat="server"></asp:label> <asp:GridView runat="server" id="GridResults" AutoGenerateColumns="true"></asp:GridView> <asp:Login destinationpageurl="~/dashboard.aspx" ID="Login1" OnLoggedIn="onLogin" runat="server" TitleText="" FailureText="The login/password combination you provided is invalid." DisplayRememberMe="false"></asp:Login> </div> </asp:Content> In the actual rendered page, I see this javascript on the form: <form method="post" action="/dashboard.aspx?" onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm"> That javascript function is defined as: <script type="text/javascript"> //<![CDATA[ function WebForm_OnSubmit() { if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false; return true; } //]]> </script> The javascript is always evaluating to True when it runs.

    Read the article

  • Flex: Linebreak problem with spark.components.TextArea inside a MXDataGridItemRenderer

    - by radgar
    Hi, I have a DataGrid that has a MXDataGridItemRenderer applied as an itemEditor to one of the columns. The editor includes a spark.components.TextArea control. By default, any text item editor of a datagrid closes itself when [enter] key is pressed.. Keeping this in mind; What I want to do is: Prevent editor from closing on [SHIFT+ENTER] key but accept the linebreak (I can do this, see code below) Close the editor on [ENTER] key but do not accept the linebreak (could not achieve this) Here is the current code in the MXDataGridItemRenderer: <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" focusEnabled="true" > <fx:Script> <![CDATA[ protected function onTxtDataKeyDown(event:KeyboardEvent):void { //Prevent editor from closing on [SHIFT+ENTER] key but accept the linebreak // » this works if (event.shiftKey && event.keyCode == 13) { event.stopImmediatePropagation(); } //Close the editor on [ENTER] key but do not accept the linebreak else if (event.keyCode == 13) { event.preventDefault(); } // » does not work } ]]> </fx:Script> <s:TextArea id="txtData" paddingTop="3" lineBreak="explicit" text="{dataGridListData.label}" verticalScrollPolicy="auto" horizontalScrollPolicy="off" keyDown="onTxtDataKeyDown(event)" /> I also tried the textInput event but that did not do the trick. So: How can I prevent the linebreak when the editor is closed on [enter] key? Any help is appreciated. Thanks. EDIT: If I change the spark.components.TextArea to mx.controls.TextArea, second part with event.preventDefault() will work as expected but then the first part where SHIFT+ENTER accepts the linebreak will not work.

    Read the article

  • wordpress extended_valid_elements for script tag?

    - by John
    Can someone tell me how to tell Wordpress' tinymce editor to NOT strip out script tags? I looked in wp-admin/includes/post.php and added 'extended_valid_elements'=>'script[charset|defer|language|src|type]', to the $initArray. When I do a view source on the CMS post editor, I see taht it does show up like so: <script type="text/javascript"> /* <![CDATA[ */ tinyMCEPreInit = { base : "http://dev.esolar.ca/wp-includes/js/tinymce", suffix : "", query : "ver=327-1235", mceInit : {mode:"specific_textareas", editor_selector:"theEditor", width:"100%", theme:"advanced", skin:"wp_theme", theme_advanced_buttons1:"bold,italic,strikethrough,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,|,link,unlink,wp_more,|,spellchecker,fullscreen,wp_adv", theme_advanced_buttons2:"formatselect,underline,justifyfull,forecolor,|,pastetext,pasteword,removeformat,|,charmap,|,outdent,indent,|,undo,redo,wp_help", theme_advanced_buttons3:"", theme_advanced_buttons4:"", language:"en", spellchecker_languages:"+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv", theme_advanced_toolbar_location:"top", theme_advanced_toolbar_align:"left", theme_advanced_statusbar_location:"bottom", theme_advanced_resizing:"1", theme_advanced_resize_horizontal:"", dialog_type:"modal", relative_urls:"", remove_script_host:"", convert_urls:"", apply_source_formatting:"", remove_linebreaks:"1", gecko_spellcheck:"1", entities:"38,amp,60,lt,62,gt", accessibility_focus:"1", tabfocus_elements:"major-publishing-actions", media_strict:"", paste_remove_styles:"1", paste_remove_spans:"1", paste_strip_class_attributes:"all", wpeditimage_disable_captions:"", plugins:"safari,inlinepopups,spellchecker,paste,wordpress,media,fullscreen,wpeditimage,wpgallery,tabfocus"}, load_ext : function(url,lang){var sl=tinymce.ScriptLoader;sl.markDone(url+'/langs/'+lang+'.js');sl.markDone(url+'/langs/'+lang+'_dlg.js');} }; /* ]]> */ </script> But for some reason ,my editor still doesn't save <script> tags. What am I doing wrong?

    Read the article

  • Changing the <input> type in IE with JavaScript

    - by MrEnder
    The line <input type="text" name="passwordLogin" value="Password" onfocus="if(this.value=='Password'){this.value=''; this.type='password'};" onblur="if(this.value==''){this.value='Password'; this.type='text'};" size="25" /> works in all web browsers except IE... How can I fix it for IE? Ok made some changes to still have an error I want it to work like this like here <input type="text" name="usernameLogin" value="Email" onfocus="if(this.value=='Email'){this.value=''};" onblur="if(this.value==''){this.value='Email'};" size="25" /> if I dont enter anything it will put the value back So I tried this <td colspan="2" id="passwordLoginTd"> <input id="passwordLoginInput1" type="text" name="passwordLogin" value="Password" onfocus="passwordFocus()" size="25" /> <input id="passwordLoginInput2" style="display: none;" type="password" name="passwordLogin" value="" onblur="passwordBlur()" size="25" /> </td> <script type="text/javascript"> //<![CDATA[ passwordElement1 = document.getElementById('passwordLoginInput1'); passwordElement2 = document.getElementById('passwordLoginInput2'); function passwordFocus() { passwordElement1.style.display = "none"; passwordElement2.style.display = "inline"; passwordElement2.focus(); } function passwordBlur() { if(passwordElement2.value=='') { passwordElement2.style.display = "none"; passwordElement1.style.display = "inline"; passwordElement1.focus(); } } //]]> </script> as you can see the blur does not work =[ ok finally got it thanks to the help needed to remove passwordElement1.focus();

    Read the article

  • Appending string in NSXMLNode

    - by iSight
    Hi, When I call the method setStringValue:mCurrentString when is encountered, the child elements which are already attached to element are detached. Can any one suggest why it is happening so. The sample XML file goes like this: <?xml version="1.0" encoding="UTF-8"?> <Test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.0"> <Page Id="123-234-345-456-567"> <Word/> <Text Id="234-345-456-567-678" Left="120.789" Top="120.234657" Width="300.2390" Height="50.00"> <Content> <![CDATA[<FlowDocument FontFamily="Helvetica" FontSize="24" Foreground="#FFFFFF00" TextAlignment="Left" PagePadding="5,0,5,0" AllowDrop="True" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Paragraph><Run FontFamily="Helvetica" FontSize="24" Foreground="FF00B38D" xml:lang="en-gb">This is for Testing purpose</Run></Paragraph>]]></Content> <Stroke Color="#FF00B300" Width="10"/> </Text> <Image Id="345-456-567-678-789" Left="200.345" Top="350.678" Width="200.00" Height="200.00"> <Source>Bear.png</Source> </Image> </Page> <Page Id="345-897-123-756-098" Left="100.90" Top="200.098" Width="200.098" Height="50.09"> <Image Id="756-098-978-685-298" Left="12098" Top="340.87" Right="109.78" Height="100.987"> <Source>Flower.png</Source> </Image> </Page> </Test> This is the method i am using for an NSXMLElement object: [mCurrentElement setStringValue:mCurrentString];// mCurrentString is the string that obtained through delegate method.

    Read the article

  • Deobfuscating Javascript

    - by David Murdoch
    What is this monstrosity? Anyone know of a way to make it readable? <script type="text/javascript"> //<![CDATA[ <!-- var x="function f(x){var i,o=\"\",l=x.length;for(i=0;i<l;i+=2) {if(i+1<l)o+=" + "x.charAt(i+1);try{o+=x.charAt(i);}catch(e){}}return o;}f(\"ufcnitnof x({)av" + " r,i=o\\\"\\\"o,=l.xelgnhtl,o=;lhwli(e.xhcraoCedtAl(1/)3=!76{)rt{y+xx=l;=+;" + "lc}tahce({)}}of(r=i-l;1>i0=i;--{)+ox=c.ahAr(t)i};erutnro s.buts(r,0lo;)f}\\" + "\"(0),9\\\"\\\\$.;(.34U03\\\\\\\\16\\\\0E\\\\NSCZhC24\\\\03\\\\01\\\\\\\\St" + "DEMPbM02\\\\0C\\\\x#opms58aJ}qb<jb7`17\\\\\\\\hc7s17\\\\\\\\rzEeljdp7m03\\\\"+ "\\\\36\\\\0F\\\\24\\\\06\\\\01\\\\\\\\25\\\\01\\\\02\\\\\\\\26\\\\03\\\\03\\"+ "\\\\\\(W4N02\\\\\\\\24\\\\02\\\\00\\\\\\\\07\\\\0N\\\\14\\\\0P\\\\BI07\\\\0" + "4\\\\00\\\\\\\\02\\\\02\\\\02\\\\\\\\14\\\\06\\\\02\\\\\\\\24\\\\0L\\\\25\\" + "\\06\\\\01\\\\\\\\3:?(>4\\\"\\\\f(;} ornture;}))++(y)^(iAtdeCoarchx.e(odrCh" + "amCro.fngriSt+=;o27=1y%i;+=)y90==(iif){++;i<l;i=0(ior;fthnglex.l=\\\\,\\\\\\"+ "\"=\\\",o iar{vy)x,f(n ioctun\\\"f)\")" ; while(x=eval(x)); //--> //]]> </script>

    Read the article

  • Google AJAX Transliteration API :- How do i translate many elements in page to some language at one

    - by Nitesh Panchal
    Hello, I have many elements on page and all of which i want to translate to some language. The language is not the same for all fields, that is, for 1st field it may be fr and for third field it may be en then again for 7th field it may be pa. Basically i wrote the code and it's working :- <script type="text/javascript"> //<![CDATA[ google.load("language", "1"); window.onload = function(){ var elemPostTitles = document.getElementsByTagName("h4"); var flag = true; for(var i = 0 ; i < elemPostTitles.length ; i++){ while(flag == false){ } var postTitleElem = elemPostTitles[i]; var postContentElem = document.getElementById("postContent_" + i); var postTitle = postTitleElem.innerHTML; var postContent = postContentElem.innerHTML; var languageCode = document.getElementById("languageCode_" + i).value; google.language.detect(postTitle, function(result) { if (!result.error && result.language) { google.language.translate(postTitle, result.language, languageCode, function(result) { flag = true; if (result.translation) { postTitleElem.innerHTML = result.translation; } }); } }); flag = false; } As you can see, what i am trying to do is restrict the loop from traversing until the result of previous ajax call is receieved. If i don't do this only the last field gets translated. My code works nicely, but because of the infinite loop, i keep getting errors from Mozilla to "stop executing scripts". How do i get rid of this? Also, is my approach correct? Or some inbuilt function is available which can ease my task? Thanks in advance :)

    Read the article

  • Magento config XML for adding a controller action to a core admin controller

    - by N. B.
    I'm trying to add a custom action to a core controller by extending it in a local module. Below I have the class definition which resides in magento1_3_2_2/app/code/local/MyCompany/MyModule/controllers/Catalog/ProductController.php class MyCompany_MyModule_Catalog_ProductController extends Mage_Adminhtml_Catalog_ProductController { public function massAttributeSetAction(){ ... } } Here is my config file at magento1_3_2_2/app/code/local/MyCompany/MyModule/etc/config.xml: ... <global> <rewrite> <mycompany_mymodule_catalog_product> <from><![CDATA[#^/catalog_product/massAttributeSet/#]]></from> <to>/mymodule/catalog_product/massAttributeSet/</to> </mycompany_mymodule_catalog_product> </rewrite> <admin> <routers> <MyCompany_MyModule> <use>admin</use> <args> <module>MyCompany_MyModule</module> <frontName>MyModule</frontName> </args> </MyCompany_MyModule> </routers> </admin> </global> ... However, https://example.com/index.php/admin/catalog_product/massAttributeSet/ simply yields a admin 404 page. I know that the module is active - other code is executing fine. I feel it's simply a problem with my xml syntax. Am I going about this the write way? I'm hesitant because I'm not actually rewriting a controller method... I'm adding one entirely. However it does make sense in that, the original admin url won't respond to that action name and it will need to be redirected. I'm using Magento 1.3.2.2 Thanks for any guidance.

    Read the article

  • Why does this MySQL function return null?

    - by Shore
    Description: the query actually run have 4 results returned,as can be see from below, what I did is just concate the items then return, but unexpectedly,it's null. I think the code is self-explanatory: DELIMITER | DROP FUNCTION IF EXISTS get_idiscussion_ask| CREATE FUNCTION get_idiscussion_ask(iask_id INT UNSIGNED) RETURNS TEXT DETERMINISTIC BEGIN DECLARE done INT DEFAULT 0; DECLARE body varchar(600); DECLARE created DATETIME; DECLARE anonymous TINYINT(1); DECLARE screen_name varchar(64); DECLARE result TEXT; DECLARE cur1 CURSOR FOR SELECT body,created,anonymous,screen_name from idiscussion left join users on idiscussion.uid=users.id where idiscussion.iask_id=iask_id; DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; SET result = ''; OPEN cur1; REPEAT FETCH cur1 INTO body, created, anonymous, screen_name; SET result = CONCAT(result,'<comment><body><![CDATA[',body,']]></body>','<replier>',if(screen_name is not null and !anonymous,screen_name,''),'</replier>','<created>',created,'</created></comment>'); UNTIL done END REPEAT; CLOSE cur1; RETURN result; END | DELIMITER ; mysql> DELIMITER ; mysql> select get_idiscussion_ask(1); +------------------------+ | get_idiscussion_ask(1) | +------------------------+ | NULL | +------------------------+ 1 row in set (0.01 sec) mysql> SELECT body,created,anonymous,screen_name from idiscussion left join users on idiscussion.uid=users.id where idiscussion.iask_id=1; +------+---------------------+-----------+-------------+ | body | created | anonymous | screen_name | +------+---------------------+-----------+-------------+ | haha | 2009-05-27 04:57:51 | 0 | NULL | | haha | 2009-05-27 04:57:52 | 0 | NULL | | haha | 2009-05-27 04:57:52 | 0 | NULL | | haha | 2009-05-27 04:57:53 | 0 | NULL | +------+---------------------+-----------+-------------+ 4 rows in set (0.00 sec) For those who don't think the code is self-explanatory: Why the function returns NULL?

    Read the article

  • JQuery code in ASP .NET content pages

    - by user2645830
    I have made a very simple sample project where I want to toggle an asp .net calendar control through jquery. Could anyone please point out why it is not working. I have made no changes to master page from the sample project provided for ASP .NET web application. <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication5._Default" %> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> <script type="text/javascript" src="scripts/jquery-1.4.1.min.js"> </script> <script language="javascript" type="text/javascript"> // <![CDATA[ function Button1_onclick() { alert( $('<%=Calendar1.ClientID%>')); $('<%=Calendar1.ClientID%>').toggle(); } // ]]> </script> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <h2> Welcome to ASP.NET! </h2> <p> To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">www.asp.net</a>. </p> <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" /> <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar> <p> You can also find <a href="http://go.microsoft.com/fwlink/? LinkID=152368&amp;clcid=0x409" title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>. </p> </asp:Content>

    Read the article

  • Reduce unwanted noise

    - by Rajeev
    In the below code sometimes when microphone is not connected some noise is generated and the system just keeps on buzzing the same sound.Whats wrong with the code below and how to reduce the unwanted noise. Should i set myMic.setLoopBack(false) in the below code <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="300" height="100" creationComplete="init()"> <mx:Script> <![CDATA[ import mx.controls.Alert; import flash.net.NetStream; private var myMic:Microphone; private var recordingState:String = "idle"; private function init():void { myMic = Microphone.getMicrophone(); myMic.setSilenceLevel(0); myMic.rate = 44; myMic.gain = 100; myMic.setUseEchoSuppression(true); micLevel.visible = true; //Security.showSettings(SecurityPanel.MICROPHONE); myMic.setLoopBack(true); if (myMic != null) { myMic.setUseEchoSuppression(true); micLevel.setProgress(myMic.activityLevel, 100); addEventListener(Event.ENTER_FRAME, showMicLevel); //micLevel.setProgress(myMic.activityLevel, 100); } } private function showMicLevel(event:Event):void{ switch (recordingState){ case "idle" : micLevel.setProgress(myMic.activityLevel, 100); break; } } ]]> </mx:Script> <mx:ProgressBar x="0" y="36" mode="manual" id="micLevel" label="" labelPlacement="bottom" width="100" fontSize="10" fontWeight="normal"/> </mx:Application>

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >