Search Results

Search found 523 results on 21 pages for 'h3'.

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

  • Destroying descendants for dojox.layout.ContentPane

    - by Luigi
    Hi, I just want to clean all the content of my dojox pane before load another page. There is an attribute called cleanContent that seems not working. Anyway this is a jsp page I import: <head> <script type="text/javascript" src="./js/listMetadataClass.js"></script> <script type="text/javascript" src="./js/utility.js"></script> <link rel="stylesheet" type="text/css" href="../dojo/dijit/themes/tundra/tundra.css"> <link rel="stylesheet" type="text/css" href="../dojo/dojox/grid/resources/tundraGrid.css"> </head> <div dojoType="dijit.layout.ContentPane"> <h3>List of existing Metadata Class:</h3> <table id="gridNode" style="width:auto; height:300px;"></table> <div id="dialogNode"></div> </div> Anyway is this the correct way to import a page inside the dojox pane? Thanks Luigi

    Read the article

  • flickr api advice

    - by sico87
    Hi There, I am working with the API from flickr trying to get my photosets into my site, my problem is I am wanting to only show the primary image for each set but current it is showing all the images from each of my sets. Can anyone see where I am going wrong? <?php $f = new phpFlickr(FLICKR_API_KEY); $f->enablecache("fs", $_SERVER['DOCUMENT_ROOT']. '/../system/cache'); $result = $f->people_findByusername(FLICKR_USERNAME); $user = $result['id']; $photosets = $f->photosets_getList($user); $count = 1; foreach ($photosets['photoset'] as $ph_set): ?> <li> <h2>Images</h2> <h2>Videos</h2> <?php $photoset_id = $ph_set['id']; $photos = $f->photosets_getPhotos($photoset_id); foreach ($photos['photoset']['photo'] as $photo): ?> <a rel="lightbox[album<?=$count;?>]" href="<?= $f->buildPhotoURL($photo, 'medium') ?>" title="<?= $photo['title'] ?>"> <img src="<?= $f->buildPhotoURL($photo, 'rectangle') ?>" alt="<?= $photo['title'] ?>" width="210" height="160" title="<?= $photo['title'] ?>" /> <h3><?=$ph_set['title']?></h3> <p><?=$ph_set['description'];?></p> </a> <?php endforeach; ?> </li> <?php $count++; ?> <?php endforeach; ?>

    Read the article

  • LINQ-to-XML selection based on node values, newbie question

    - by mmcglynn
    Given the following XML, I would like to return all eventtitles where the eventtype id = 23. My current query only looks at the first eventtype, so returns the wrong result. <event> <eventtitle>Garrison Keillor</eventtitle> <eventtypes> <eventtype id="24"/> <eventtype id="23"/> </eventtypes> </event> <event> <eventtitle>Joe Krown Trio featuring Walter Wolfman Washington</eventtitle> <eventtypes> <eventtype id="23"/> </eventtypes> </event> LINQ query: Dim query = _ From c In calXML...<event> _ Where c...<eventtypes>.<eventtype>.@id = "23" _ Select c.<eventtitle>.Value, c.<eventlocation>.Value For Each item In query Response.Write("<h3>" & item.eventtitle & "</h3>") Response.Write(item.eventlocation & "<br />") Next

    Read the article

  • Rails 3.2 Ajax Update Div when Text Field Populated

    - by ctilley79
    In the end I would like a text field that passes a client_id to the partial. I would like to do this asynchronously so the shipment_products partial would dynamically change when the textfield value was updated. What is the best way to do this? In index.html.erb <!-- Text Field Here--> <div id="available_products"> <%= render "shipment_products" %> </div> In _shipment_products.html.erb <div id="shipment_products_container"> <h3>Assign Products to Ship<\h3> <ul class="shipment_products" id="shipment_products"> <% Product.by_client(client_id).each do |product|%> <!-- TextField value passed here --> <%= content_tag_for :li, product, :value => product.id do %> <%= hidden_field_tag("shipment[product_ids][]", product.id) %> <%= product.product_name %> <% end %> <% end %> <\ul> </div> This is similar to what I want in the end.

    Read the article

  • Using jQuery to parse an RSS feed, having trouble in firefox and chrome.

    - by sjmarshy
    I used a jQuery library called jFeed to parse and display my blogs rss feed on my personal website. It worked perfectly well at first, but upon checking later it simply displays nothing, except in Internet Explorer, where it seems to work fine. After checking the javascript console using Firebug in Firefox, it shows an error in the 'XML' tab as follows: XML Parsing Error: no element found Location: moz-nullprincipal:{3f8a0c62-32b4-4f63-b69c- 9ef402b40b64} Line Number 1, Column 1: ^ Though I have no idea what to do with this information. Here is the code I used to get the rss feed and display it (it is almost exactly the same as the example provided by the jFeed website): jQuery.getFeed({ url: 'http://sammarshalldesign.co.uk/blog/wordpress/?feed=rss2', success: function(feed) { var html = ''; for(var i = 0; i < feed.items.length && i < 5; i++) { var item = feed.items[i]; html += '<h3>' + '<a href="' + item.link + '">' + item.title + '</a>' + '</h3>'; html += '<div>' + item.description + '</div>'; }//end for jQuery('#feed').append(html); }//end feed function });//end getfeed Any help would be really appreciated.

    Read the article

  • PHP - CodeIgniter

    - by nXqd
    I try to write a site with CodeIgniter but I've a problem with PHP. I'm sure that it's so simple and can't be wrong. But I don't know bugs from , just a newbie of CodeIgniter :) <html> <head> <title><?=$page_title?></title> </head> <body> <?php foreach($result as $row):?> <h3><? echo $row->title; ?></h3> <p><? echo $row->text; ?></p> <?php endforeach;?> </body> </html> I've a bug from this file : A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: views/helloworld_view.php Line Number: 6 thanks in advance for reading this :)

    Read the article

  • Symfony file upload - "Array" stored in database instead of the actual filename

    - by Guillaume Flandre
    I'm using Symfony 1.4.4 and Doctrine and I need to upload an image on the server. I've done that hundreds of times without any problem but this time something weird happens : instead of the filename being stored in the database, I find the string "Array". Here's what I'm doing: In my Form: $this->useFields(array('filename')); $this->embedI18n(sfConfig::get('app_cultures')); $this->widgetSchema['filename'] = new sfWidgetFormInputFileEditable(array( 'file_src' => '/uploads/flash/'.$this->getObject()->getFilename(), 'is_image' => true, 'edit_mode' => !$this->isNew(), 'template' => '<div id="">%file%</div><div id=""><h3 class="">change picture</h3>%input%</div>', )); $this->setValidator['filename'] = new sfValidatorFile(array( 'mime_types' => 'web_images', 'path' => sfConfig::get('sf_upload_dir').'/flash', )); In my action: public function executeIndex( sfWebRequest $request ) { $this->flashContents = $this->page->getFlashContents(); $flash = new FlashContent(); $this->flashForm = new FlashContentForm($flash); $this->processFlashContentForm($request, $this->flashForm); } protected function processFlashContentForm($request, $form) { if ( $form->isSubmitted( $request ) ) { $form->bind( $request->getParameter( $form->getName() ), $request->getFiles( $form->getName() ) ); if ( $form->isValid() ) { $form->save(); $this->getUser()->setFlash( 'notice', $form->isNew() ? 'Added.' : 'Updated.' ); $this->redirect( '@home' ); } } } Before binding my parameters, everything's fine, $request->getFiles($form->getName()) returns my files. But afterwards, $form->getValue('filename') returns the string "Array". Did it happen to any of you guys or do you see anything wrong with my code? Edit: I added the fact that I'm embedding another form, which may be the problem (see Form code above).

    Read the article

  • Opacity CSS not working in IE8

    - by Alistair Christie
    I'm using CSS to indicate the trigger text for a jQuery slide-down section: i.e. when you hover over the trigger text the cursor changes to a pointer and the opacity of the trigger text is reduced to indicate that the text has a click action. This works fine in Firefox and Chrome, but in IE8 the opacity doesn't change. I've tried a variety of CSS settings without any success. For example HTML: <h3 class="slidedownTrigger">This is the trigger text</h3> CSS: .slidedownTrigger {     cursor: pointer;     -ms-filter: “progid:DXImageTransform.Microsoft.Alpha(Opacity=75)”;     filter: alpha(opacity=75);     -khtml-opacity: 0.75;     -moz-opacity: 0.75;     opacity: 0.75; } What's stopping IE changing the opacity? Note: I've tried this on a variety of different elements, swapping round the order of the CSS statements, and just using the IE ones on their own. I've also tried using -ms-filter: "alpha(opacity=75)"; but with no success. I've run out of things to try to get opacity modification working in IE8. Any ideas?

    Read the article

  • Three Checkboxes, One must be selected to enable submit button, needs Jquery?

    - by Jamie
    I have between 1-three checkboxes and by default they are all disabled. In order for the submit button to be active ove checkbox minumum must be selected. Can someone help me with a jquery snippet to achieve this? My markup looks like this and the site used jquery 1.42. Please and thankyou! <form action="/cart/add" method="post" id="pform"> <h3 class="goudy">Make your selection:</h3> <ul id="variants"> <li> <input type="checkbox" name="id[]" value="39601622" id="radio_39601622" style="vertical-align: middle;" class="required" /> <label for="radio_39601622[]">$38.00 - Original Antique Photo</label> </li> <li> <input type="checkbox" name="id[]" value="39601632" id="radio_39601632" style="vertical-align: middle;" class="required" /> <label for="radio_39601632[]">$8.99 - SCAN</label> </li> <li> <input type="checkbox" name="id" value="39777962" id="radio_39777962" style="vertical-align: middle;" class="required" /> <label for="radio_39777962">$2.99 - Rigid Sleeve</label> </li> </ul> <div class="buttons clearfix"> <input type="image" src="../images/add-to-cart.png" name="add" value="Add to Cart" id="add" class="send-to-cart" /> </div> </form>

    Read the article

  • Php sting handling triks

    - by Dam
    Hi my question Need to get the 10 word before and 10 words after for the given text . i mean need to start the 10 words before the keyword and end with 10 word after the key word. Given text : "Twenty-three" The main trick the having some html tags tags need to keep that tag with this content only the words from 10before - 10after content is bellow : <div id="hpFeatureBoxInt"><h2><span class="dy">Top News Story</span></h2><h3><a href="/go/homepage/i/int/news/world/1/-/news/1/hi/world/europe/8592190.stm">Suicide bombings hit Moscow Metro</a></h3><p>Past suicide bombings in Moscow have been blamed on Islamist rebels At least 35 people have been killed after two female suicide bombers blew themselves up on Moscow Metro trains in the morning rush hour, officials say.<img height="150" width="201" alt="Emergency services carry a body from a Metro station in Moscow (29 March 2010)" src="http://wwwimg.bbc.co.uk/feedengine/homepage/images/_47550689_moscowap203_201x150.jpg">Twenty-three died in the first blast at 0756 (0356 GMT) as a<a href="#"> train stood </a>at the central Lubyanka station, beneath the offices of the FSB intelligence agency.About 40 minutes later, a second explosion ripped through a train at Park Kultury, leaving another 12 dead.No-one has said they carried out the worst attack in the capital since 2004. </p><p id="fbilisten"><a href="/go/homepage/i/int/news/heading/-/news/">More from BBC News</a></p></div> Thank you

    Read the article

  • CSS 3 - Scaling CSS Transitions

    - by Viv Shc
    I am trying to scale an image when you mouseenter, which is working. I would like the image to gradually scale up with an ease transition. I used ease-in-out, which it's not working. Any suggestions? Also, I used addClass & removeClass twice in the jquery code. Is there a way to only use it once? Thanks! <style> .image { opacity: 0.5; } .image.opaque { opacity: 1; } .size{ transform:scale(1.2); -ms-transform:scale(1.2); /* IE 9 */ -webkit-transform:scale(1.2); /* Safari and Chrome */ -webkit-transition: scale 2s ease-in-out; -moz-transition: scale 2s ease-in-out; -o-transition: scale 2s ease-in-out; -ms-transition: scale 2s ease-in-out; transition: scale 2s ease-in-out; transition: opacity 2s; } </style> <script> $(document).ready(function() { $(".image").mouseenter(function() { $(this).addClass("opaque"); $(this).addClass("size"); }); $(".image").mouseleave(function() { $(this).removeClass("opaque"); $(this).removeClass("size"); }); }); <div id="gallery"> <h3>Gallery of images</h3> <img class="image" src="images/gnu.jpg" height="200px" width="250px"> <img class="image" src="images/tiger.jpg" height="200px" width="250px"> <img class="image" src="images/black_rhino.jpg" height="200px" width="250px"> <img class="image" src="images/cape_buffalo.jpg" height="200px" width="250px"> </div>

    Read the article

  • A really smart rails helper needed

    - by Stefan Liebenberg
    In my rails application I have a helper function: def render_page( permalink ) page = Page.find_by_permalink( permalink ) content_tag( :h3, page.title ) + inline_render( page.body ) end If I called the page "home" with: <%= render_page :home %> and "home" page's body was: <h1>Home<h1/> bla bla <%= render_page :about %> <%= render_page :contact %> I would get "home" page, with "about" and "contact", it's nice and simple... right up to where someone goes and changes the "home" page's content to: <h1>Home<h1/> bla bla <%= render_page :home %> <%= render_page :about %> <%= render_page :contact %> which will result in a infinite loop ( a segment fault on webrick )... How would I change the helper function to something that won't fall into this trap? My first attempt was along the lines of: @@list = [] def render_page( permalink ) unless @@list.include?(permalink) @@list += [ permalink ] page = Page.find_by_permalink result = content_tag( :h3, page.title ) + inline_render( page.body ) @@list -= [ permalink ] return result else content_tag :b, "this page is already being rendered" end end which worked on my development environment, but bombed out in production... any suggestions? Thank You Stefan

    Read the article

  • xml appending issue

    - by 3gwebtrain
    Any one help me? i have the xml with 2 steps. example : Type of Company: Architects may be self-employed. Workspace – Indoors/outdoors: Architects work both. Environment Travel: Architects often visit construction sites to review the progress of projects. People: They work a lot with other professionals involved in the construction project including engineers, contractors, surveyors and landscape architects. Casual: They usually work in a casual and comfortable environment. Hours: The hours are varied based on the project they are working on. Physically demanding: They stand on their feet. Tools: Computers - Architects Assist clients in obtaining construction bids Observe, inspect and monitor building work in my funcation i am using "list.each" to append to ul+index. it works fine. And my problem is while i append the "list.each", the "sublistgroup" should not append to "list.each", insted the "sublistgroup" need to make "ul" and in the ul i need the "sublist" became childrens.. my code is here... i konw that, i am doing some wrong way.. pls any one correct it and let me know.. $(function(){ $.get('career-utility.xml',function(myData){ $(myData).find('listgroup').each(function(index){ var count = index; var listGroup = $(this); var listGroupTitle = $(this).attr('title'); var shortNote = $(this).attr('shortnote'); var subLink = $(this).find('sublist'); var firstList = $(this).find('list'); $('.grouplist').append('<div class="list-group"><h3>'+listGroupTitle+'</h3><ul class="level-one level' + count + '"></ul></div>'); firstList.each(function(listnum){ var subList = $(this).text(); var subListLeveltwo = $(this).find('sublist').text(); if(subListLeveltwo==''){ $('<li>'+subList+'</li>').appendTo('ul.level'+count+''); } else{ $('<li class="new">'+subList+'</li>').appendTo('ul.level'+count+''); } }) }) }) })

    Read the article

  • jQuery .change() on Radio Button

    - by Denis Hoctor
    Hi folks, I must be missing something obvious here... I can't get .change() to fire on radio buttons? I have the code below live here! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Radio Button jQuery Change</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> console.log("parsed"); $("input[name='rdio']").change(function() { console.log("changed"); if ($("input[name='rdio']:checked").val() == 'a') $("output").text("a changed"); else if ($("input[name='rdio']:checked").val() == 'b') $("output").text("b changed"); else $("output").text("c changed"); }); </script> </head> <body> <div> <input type="radio" name="rdio" value="a" checked="checked" /> a <br/> <input type="radio" name="rdio" value="b" /> b <br/> <input type="radio" name="rdio" value="c" /> c </div> <h3>Output:</h3> <div id="output"></div> </body> </html> Can anyone see what I've missed? Thanks, Denis

    Read the article

  • Using phpFlickr, how would one display the primary photo from each photoset?

    - by Michael
    Referring to this question: http://stackoverflow.com/questions/2561475/flickr-phpflickr-api how would you display a primary photo from a photoset rather than all photos and photosets? this is the code I have so far: photosets_getList($user); ? <?php $photoset_id = $ph_set['id']; $photos = $f->photosets_getPhotos($photoset_id); foreach ($photos['photoset']['photo'] as $photo): ?> <?php if($parentID == $ph_set['parent']): ?> <a rel="lightbox[album<?=$count;?>]" href="<?= $f->buildPhotoURL($photo, 'medium') ?>" title="<?= $photo['title'] ?>"> <?php endif;?> <img src="<?= $f->buildPhotoURL($photo, 'square') ?>" alt="<?= $photo['title'] ?>" width="75" height="75" title="<?= $photo['title'] ?>" /> <h3><?=$ph_set['title']?></h3> <?php if($parentID == $ph_set['parent']): ?> </a> </div> <?php endif;?>

    Read the article

  • django url user id versus userprofile id problem

    - by dana
    hello there, i have a mini comunity where each user can search and find another user profile. Userprofile is a class model, indexed differently compared to user model class (user id is not equal to userprofile id) But i cannot see a user profile by typing in the url the corresponding id. I only see the profile of the currently logged in user. Why is that? I'd also want to have in my url the username (a primary key of the user table also) and NOT the id (a number). The guilty part of the code is: what can i replace that request.user with so that it wil actually display the user i searched for, and not the currently logged in? def profile_view(request, id): u = UserProfile.objects.get(pk=id) cv = UserProfile.objects.filter(created_by = request.user) blog = New.objects.filter(created_by = request.user) return render_to_response('profile/publicProfile.html', { 'u':u, 'cv':cv, 'blog':blog, }, context_instance=RequestContext(request)) in urls (of the accounts app): url(r'^profile_view/(?P<id>\d+)/$', profile_view, name='profile_view'), and in template: <h3>Recent Entries:</h3> {% load pagination_tags %} {% autopaginate list 10 %} {% paginate %} {% for object in list %} <li>{{ object.post }} <br /> Voted: {{ vote.count }} times.<br /> {% for reply in object.reply_set.all %} {{ reply.reply }} <br /> {% endfor %} <a href=''> {{ object.created_by }}</a> <br /> {{object.date}} <br /> <a href = "/vote/save_vote/{{object.id}}/">Vote this</a> <a href="/replies/save_reply/{{object.id}}/">Comment</a> </li> {% endfor %} thanks in advance!

    Read the article

  • jquery Append Issue

    - by 3gwebtrain
    I am getting the append issue with this code. In my xml i go 2 no. of "listgroup" and jquery print propelry. but within the earch "listgroup", first group contain 6 points and second group contain 6 point. these 2 section has to print separately to 'ul' element. But my problem is first time while it print itself both 12points in first ul i am getting and it print 6 pint to second ul propelry.. what i want is, first ul has to have 6 points and second has6 point what it has in the xml tree... $(function(){ $.get('career-utility.xml',function(myData){ $(myData).find('listgroup').each(function(index){ var listGroup = $(this); var listGroupTitle = $(this).attr('title'); var shortNote = $(this).attr('shortnote'); var subLink = $(this).find('sublist'); var firstList = $(this).find('list'); $('.grouplist').append('<div class="list-group"><h3>'+listGroupTitle+'</h3><ul class="level">'+index+'</ul></div>'); $(this).children().each(function(num){ var text = $(this).text(); $('<li>'+text+'</li>').appendTo('ul.level'); }) }) }) })

    Read the article

  • Checking parameter classes in PHP

    - by Professor Elm
    At the moment, I have the following: <?php if ($custom != ""): ?> <div class="head-row5" id="custom"> <?php print $custom?> </div><?php //head-row5 ?> <?php endif; ?> What is returned is something like.... <div class="block block-block" id="block-block-15"> <div class="title"> <h3></h3> </div> <div class="content"><p style="text-align: center;"><a href="website linkage" id="T2roll"><span class="alt">Name of the linked page</span></a></p> </div> What I'm trying to do is find a way to print this out ONLY if the is true. How would I go about doing this? I believe that I'm going to have to check the elements by class of this $custom parameter. However, I have no idea how to go about doing this.

    Read the article

  • sending email in php unable to use HTML tags

    - by JPro
    I am trying to send an email through the result sets generated in MySQL in PHP This is the code. <?php $txtMsg = '<table><th>Name</th>'; $txtMsg = ''; mysql_connect("localhost", "root", "pop") or die(mysql_error()); mysql_select_db("jpd") or die(mysql_error()); $oustanding = mysql_query("select Name from results") or die(mysql_error()); $num=mysql_num_rows($oustanding); while($row1 = mysql_fetch_array( $oustanding )) { ?> <tr> <td><h3><?php echo $row1['Name']; ?></h3></td> </tr> <?php $txtMsg .= "<tr><td>".$row1['Name']."</td></tr>"; } ini_set ( "SMTP", "xy.domain.com" ); $mail_to= '[email protected]'; $mail_from='[email protected]'; $mail_sub='OutStanding Results'; $mail_mesg=$txtMsg; //Check for success/failure of delivery if(mail($mail_to,$mail_sub,$mail_mesg,"From: $mail_from")) echo "<br><br>Email Successfully Sent!"; else echo "<br><br>Error Sending Email!"; } ?> The problem is , I want the results to be displayed in table format. But instead of processing the html tags, they are getting printed as well. How to get the email with table format? Thanks.

    Read the article

  • Javascript "this" variable confusion

    - by Assaf M
    Hi I am currently reading the book "Javascript: The Good Parts" and was playing with Functions. I produced a test script to test some properties and I am somewhat confused by the results. Here is the code: <h3>Object</h3> <div style="padding-left: 10px;"> <script type="text/javascript"> function outterF() { document.writeln("outterF.this = " + this + "<br>"); function innerF() { document.writeln("innerF.this = " + this + "<br>"); return this; }; var inner = innerF(); return this; } document.writeln("<b>From Inside:</b><br>"); var outF = outterF(); var inF = outF.inner; document.writeln("<br>"); document.writeln("<b>From Outside:</b><br>"); document.writeln("outterF.this = " + outF + "<br>"); document.writeln("innerF.this = " + inF + "<br>"); </script> </div> Result is: Object From Inside: outterF.this = [object Window] innerF.this = [object Window] From Outside: outterF.this = [object Window] innerF.this = undefined Notice that outF.inner returns "undefined", is that some kind of a language bug? Obviously, outF.inner points to Window object that has nothing to do with my object but shouldn't it be at least pointing to a Function object instead? Thanks -Assaf

    Read the article

  • Devise routes /:param not working

    - by Jacob Schatz
    Using devise 2.1.0 I am trying to send the new registration page a PricingPlan model. So in my routes I have: devise_scope :user do delete "/logout" => "devise/sessions#destroy" get "/login" => "devise/sessions#new" get "/signup/:plan" => "devise/registrations#new" end And I override the devise registration controller. With this in my routes.rb to make it work: devise_for :users, :controllers => {:registrations => "registrations"} In my actual Registration controller which overrides Devise's controller I have: class RegistrationsController < Devise::RegistrationsController view_paths = "app/views/devise" def new super @plan = PricingPlan.find_by_name(params[:plan]) end So that the default views still go to devise.... In my new view for the registration controller I call this: <h3>You've chosen the <%= @plan.name %> plan.</h3> And I get this error: undefined method `name' for nil:NilClass Also... in my PricingPlan model: class PricingPlan < ActiveRecord::Base has_many :users And in my User model: class User < ActiveRecord::Base belongs_to :pricing_plan I'm rather new at rails.

    Read the article

  • PHP - "Fat Free Framework" Find Methods and Showing Results in Template

    - by user1672808
    Just started trying the "Fat Free Framework" I'm building a site using a MySQL DB with 265 fields, and 5000+ rows in the DB; I can load() a specific record easily, no problems. When using find(), afind(), and even "select()", template will show blank lines or lines with "filler" text, with the correct number of rows for the query results, but no text/data from the DB itself; Same problem whether using objects or simply arrays from result (afind() and find()). I've copied/pasted the code verbatim from examples and from documentation, with only the DB specific items changed. Still, no luck. CODE IN PHP FILE (function from CLASS): static function home() { $featured=new Axon('boats'); $F3::set('boatlist',$featured->afind('D_CustomerID=173')); F3::set('content',TEMPLATE_DIR .'/home.html'); echo Template::serve(TEMPLATE_DIR .'/layout.html'); } TEMPLATE home.html: <div class="span8"> <h3> Featured Boats </h3> <F3:repeat group="{{@boatlist}}" value="{{@boat}}"> <div style="margin-left: 2em" class="thumbnails"> <p> <a href="boat/{{@boat['D_BoatNum']}}">{{trim(@boat['D_Description'])}}</a> by {{@boat['D_CustomerID']}} </p> <p> {{@boat['D_Price']}} </p> </div> </F3:repeat> </div> The number of rows this produces coincides with the correct number of rows in the DB. However, the actual data from each field does not show. Any ideas?

    Read the article

  • c#: how do i search for a string with quotes

    - by every_answer_gets_a_point
    i am searching for this string: <!--m--><li class="g w0"><h3 class=r> within the html source of this link: "http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=Santarus Inc?" this is how i am searching for it: d=html.IndexOf(@"<!--m--><li class=""g w0""><h3 class=r><a href=""",1); for some reason it is finding an occurence of it that is incorrect. (it says that it is at position 45 (another words d=45) but this incorrect here are the first couple hundred characters of the string html: <!doctype html><head><title>Santarus Inc&#8206; - Google Search</title><script>window.google={kEI:\"b6jES5nPD4rysQOokrGDDQ\",kEXPI:\"23729,24229,24249,24260,24414,24457\",kCSI:{e:\"23729,24229,24249,24260,24414,24457\",ei:\"b6jES5nPD4rysQOokrGDDQ\",expi:\"23729,24229,24249,24260,24414,24457\"},ml:function(){},kHL:\"en\",time:function(){return(new Date).getTime()},log:function(b,d,c){var a=new Image,e=google,g=e.lc,f=e.li;a.onerror=(a.onload=(a.onabort=function(){delete g[f]}));g[f]=a;c=c||\"/gen_204?atyp=i&ct=\"+b+\"&cad=\"+d+\"&zx=\"+google.time();a.src=c;e.li=f+1},lc:[],li:0,Toolbelt:{}};\nwindow.google.sn=\"web\";window.google.timers={load:{t:{start:(new Date).getTime()}}};try{}catch(u){}window.google.jsrt_kill=1;\n</script><style>body{background:#fff;color:#000;margin:3px 8px}#gbar,#guser{font-size:13px;padding-top:1px !important}#gbar{float:left;height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh

    Read the article

  • Post method in Servlet is not being called again after being executed once

    - by SaurabhCsIITKgp
    I am implementing a database based web application using servlets. Now, when I input a parameter using a form in the jsp page, it redirects it to a servlet which subsequently adds the value to the database (the servlet creates a new table if the table doesn't already exist). The creation of the table and the addition of value works fine if the table doesn't already exists. Once it is created however and the parameter is inputted again in the form, the submit button no longer redirects it to the servlet. Nor is the value added to the database. Kindly advise me as to where I am going wrong. Following are the snippets of my code: From the JSP page (/showmanager is the urlpattern of the servlet): <form action="showmanager" method="post"> <h3>Enter name of the show: </h3> <input type="text" name="showname" value=""> <input type="hidden" name="task" value="addshow" /> <input type="button" value="Add Show"> </form> From the servlet (POST method): p rotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if(request.getParameter("task").equals("addshow")){ this.addShow(request.getParameter("showname")); response.sendRedirect("showmanager.jsp"); } } Method to add in database: protected boolean addShow(String showname){ try{ statement =con.prepareStatement("INSERT INTO showdb10(name) VALUES ('"+showname+"')"); if(statement.executeUpdate()>0){ return true; } } catch(Exception e) { try{ statement =con.prepareStatement("create table showdb10 (id int NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, date varchar(20),time varchar(20), b_total int, o_total int, b_avbl int, o_avbl int, b_price double(10,2), o_price double(10,2), seat_no varchar(20), transaction_id varchar(255), total_sales double(10,2), paymnt_artists double(10,2), paymnt_othr double(10,2), flag varchar(20), PRIMARY KEY(id))"); statement.executeUpdate(); statement =con.prepareStatement("INSERT INTO showdb10(name) VALUES ('"+showname+"')"); if(statement.executeUpdate()>0){ return true; } }catch(Exception e2){} } return false; }

    Read the article

  • A really smart rails helper needed

    - by Stefan Liebenberg
    In my rails application I have a helper function: def render_page( permalink ) page = Page.find_by_permalink( permalink ) content_tag( :h3, page.title ) + inline_render( page.body ) end If I called the page "home" with: <%= render_page :home %> and "home" page's body was: <h1>Home<h1/> bla bla <%= render_page :about %> <%= render_page :contact %> I would get "home" page, with "about" and "contact", it's nice and simple... right up to where someone goes and changes the "home" page's content to: <h1>Home<h1/> bla bla <%= render_page :home %> <%= render_page :about %> <%= render_page :contact %> which will result in a infinite loop ( a segment fault on webrick )... How would I change the helper function to something that won't fall into this trap? My first attempt was along the lines of: @@list = [] def render_page( permalink ) unless list.include?(permalink) @@list += [ permalink ] page = Page.find_by_permalink content_tag( :h3, page.title ) + inline_render( page.body ) @@list -= [ permalink ] else content_tag :b, "this page is already being rendered" end end which worked on my development environment, but bombed out in production... any suggestions? Thank You Stefan

    Read the article

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