Search Results

Search found 204 results on 9 pages for 'roland lim'.

Page 5/9 | < Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >

  • Superfish: How to keep sub menu open after it has been clicked

    - by Roland
    I'm having the following scenario. I have a menu and if one hovers over the menu a sub menu appears and if mouse moves out the sub menu disappears, now I want the following if I click on the on a item in the sub menu, I want the sub-menu to remain open, when the new page has been loaded. I'm using superfish Jquery plugin for this. Is this possible and if how. my code in html <div id="nav"> <div id="nav2"> <ul class="sf-menu sf-navbar "> <li> <a title="HOME" class="sf-with-ul " href="/index.php?r=site/index&amp;sid=1">HOME</a> </li> </ul> <ul class="sf-menu sf-navbar"> <li> <a href="?sid=2" id="gallery" class="sf-with-ul selected_main">GALLERY</a> <ul class="subs" id="sub1"><li class="arrow"><img src="images/arrow.gif" /></li><li><a title="Kitchens" href="/index.php?r=images/sddsd&amp;id=1">Kitchens</a></li><li><a title="Vanities" href="/index.php?r=images/sddsd&amp;id=2">Vanities</a></li></ul> </li> </ul> <ul class="sf-menu sf-navbar "> <li> <a href="?sid=3" class="sf-with-ul " >ACCESSORIES</a> <ul class="subs" id=""><li class="arrow"><img src="images/arrow.gif" /></li><li><a title="Door Handles" href="/index.php?r=images/sddsd&amp;id=2">Door Handles</a></li><li><a title="Spanners" href="/index.php?r=images/sddsd&amp;id=1">Spanners</a></li></ul> </li> </ul> <ul class="sf-menu sf-navbar "> <li> <a title="CONTACT US" class="sf-with-ul " href="/index.php?r=site/contact&amp;sid=4">CONTACT US</a> </li> </ul> </div> </div> and then the superfish code $(function(){ $("ul.sf-menu").superfish({ delay: 0, speed: 'fast', autoArrows: false, dropShadows: false }); }); I've also noticed that the following css code is used to display the item left: 0; top: 2.5em; z-index: 99;

    Read the article

  • Widgets and .mobi sites, is this possible?

    - by Roland
    I have a couple of concerns, I'm busy building a normal .mobi site for a client, so basically how I understand this is keep it simply since most phones do not support JavaScript and have a small screen etc. So I build a mobi site using only content and basic links. Now my question is how do mobi widgets work on a mobile site? I've googled and could not find a answer? Is this possible at all?

    Read the article

  • Mysql Powerdns issue when adding a new CName record

    - by Roland
    I'm trying to add a new CNAME record in PowerDNS to the mysql database, but my website does not want to show. When adding it in via Zone Admin it works, but as soon as I add the record as below it just does not want to work. Am I doing something wrong here. I checked if my record looks exactly the same in the DB as the record added with PowerDNS and it does. $type = 'CNAME'; //Adding the subdomain to the DNS database $sql = "insert into records " . "(domain_id, name,type,content,ttl,prio,change_date) values("; $sql .= $domain_id . ",'"; $sql .= trim($subdomain).".". trim($domain) . "','"; $sql .= trim($type) . "','"; $sql .= trim($domain) . "',"; $sql .= "3600,0,'".time()."')";

    Read the article

  • echoing javascript when an ajax funtion is called

    - by Roland
    I'm doing a ajax call via the normal jquery ajax funtion My ajax looks as follows jQuery('#yt10').live('click',function(){jQuery.ajax({'data':{'set':$("#booking_set_id1").val(),'setStat':$("#booking_stockStatus").val(),'setNum':$("#booking_setNum").val()},'beforeSend':function(){ if($("#booking_set_id1").val() == "" || $("#booking_stockStatus").val() == "" || $("#booking_setNum").val() == ""){ $("#error").addClass("flash-error"); $("#error").html("Please fill in all relevant set details before adding a set"); return false; } },'dataType':'html','success':function(data,status){ $("#mainrow").show(); $("#error").removeClass("flash-error"); $("#error").html(""); $("#setTable tr:last").after(data); $("#booking_set_id1").val(""); $("#booking_stockStatus").val(""); $("#booking_setNum").val(""); },'url':'/booking/newSet','cache':false});return false;}); Now the function newSet needs to echo javascript to the bowser but somehow jquery filters the javscript out. Is it possible to echo javascript via ajax

    Read the article

  • Strange PHP reference bug

    - by Roland Soós
    Hello, I have a really strange bug with my PHP code. I have a recursive code which build up a menu tree with object and one of my customers server can't make it work. Contructor: function Menu(&$menus, &$keys , &$parent, &$menu){ ... if($keys === NULL){ $keys = array_keys($menus); } ... for($x = 0; $x < count($keys); $x++) { var_dump($keys); $menu = $menus[$keys[$x]]; var_dump($keys); if($this->id == $menu->pid){ $keys[$x] = NULL; $this->submenus[] = new Menu($menus, $keys, $this, $menu); } } First var_dump give me back the array, the second give back the first element of $menus. Do you have any idea what causes this? PHP version 5.2.3

    Read the article

  • JQuery timer, how do I do this

    - by Roland
    Is there anyway to implement a timer for JQuery, eg. every 10 seconds it needs to call a js function. I tried the following window.setTimeout(function() { alert('test'); }, 1000); but this only executes ones and then never again.

    Read the article

  • Detect the URI encoding automatically in Tomcat

    - by Roland Illig
    I have an instance of Apache Tomcat 6.x running, and I want it to interpret the character set of incoming URLs a little more intelligent than the default behavior. In particular, I want to achieve the following mapping: So%DFe => Soße So%C3%9Fe => Soße So%DF%C3%9F => (error) The bevavior I want could be described as "try to decode the byte stream as UTF-8, and if it doesn't work assume ISO-8859-1". Simply using the URIEncoding configuration doesn't work in that case. So how can I configure Tomcat to encode the request the way I want? I might have to write a Filter that takes the request (especially the query string) and re-encodes it into the parameters. Would that be the natural way?

    Read the article

  • Why 2 GB memory limit when running in 64 bit Windows ?

    - by Roland Bengtsson
    I'm a member in a team that develop a Delphi application. The memory requirements are huge. 500 MB is normal but in some cases it got out of memory exception. The memory allocated in that cases is typically between 1000 - 1700 MB. We of course want 64-bits compiler but that won't happen now (and if it happens we also must convert to unicode, but that is another story...). My question is why is there a 2 GB memory limit per process when running in a 64 bit environment. The pointer is 32 bit so I think 4 GB would be the right limit. I use Delphi 2007.

    Read the article

  • Ho to convert classname as string to a class ?

    - by Roland Bengtsson
    I have classnames in a stringlist. For example it could be 'TPlanEvent', 'TParcel', 'TCountry' etc. Now I want to find out the sizes by looping the list. It works to have: Size := TCountry.InstanceSize; But I want it like this: for i := 0 to ClassList.Count - 1 do Size := StringToClass(ClassList[i]).InstanceSize; Obviously my question is what to write instead of method StringToClass to convert the string to a class.

    Read the article

  • Detailed error on fopen

    - by Roland
    I'm using fopen to read from a file $fh = fopen($path, 'r') or die('Could not open file'); Now I contantly get error Could not open file. I checked the file path and even changed the permissions of the file to 777. Is there a way I can get a detailed error report as why the file can't be opened similar to mysql_error()?

    Read the article

  • IE8 (compatibility mode) won't load my Ajax content

    - by Jens Roland
    Hi all - I am working on a jQuery script on http://www.qxl.dk/ and I can't seem to get IE7 (or more accurately, IE8 in IE7 compatibility mode) to load my content. The sidebar box on the right named "QXL Aktuelt" loads its HTML content from an external file using Ajax load(), then triggers a custom jQuery event ("aktuelt_loaded") that starts a carousel script (like a scrolling newsticker). Several other content sections on the same page are loaded through Ajax and they work just fine, so I'm wondering what's going wrong. Everything works as expected in Firefox 3.6 and IE8, but not in IE8's compatibility mode. The script that loads the Ajax content is (inline on the page): <div id="qxlaktueltHolder"></div> <script type="text/javascript"> $("#qxlaktueltHolder").load("/contents/dk/modul/qxlaktuelt/qxlaktuelt.htm", function() { $("#qxlaktueltHolder").trigger("qxlaktuelt_loaded", []); }); </script> <script type='text/javascript' src='http://www.qxl.dk/contents/dk/js/jcarousellite_1.0.1.min.js'></script> <script type='text/javascript' src='http://www.qxl.dk/contents/dk/js/qxlaktuelt_liveload.js'></script> The external script that responds to the event is in the following file: http://www.qxl.dk/contents/dk/js/qxlaktuelt_liveload.js All ideas are very welcome.

    Read the article

  • Sending most correct mimetype

    - by Roland Franssen
    Hi all, I have a list of extension to mimetype in a INI file. However some extensions have multiple mimetypes, for example; midi[] = "application/x-midi" midi[] = "audio/midi" midi[] = "audio/x-mid" midi[] = "audio/x-midi" midi[] = "music/crescendo" midi[] = "x-music/x-midi" 6 (possible) mimetypes for 1 extension. Whats common practice to determine the correct mimetype? (e.g. i need to set a HTTP content-type header). I know its not ideal; determining mimetypes based on extension.. but i need consistent (cross-server) results (e.g. fileinfo extension in PHP is making terrible guesses*). * Some fileinfo results for example; js - text/plain css - text/c-h

    Read the article

  • Translate SQL to OCL ?

    - by Roland Bengtsson
    I have a piece of SQL that I want to translate to OCL. I'm not good at SQL so I want to increase maintainability by this. We are using Interbase 2009, Delphi 2007 with Bold and modeldriven development. Now my hope is that someone here both speaks good SQL and OCL :-) The original SQL: Select Bold_Id, MessageId, ScaniaId, MessageType, MessageTime, Cancellation, ChassieNumber, UserFriendlyFormat, ReceivingOwner, Invalidated, InvalidationReason, (Select Parcel.MCurrentStates From Parcel Where ScaniaEdiSolMessage.ReceivingOwner = Parcel.Bold_Id) as ParcelState From ScaniaEdiSolMessage Where MessageType = 'IFTMBP' and not Exists (Select * From ScaniaEdiSolMessage EdiSolMsg Where EdiSolMsg.ChassieNumber = ScaniaEdiSolMessage.ChassieNumber and EdiSolMsg.ShipFromFinland = ScaniaEdiSolMessage.ShipFromFinland and EdiSolMsg.MessageType = 'IFTMBF') and invalidated = 0 Order By MessageTime desc After a small simplification: Select Bold_Id, (Select Parcel.MCurrentStates From Parcel where ScaniaEdiSolMessage.ReceivingOwner = Parcel.Bold_Id) From ScaniaEdiSolMessage Where MessageType = 'IFTMBP' and not Exists (Select * From ScaniaEdiSolMessage EdiSolMsg Where EdiSolMsg.ChassieNumber = ScaniaEdiSolMessage.ChassieNumber and EdiSolMsg.ShipFromFinland = ScaniaEdiSolMessage.ShipFromFinland and EdiSolMsg.MessageType = 'IFTMBF') and invalidated = 0 NOTE: There are 2 cases for MessageType, 'IFTMBP' and 'IFTMBF'. So the table to be listed is ScaniaEdiSolMessage. It has attributes like: MessageType: String ChassiNumber: String ShipFromFinland: Boolean Invalidated: Boolean It has also a link to table Parcel named ReceivingOwner with BoldId as key. So it seems like it list all rows of ScaniaEdiSolMessage and then have a subquery that also list all rows of ScaniaEdiSolMessage and name it EdiSolMsg. The it exclude almost all rows. In fact the query above give one hit from 28000 records. In OCL it is easy to list all instances: ScaniaEdiSolMessage.allinstances Also easy to filter rows by select for example: ScaniaEdiSolMessage.allinstances->select(shipFromFinland and not invalidated) But I do not understand how I should make a OCL to match the SQL above.

    Read the article

  • Optimize SQL with Interbase

    - by Roland Bengtsson
    I was inspired by the good answers from my previous question about SQL. Now this SQL is run on a DB with Interbase 2009. It is about 21 GB in size. SELECT DistanceAsMeters, Bold_Id, Created, AddressFrom.CityName_CO as FromCity, AddressTo.CityName_CO as ToCity FROM AddrDistance LEFT JOIN Address AddressFrom ON AddrDistance.FromAddress = AddressFrom.Bold_Id LEFT JOIN Address AddressTo ON AddrDistance.ToAddress = AddressTo.Bold_Id Where DistanceAsMeters = 0 and PseudoDistanceAsCostKm = 0 and not AddrDistance.bold_id in (select bold_id from DistanceQueryTask) Order By Created Desc There are 840000 rows with AddrDistance 190000 rows with Address and 4 with DistanceQueryTask. The question is, can this be done faster? I guess, the same query is run many times select bold_id from DistanceQueryTask. Note that I'm not interested in stored procedures, just plain SQL :)

    Read the article

  • Calling a method within Portlet when submitting form

    - by Roland
    I have a Portlet that contains a form. Now what I want to achieve is the following. 1) A Porlet containing a form is called within a page via <?php $this->widget('form'); ?> 2) The user fills in this form and clicks on submit "The submit button should be an ajax button" 3) When submit has been pressed the form should call a method within the form portlet class and the form should be replaced with a Thank you message. 4) I only want the current view in the portlet replaced with another view. My portlet class looks like this Yii::import('zii.widgets.CPortlet'); class Polls extends CPortlet{ public $usr_id=''; public function init(){ $cs = Yii::app()->clientScript; $cs->registerCoreScript('jquery'); parent::init(); } protected function renderContent(){ $this->render('form'); } public function update(){ $this->render('thankyou'); } } } Any advise, help would be highly appreciated.

    Read the article

  • SQL2k8 T-SQL: Output into XML file

    - by Nai
    I have two tables Table Name: Graph UID1 UID2 ----------- 12 23 12 32 41 51 32 41 Table Name: Profiles NodeID UID Name ----------------- 1 12 Robs 2 23 Jones 3 32 Lim 4 41 Teo 5 51 Zacks I want to get an xml file like this: <graph directed="0"> <node id="1"> <att name="UID" value="12"/> <att name="Name" value="Robs"/> </node> <node id="2"> <att name="UID" value="23"/> <att name="Name" value="Jones"/> </node> <node id="3"> <att name="UID" value="32"/> <att name="Name" value="Lim"/> </node> <node id="4"> <att name="UID" value="41"/> <att name="Name" value="Teo"/> </node> <node id="5"> <att name="UID" value="51"/> <att name="Name" value="Zacks"/> </node> <edge source="12" target="23" /> <edge source="12" target="32" /> <edge source="41" target="51" /> <edge source="32" target="41" /> </graph> Thanks very much!

    Read the article

  • How can I share an OnEnter event for a TcxGrid ?

    - by Roland Bengtsson
    I want to standardize the behaviour on an Devexpress TcxGrid. So I have a unit ClientData with a event: procedure TClientData.grdOnEnter(Sender: TObject); begin mnuCxGridStandardMenu.Grid := TcxGrid(Sender); end; If I try to use that event from a TcxGrid.OnEnter event in another unit it refuse to work. If I paste in ClientData.grdOnEnter then a dialog says it is not an valid identifier. Is it possible to share an event for several units in Delphi 2007 ?

    Read the article

  • Replacing IFrame with div

    - by Roland
    I have a IFrame where I load in a custom search, and display the results within the iframe. The search results I obtain by calling an external url, that returns a value. I need to implement the same thing for a mobi site that works on mobile devices, and thus I need to replace the IFrame with something else. Will this be possible using a div tag, since most mobile devices do not support frames. And no javascript may be used. Any advice will be appreciated.

    Read the article

  • Mailer issue, PHP values do not change

    - by Roland
    I have a script that runs once every month and send out stats to clients, now the stats are displayed in normal text and in the shape of a Pie Graph, now if I run the script mannually from the command line all info on the graphs are correct, but when the cron job executes the script the values for the first client are displaying on the graphs of all clients. but the text is correct. I'm using domDocument to build the HTML and PHPMailer to send out the email with the Graphs embedded into the mail also use pChart to generate the Graph My code that generates the PIE graph is below include_once "pChart.1.26e/pChart/pData.class"; include_once "pChart.1.26e/pChart/pChart.class"; // Dataset definition unset($DataSet); $DataSet = new pData; $DataSet->AddPoint(array($data['total_clicks'],$remaining),"Serie1"); if($remaining < 0){ $DataSet->AddPoint(array("Clicks delivered todate","Clicks remaining = 0"),"Serie2"); }else{ $DataSet->AddPoint(array("Clicks delivered todate","Clicks remaining"),"Serie2"); } $DataSet->AddAllSeries(); $DataSet->SetAbsciseLabelSerie("Serie2"); // Initialise the graph $pie = new pChart(492,292); $pie->drawBackground(255,255,254); $pie->LineWidth = 1.1; $pie->Values = 2; // $pie->drawRoundedRectangle(5,5,375,195,5,230,230,230); //$pie->drawRectangle(0,0,480,288,169,169,169); $pie->drawRectangle(5,5,487,287,169,169,169); $pie->loadColorPalette('pChart.1.26e/color/tones-3.txt',','); // Draw the pie chart $pie->setFontProperties("pChart.1.26e/Fonts/calibrib.ttf",18); $pie->drawTitle(140,33,"Campaign Overview",0,0,0); $pie->setFontProperties("pChart.1.26e/Fonts/calibrib.ttf",11); $pie->drawTitle(343,125,"Total clicks : ".$total_clicks,0,0,0); $pie->setFontProperties("pChart.1.26e/Fonts/calibri.ttf",10); if($remaining < 0){ $pie->setFontProperties("pChart.1.26e/Fonts/calibrib.ttf",10); $pie->drawTitle(260,250,"Campaign over-delivered by ".substr($remaining,1)." clicks",205,53,53); $pie->setFontProperties("pChart.1.26e/Fonts/calibri.ttf",10); } $pie->drawPieLegend(328,140,$DataSet->GetData(),$DataSet->GetDataDescription(),255,255,255); $pie->drawPieGraph($DataSet->GetData(),$DataSet->GetDataDescription(),170,150,130,PIE_VALUE,FALSE,50,30,0); $pie->Render("generated/3dpie.png"); unset($pie); unset($DataSet); $mail->AddEmbeddedImage("/var/www/html/stats/generated/3dpie.png","5"); I just can't understand why this only happens when the cronjob runs?

    Read the article

  • Comparing 2 mysql tables and updating only records that have changed

    - by Roland
    I have the following. Two mysql tables. I want to copy info that has changed from table a to b. For example if row 1 column 2 has changed in table a I want to only update that column in table b. Table b is not the same as a but has same columns that also exist in a. The other solution I have is to just clear table b and replace it with the contents from table a, the problem with this could be that the script will take longer to execute, since there are more than 10000 records. Any advise for which method would work the best will be highly appreciated

    Read the article

  • working as expectedJQuery load function with fading effects not working as expected

    - by Roland
    I have the following scenario jQuery('#content').fadeOut('slow',function(){ jQuery('#content').load("detail.php?product="+imgID+"&category="+cat); jQuery('#content').fadeIn('fast'); }); My problem however is that all the effects happen and when the effects are done, then only the contents of the PHP file loads into content, is there a better way so that the content is not slow in loading

    Read the article

  • Why is this exception thrown in the visual studio C compiler?

    - by Shane Larson
    Hello. I am trying to get more adept and my C programming and I was attempting to test out displaying a character from the input stream while inside of the loop that is getting the character. I am using the getchar() method. I am getting an exception thrown at the time that the printf statement in my code is present. (If I comment out the printf line in this function, the exception is not thrown). Exception: Unhandled exception at 0x611c91ad (msvcr90d.dll) in firstOS.exe: 0xC0000005: Access violation reading location 0x00002573. Here is the code... Any thoughts? Thank you. PS. I am using the stdio.h library. /*getCommandPromptNew - obtains a string command prompt.*/ void getCommandPromptNew(char s[], int lim){ int i, c; for(i=0; i < lim-1 && (c=getchar())!=EOF && c!='\n'; ++i){ s[i] = c; printf('%s', c); } }

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >