Help with Spry Rating Widget within a Spry Repeating Region

My link  http://www.youthinkyougotitbad.com
This is a long question, but it seems to me if answered somewhere it could help alot of people in the spry community creating comment boards as it uses three important spry widgets: rating, repeating, and tabbed panels. I am trying to use spry rating widget within a spry repeating region within a spry tabbed panel with xml. I was trying to go with the pulse light script (http://forums.adobe.com/message/3831721#3831721) but Gramps told me about the spry rating widget. But I have ran into a couple more problems. First, I couldnt find that much information on the forums or online about how to do the php page with the spry rating widget. None of these have any information on how to do it:
http://labs.adobe.com/technologies/spry/articles/rating_overview/index .html
http://labs.adobe.com/technologies/spry/articles/data_api/apis/rating. html
http://labs.adobe.com/technologies/spry/samples/rating/RatingSample.ht ml
And it seems that the official examples are so poor (or I am just ignorant, which def could be a possiblity) it shows
to set the initial rating value from the server, but uses a static value of 4
http://labs.adobe.com/technologies/spry/samples/rating/RatingSample.html
<span id="initialValue_dynamic" class="ratingContainer">
         <span class="ratingButton"></span>
         <span class="ratingButton"></span>
         <span class="ratingButton"></span>
         <span class="ratingButton"></span>
         <span class="ratingButton"></span>      
         <input id="spryrating1_val" type="text" name="spryrating1" value="4" readonly="readonly" />
         <span class="ratingRatedMsg sample">Thanks for your rating!</span>
</span>
<script>
var initialValue_dynamic = new Spry.Widget.Rating("initialValue_dynamic", {ratingValueElement:'spryrating1_val'});
</script>
I finally found a site that has the php and mysql setup.
http://www.pixelplant.ro/en/articles/article-detail/article/adobe-widgets-for-download.htm l
But its not perfect. It has the same problem that I ran into with Pulse light, that you had to use php echo within the spry repeating region to set the initial value from the server:
<span id="spryrating1" class="ratingContainer">
         <span class="ratingButton"></span>
            <input type="text" id="ratingValue" name="dynamic_rate" value="<?php echo $row['average']?>"/>
        </span>
        <script type="text/javascript"
            var rating1 = new Spry.Widget.Rating("spryrating1", {ratingValueElement:'ratingValue', afterRating:'serverValue', saveUrl: 'save.php?id=spryrating1&val=@@ratingValue@@'});
        </script>
So instead, I tried with three of my panels (www.youthinkyougotitbad.com) to get the average rating from xml by using the following queries:
Recent
Returns the blurts in most recent order along with average rating
SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt,Blurt.`Date`,DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt Group By Id_blurt ORDER BY Blurt.`Date` DESC
Wet Eyed
Returns the blurts in highest ratings order along with the average rating
SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt, DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt AND ratings.rating_value > 0.1 Group By Id_blurt ORDER BY average_r Desc
Dry Eyed
Returns the blurts in lowest rating order along with the average rating
SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt, DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt AND ratings.rating_value > 0.1 Group By Id_blurt ORDER BY average_r
These all return the correct xml in the correct order.And they return the average rating of each blurt which I can send to my page with xml.
My first question is that I dont know how to configure the query on my fourth panel Empathized & Advised the same way because it already has a Group By for the Comment Id.
SELECT `Comment`.id_Blurt, COUNT(*) as frequency, Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt, DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date FROM Blurt, `Comment` WHERE Blurt.Id_blurt = `Comment`.id_Blurt GROUP BY `Comment`.id_Blurt ORDER BY COUNT(*) DESC";
Not sure if you guys need more information to understand that all, if so just ask.
So after I get my average value through xml to the first three panels, I set my spry repeating region up like this:
(Blurt panel)
<div spry:region="pv1" spry:repeatchildren="pv1">           
           <div class="blurtbox">
            <!--  most recent blurt tab-->
            <h3> "{pv1::Blurt}"</h3>
            <p> Blurted from {pv1::Location} at {pv1::Date}</p>
            <p>Empathize or Advise about {pv1::Name}'s Blurt #<a href="detailblurt.php?blurtid={pv1::Id_blurt}"> {pv1::Id_blurt}</a></a></p>
           <span id="{pv1::Id_blurt}" class="ratingContainer">
            <span class="ratingButton"></span>
            <span class="ratingButton"></span>
            <span class="ratingButton"></span>
            <span class="ratingButton"></span>
            <span class="ratingButton"></span>
            <span class="ratingRatedMsg">Thank You! Your tears have been tallied.</span>
            <input type="text" id="ratingValue" name="dynamic_rate" value="{pv1::average_r}"/>
        </span>
        <script type="text/javascript">
            // overview of available options and their values:
            // http://labs.adobe.com/technologies/spry/articles/rating_overview/index.html
            var rating1 = new Spry.Widget.Rating("{pv1::Id_blurt}", {ratingValueElement:'ratingValue', afterRating:'serverValue', saveUrl: 'save.php?id={pv1::Id_blurt}&val=@@ratingValue@@'});
        </script>
             <br/>
           </div>
          </div>
Ok, it registers the right vote in the database with the right blurt id each time. But I am having two problems so far:
One, even though {pv1::average_r} returns the correct average through xml, it doesn't show the initial rating value for each of the repeating blurts. It seems to show the first one correct, and then just repeat that same value to the other ones that follow. I just dont understand since it can get the correct server value right after you vote (afterRating:'serverValue), that I can't manipulate spryrating.js in some way that I could just replace 'ratingValue' in ratingValueElement:'ratingValue' with something to give me the initial server value.
Two: Is even more mysterious to me, if you play around with voting on the site, sometimes you are unable to vote on different blurts. Its weird. It seems like that the javascript is completely off just on those blurts. And sometimes its a whole row, sometimes none. But so far its never a problem on the first tabbed panel (Recent), only on the other three. As far as I know, the coding is exactly the same in each tab's repeating region except for the different xml input.
And, now on the live server, sometimes the pics of tears used to voting dont show up until you click.
Any help on those three questions (how to query the fourth panel, how to show the initial server value, and the glitches with voting) would be greatly appreciated!! I looked pretty hard on adobe forums and other sites, and didnt see much on how to really use the spry rating widget with php and xml.
Thanks!!

Update:
Ok, the first query on the Recent tab doesnt work for me because it wont show unless its already voted, and since these are supposed to be new blurts, that kind of breaks the whole site:
"SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt,Blurt.`Date`,DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt Group By Id_blurt ORDER BY Blurt.`Date` DESC";
So I replaced it with what I originally had.
"SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt,Blurt.`Date`,DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date FROM Blurt ORDER BY Blurt.`Date` DESC";
But this doesn't provide me with the initial average rating:(

Similar Messages

  • Some assistance with Spry Rating Widget

    Hello, everyone.
    I have downloaded the Spry library from the repository, and am playing with it, trying to learn it.  So far, so good. 
    I have written a page that is using both the Spry Accordion Panel (I have 8, so far) and the Spry Rating Widget (one in each panel.)
    I am displaying (below the stars) a tally of ratings for each panel (I'm keeping track in an XML file.)  The 1-5 Star title, the number of times each is clicked, and a green bar (img) indicating percentage.
    When a star is clicked, the XML is updated, but you have to refresh the page to see the new values.  How can I dynamically, and in real time, update the value display when a star is clicked?  (Once I have that, I can figure out how to dynamically change the img size/percentage.)
    Thank you,
    ^_^

    WolfShade wrote:
    And I'm just starting to learn it, just because.  It's something different.  I'll probably never use any of it in any paid projects, but it's still nice to get a feel for it.
    I have never used the rating widget, but I do have the Spry example files from when they were originally released. I assume that you have managed to download the same files from GitHub.
    Open widgets.html in the widgets folder. Scroll down to the bottom, and click the Ratings > Overview link. Close to the bottom is a section titled "Update the Ratings Value Dynamically". The example code looks like this:
    <body>
    <span id="spryrating1" class="ratingContainer">
    <span class="ratingButton"></span>
    <span class="ratingButton"></span>
    <span class="ratingButton"></span>
    <span class="ratingButton"></span>
    <span class="ratingButton"></span>
    <input type="text" id="ratingValue" name="dynamic_rate" value="2"/>
    </span>
    <script type="text/javascript">
    var rate = new Spry.Widget.Rating("spryrating1", {ratingValueElement:"ratingValue", afterRating:'serverValue', saveURL:'SpryRating.php?id=spryrating5&val=@@rw_Rating@@'});
    </script>
    </body>
    Notice that the options object contains this: afterRating: 'serverValue'. Unfortunately, the sample files (at least the ones I've got) don't include a copy of SpryRating.php. However, I assume that it probably saves the selected value, calculates the average of all saved values, and then uses echo to output "serverValue=4.5" (or whatever the average is).

  • Help with the News Widget

    I am having some issues with the news widget and I don't know what I am doing wrong to have it come up like this. (I have attached a screenshot) Nothing is overlapping to make an error like this. Can someone help me?
    It is supposed to be next to the grey text, not below it.

    Figured out a workaround. I needed a convenient method to access the rows of the table from JavaScript. It turns out that the following works (on IE 6, anyway), though it depends on the HTML <div> tag:
    <html>
    <head>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <script language="JavaScript">
    <!--
    function selectTab(tab)
    <!-- Hide all Windows -->
    var d = document.getElementById('occurs');
    var tbl = d.getElementsByTagName('TABLE')[0];
    var r0 = tbl.rows[0];
    var r1 = tbl.rows[1];
    var r2 = tbl.rows[2];
    r0.style.display='none';
    r1.style.display='none';
    r2.style.display='none';
    <!-- Highlight selected tab and show appropriate window -->
    if(tab == 'tab1')
    r0.style.display='block';
    else if(tab == 'tab2')
    r1.style.display='block';
    else if(tab == 'tab3')
    r2.style.display='block';
    -->
    </script>
    </head>
    <body onLoad="javascript: selectTab('tab1');" >
    <f:use_faces>
    <h:form formName="entryform">
    <h:selectone_radio id="EventOption" layout="PAGE_DIRECTION" valueRef="EventEntryBean.eventOption">
    <h:selectitem itemValue="daily" itemLabel="wee" onclick="javascript: selectTab('tab1');"/>
    <h:selectitem itemValue="weekly" itemLabel="Not-so-wee" onclick="javascript: selectTab('tab2');"/>
    <h:selectitem itemValue="monthly" itemLabel="Freakin HUGE" onclick="javascript: selectTab('tab3');"/>
    </h:selectone_radio>
    <div id="occurs">
    <h:panel_grid columns="1">
    <h:panel_group>
    <h:panel_grid columns="1">
    <h:output_text value="wee"/>
    </h:panel_grid>
    </h:panel_group>
    <h:panel_group>
    <h:panel_grid columns="1">
    <h:output_text value="Not-so-wee"/>
    </h:panel_grid>
    </h:panel_group>
    <h:panel_group>
    <h:panel_grid columns="1">
    <h:output_text value="Freakin HUGE"/>
    </h:panel_grid>
    </h:panel_group>
    </h:panel_grid>
    </div>
    </h:form>
    </f:use_faces>
    </body>
    </html>

  • Help with putting links on graphics in spry accordion

    I have a sidebar with a spry accordian. Each content area has an image in it. I want users to be able to click on the image (after the accordian is open to it) and link to another page. But I can't find anyway to attach a link to the image, inside the accordian. Please Help!!
    Thank you.

    Also, after a panel is opened and clicked on, it closes and the first panel opens. I have compared the code on the style sheet with the code from Backyard furniture but it looks identical. Where is the code that tellls a panel to stay open?
    There are three accordion panels for the backyardfurniture.com.au menu systems. Each page uses a unique set of instructions within the constructors of each panel.
    For the home page the constructors (near the bottom of each document) look like
    var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false, useFixedPanelHeights: false, defaultPanel: 0 }); /* open 1st panel */
    var Accordion2 = new Spry.Widget.Accordion("Accordion2", { useFixedPanelHeights: false, useFixedPanelHeights: false, defaultPanel: -1 }); /* all panels closed */
    var Accordion3 = new Spry.Widget.Accordion("Accordion3", { useFixedPanelHeights: false, useFixedPanelHeights: false, defaultPanel: -1 }); /* all panels closed */
    For the Product->Your Backyard Furniture page it looks like
    var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false, useFixedPanelHeights: false, defaultPanel: 2 }); /* open 3rd panel */
    var Accordion2 = new Spry.Widget.Accordion("Accordion2", { useFixedPanelHeights: false, useFixedPanelHeights: false, defaultPanel: 0 }); /* open 1st panel */
    var Accordion3 = new Spry.Widget.Accordion("Accordion3", { useFixedPanelHeights: false, useFixedPanelHeights: false, defaultPanel: -1 }); /* all panels closed */
    You can follow the other pages and see the same kind of constructors for each of the pages.
    Gramps

  • Help with lightbox gallery widget

    Hello
    I built a website for my photography business and used the lightbox gallery widget. I'm not massively HTML minded so I tend to build in design view and just tweak the HTML code.
    The gallery is here: http://www.emmarichards.co.uk/gallery.html
    When you click on one of the photos, it is not working properly, it just takes you to another webpage with just the image. It worked fine in the live view. I'm looking at it in IE, not sure which version but a fairly up to date one I think. I've also checked it using the Mozilla browser and having the same problem. How can I rectify this please? The pages code is as follows:
    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Barnsley Wedding Photographer - Emma Richards</title>
    <style type="text/css">
    <!--
    body {
    font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
    background: #4E5869;
    margin: 0;
    padding: 0;
    color: #000;
    background-color: #99BADB;
    /* ~~ Element/tag selectors ~~ */
    ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
    padding: 0;
    margin: 0;
    h1, h2, h3, h4, h5, h6, p {
    margin-top: 0;  /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
    padding-right: 15px;
    padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
    a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
    border: none;
    /* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
    a:link {
    color:#414958;
    text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
    a:visited {
    color: #4E5869;
    text-decoration: underline;
    a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
    text-decoration: none;
    background-color: #FFFFFF;
    /* ~~ this container surrounds all other divs giving them their percentage-based width ~~ */
    .container {
    width: 80%;
    max-width: 1260px;/* a max-width may be desirable to keep this layout from getting too wide on a large monitor. This keeps line length more readable. IE6 does not respect this declaration. */
    min-width: 780px;/* a min-width may be desirable to keep this layout from getting too narrow. This keeps line length more readable in the side columns. IE6 does not respect this declaration. */
    background: #FFF;
    margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout. It is not needed if you set the .container's width to 100%. */
    /* ~~the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo~~ */
    .header {
    background-color: #ffffff;
    /* ~~ This is the layout information. ~~
    1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.
    .content {
    padding: 10px 0;
    /* ~~ This grouped selector gives the lists in the .content area space ~~ */
    .content ul, .content ol {
    padding: 0 15px 15px 40px; /* this padding mirrors the right padding in the headings and paragraph rule above. Padding was placed on the bottom for space between other elements on the lists and on the left to create the indention. These may be adjusted as you wish. */
    /* ~~ The footer ~~ */
    .footer {
    padding: 10px 0;
    background-color: #ffffff;
    /* ~~ miscellaneous float/clear classes ~~ */
    .fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
    float: right;
    margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
    float: left;
    margin-right: 8px;
    .clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
    clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
    body,td,th {
    font-family: Tahoma, Geneva, sans-serif;
    -->
    </style>
    <script src="scripts/jquery.js" type="text/javascript"></script>
    <script src="scripts/lightbox.js" type="text/javascript"></script>
    <link href="css/lightbox.css" rel="stylesheet" type="text/css" />
    <link href="css/sample_lightbox_layout.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    /* BeginOAWidget_Instance_2127022: #gallery */
      .lbGallery {
       /*gallery container settings*/
       background-color: #ffffff;
       padding-left: 180px; 
       padding-top: 20px; 
       padding-right: 180px; 
       padding-bottom: 20px; 
       width: 900px;
       height: auto;
       text-align:center;
      .lbGallery ul { list-style: none; margin:0;padding:0; }
      .lbGallery ul li { display: inline;margin:0;padding:0; }
      .lbGallery ul li a{text-decoration:none;}
      .lbGallery ul li a img {
       /*border color, width and margin for the images*/
       border-color: #ffffff;
       border-left-width: 0px;
       border-top-width: 0px;
       border-right-width: 0px;
       border-bottom-width: 0px;
       margin-left:5px;
       margin-right:5px;
       margin-top:5px;
       margin-bottom:5px:
      .lbGallery ul li a:hover img {
       /*background color on hover*/
       border-color: #ffffff;
       border-left-width: 0px;
       border-top-width: 0px;
       border-right-width: 0px;
       border-bottom-width: 0px;
      #lightbox-container-image-box {
       border-top: 0px none #ffffff;
       border-right: 0px none #ffffff;
       border-bottom: 0px none #ffffff;
       border-left: 0px none #ffffff;
      #lightbox-container-image-data-box {
       border-top: 0px;
       border-right: 0px none #ffffff;
       border-bottom: 0px none #ffffff;
       border-left: 0px none #ffffff;
    /* EndOAWidget_Instance_2127022 */
    </style>
    <script type="text/xml">
    <!--
    <oa:widgets>
      <oa:widget wid="2127022" binding="#gallery" />
    </oa:widgets>
    -->
    </script>
    </head>
    <body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000" alink="#000000">
    <div class="container">
      <div class="header">
        <div align="center">
          <p><img src="1title 2.png" alt="emma richards barnsley wedding photographer" width="1144" height="368" /></p>
          <p><a href="about.html"><img src="1.png" alt="about emma richards barnsley wedding photographer" width="143" height="46" border="0" /></a><a href="weddings.html"><img src="1.weddings.png" alt="weddings information barnsley photographer" width="162" height="46" border="0" /></a><a href="gallery.html"><img src="1.gallery.png" alt="barnsley wedding photographer image gallery" width="162" height="46" border="0" /></a><a href="pricing.html"><img src="1.pricing.png" alt="barnsley wedding photographer pricing information" width="162" height="46" border="0" /></a><a href="engagements.html"><img src="1.engage.png" alt="engagement photography couples shoot barnsley" width="221" height="46" border="0" /></a><a href="http://emmarichardsuk.blogspot.com"><img src="1 blgo.png" alt="emma richards wedding photography blog" width="105" height="45" border="0" /></a><a href="contact.html"><img src="1 contact.png" alt="contact emma richards" width="162" height="46" border="0" /></a></p>
        </div>
        <!-- end .header --></div>
      <div class="content">
        <div id="gallery" class="lbGallery">
          <div align="center">
            <ul>
              <li> <a href="2.ABBIE AND KID.jpg" width="600" height="400" title=""><img src="2.ABBIE AND KID.jpg" width="150" height="100" alt="barnsley wedding photography" /></a>
              <li> <a href="2.R AND M CUTTING CAKE.jpg" title=""><img src="2.R AND M CUTTING CAKE.jpg" width="150" height="100" alt="Park Inn wedding" "wath" "barnsley" "photography" /></a>
              <li> <a href="alex laura 1 (5).jpg" title=""><img src="alex laura 1 (5).jpg" width="150" height="100" alt="barnsley wedding photographer" /></a>
              <li> <a href="alex laura 1 (8).jpg"><img src="alex laura 1 (8).jpg" width="150" height="100" alt="whitley hall wedding" "sheffield" "barnsley wedding photographer" "reception" /></a> </li>
              <li> <a href="tree closer.jpg" width="600px" height="400px" title=""><img src="tree closer.jpg" width="150" height="100" alt="" /></a> </li><br />
              <li> <a href="11.jpg" width="600" height="400" title=""><img src="11.jpg" width="150" height="100" alt="barnsley wedding photography" /></a>
              <li> <a href="10.jpg" title=""><img src="10.jpg" width="150" height="100" alt="barnsley wedding photography" /></a>
              <li> <a href="James Ruth Church128.jpg" title=""><img src="James Ruth Church128.jpg" width="150" height="100" alt="whitley hall wedding" "sheffield" "barnsley wedding photographer" "reception" /></a>
              <li> <a href="2.ABBIE GROUP.jpg"><img src="2.ABBIE GROUP.jpg" width="150" height="100" alt="barnsley wedding photographer" /></a> </li>
              <li> <a href="12-5.jpg" width="600px" height="400px" title=""><img src="12-5.jpg" width="150" height="100" alt="barnsley wedding photography" /></a> </li><br />      
              <li> <a href="alex laura 1 (3).jpg" width="600" height="400" title=""><img src="alex laura 1 (3).jpg" width="150" height="100" alt="barnsley wedding photography" /></a>
              <li> <a href="confetti crop.jpg" title=""><img src="confetti crop.jpg" width="150" height="100" alt="barnsley wedding photographer" /></a>
              <li> <a href="Mark &amp; Rachel 025.jpg" title=""><img src="Mark &amp; Rachel 025.jpg" width="150" height="100" alt="park inn wedding" "wath" "barnsley" "photography" /></a>
              <li> <a href="Abbie Ben 0336.jpg"><img src="Abbie Ben 0336.jpg" width="150" height="100" alt="barnsley wedding photographer" /></a> </li>
              <li> <a href="Abbie Ben 0309.jpg" width="600px" height="400px" title=""><img src="Abbie Ben 0309.jpg" width="150" height="100" alt="barnsley wedding photographer" "first kiss" /></a> </li><br />
              <li> <a href="laughing 2.png" width="600" height="400" title=""><img src="laughing 2.png" width="150" height="100" alt="whitley hall wedding" "sheffield wedding photography" /></a>
              <li> <a href="2.double.jpg" title=""><img src="2.double.jpg" width="150" height="100" alt="Park Inn wedding" "wath" "barnsley" "photography" /></a>
              <li> <a href="132.jpg" title=""><img src="132.jpg" width="150" height="100" alt="whitley hall wedding" "sheffield" "barnsley wedding photographer" "reception" /></a>
              <li> <a href="Abbie and Ben 0621.jpg"><img src="Abbie and Ben 0621.jpg" width="150" height="100" alt="barnsley wedding photography" /></a> </li>
              <li> <a href="Abbie Ben 0320.jpg" width="600px" height="400px" title=""><img src="Abbie Ben 0320.jpg" width="150" height="100" alt="barnsley wedding photography" /></a> </li><br />
              <li> <a href="Abbie Ben 0011 copy.jpg" width="600" height="400" title=""><img src="Abbie Ben 0011 copy.jpg" width="150" height="100" alt="bouquet" "barnsley wedding photographer" /></a>
              <li> <a href="James &amp; Ruth0202.jpg" title=""><img src="James &amp; Ruth0202.jpg" width="150" height="100" alt="barnsley wedding photographer" /></a>
              <li> <a href="alex laura 1 (4).jpg" title=""><img src="alex laura 1 (4).jpg" width="150" height="100" alt="barnsley wedding photographer"  /></a>
              <li> <a href="123.jpg"><img src="123.jpg" width="150" height="100" alt="rotherham" "park inn wedding" "wath" "barnsley" "photography" /></a> </li>
              <li> <a href="Mark &amp; Rachel 311.jpg" width="600px" height="400px" title=""><img src="Mark &amp; Rachel 311.jpg" width="150" height="100" alt= "rotherham" "Park Inn wedding" "wath" "barnsley" "photography" /></a> </li><br />
            </ul>
          </div>
        </div>
        <div align="center">
        <script type="text/javascript">
    // BeginOAWidget_Instance_2127022: #gallery
      $(function(){
       $('#gallery a').lightBox({
        imageLoading:   '/images/lightbox/lightbox-ico-loading.gif',  // (string) Path and the name of the loading icon
        imageBtnPrev:   '/images/lightbox/lightbox-btn-prev.gif',   // (string) Path and the name of the prev button image
        imageBtnNext:   '/images/lightbox/lightbox-btn-next.gif',   // (string) Path and the name of the next button image
        imageBtnClose:   '/images/lightbox/lightbox-btn-close.gif',  // (string) Path and the name of the close btn
        imageBlank:    '/images/lightbox/lightbox-blank.gif',   // (string) Path and the name of a blank image (one pixel)
        fixedNavigation:  false,  // (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface.
        containerResizeSpeed: 400,    // Specify the resize duration of container image. These number are miliseconds. 400 is default.
        overlayBgColor:   "#ffffff",  // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color.
        overlayOpacity:   0,  // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9
        txtImage:    'Image',    //Default text of image
        txtOf:     'of'
    // EndOAWidget_Instance_2127022
        </script><!-- end .content --></div>
    </div>
      <div class="footer">
        <hr />
        <p align="right" class="container">07794 430 229 //   [email protected]</p>
      <!-- end .footer --></div>
    <!-- end .container --></div>
    </body>
    </html>

    emmarichards4 wrote:
    Do I need to have the same path as in my root folder, so for example within my Public folder with my host, have a 'script's folder and then put the 'jquery.js' file within that or should that not matter?
    All paths (the route from the parent file to the dependent file) are crucial.
    If the path is not correct, the required file will not be found and the effect will not work.
    There's no need to upload files individually and manually place them into remote folders. DW handles all file and folder paths for you if you use the Files panel.
    For example, http://www.emmarichards.co.uk/scripts/lightbox.js = 404 error. The file still does not exist on the server in that location.
    You should be able to click on the css and scripts folders locally, click Put and all files in those folders will be uploaded correctly.

  • Help with creating a method within a class

    I need help creating another method within the same class.
    Here is part of my progam, and could anyone help me convert the switch statement into a seperate
    method within the same class?
    import javax.swing.JOptionPane;
    public class Yahtzee
         public static void main (String[] args)
              String numStr, playerStr, str, tobenamed;
              int num, times = 13, roll, x, y, maxRoll = 3, z = 0, t;
              int firstDie, secondDie, thirdDie, fourthDie, fifthDie, maxDie = 5, reroll;
              int rerolling = 0, categoryChoice, score, nextDie1, nextDie2, nextDie3, nextDie4;
              Die die1, die2, die3, die4, die5;
              do
              numStr = JOptionPane.showInputDialog ("Enter the number of player: ");
              num = Integer.parseInt(numStr);
              while (num < 1 || num > 6); //end of do loop
              String [] player = new String[num];
              // boolean //finsih later to make category choice only once.
              for (x = 0; x < num; x++)
                   playerStr = JOptionPane.showInputDialog ("Name of Player" + (x + 1) + " :");
                   player[x] = playerStr;  
              } //end of for loop
              die1 = new Die();
               die2 = new Die();
               die3 = new Die();
               die4 = new Die();
               die5 = new Die();
              int scoring [][] = new int [num][13];//scoring aray
              int[] numDie = new int[maxDie];
              String[][] usedCategory = new String [num][times];
              for (x=0; x < 13; x++)
                   for (y = 0; y < num; y++)
                      usedCategory[y][x] = " ";
              for (int choices = 0; choices < times; choices++)
                   //player turns for loop.
                   for (x = 0; x < num; x++)
                        //rolls the die;
                          for (y = 0; y < maxDie; y++)
                               numDie[y] =  die1.roll();
                     numStr = JOptionPane.showInputDialog (player[x] + "\n~~~~~~~~~~~~~~~~~~~~~~~"
                                                                            + "\nDie1: " + numDie[0]
                                                                                + "\nDie2: " + numDie[1]
                                                                                + "\nDie3: " + numDie[2]
                                                                                + "\nDie4: " + numDie[3]
                                                                                + "\nDie5: " + numDie[4]
                                                                                + "\nWhich dice do you want to reroll");
                    reroll = numStr.length();
                    if (reroll == 0)
                        t = maxRoll;
                   else{                                                      
                    //reroll
                         for(t = 0; t < maxRoll; t++ )
                             for (y = 0; y < reroll; y++)
                                    rerolling = numStr.charAt(y);
                                 //create another mwthod later.
                                    switch (rerolling)
                                         case '1':
                                              numDie[0] =  die1.roll();
                                              break;
                                         case '2':
                                              numDie[1] =  die1.roll();
                                              break;
                                         case '3':
                                              numDie[2] =  die1.roll();
                                              break;
                                         case '4':
                                              numDie[3] =  die1.roll();
                                              break;
                                         case '5':
                                              numDie[4] =  die1.roll();
                                              break;
                                         default:
                                         t = maxRoll;//to be changed
                                    } //end of switch class
                              }//end of reroll for loop
                                   JOptionPane.showMessegeDialog (player[x] + "\n~~~~~~~~~~~~~~~~~~~~~~~"
                                                                                      + "\nDie1: " + numDie[0]
                                                                                          + "\nDie2: " + numDie[1]
                                                                                          + "\nDie3: " + numDie[2]
                                                                                          + "\nDie4: " + numDie[3]
                                                                                          + "\nDie5: " + numDie[4]
                                                                                          + "\nWhich dice do you want to reroll"
                                               switch (rerolling)
                                         case '1':
                                              numDie[0] =  die1.roll();
                                              break;
                                         case '2':
                                              numDie[1] =  die1.roll();
                                              break;
                                         case '3':
                                              numDie[2] =  die1.roll();
                                              break;
                                         case '4':
                                              numDie[3] =  die1.roll();
                                              break;
                                         case '5':
                                              numDie[4] =  die1.roll();
                                              break;
                                         default:
                                         t = maxRoll; //not really anything yet, or is it?
                                    } //end of rerolling switch class
                                       //categorychoice = Integer.parseInt(category);
                              }//end of t for loop            
                   }//end of player for loop.

    samuraiexe wrote:
    well, i should have said it is a yahtzee program, and i ask the user what they want to reroll and whatever number they press, the switch will activate the case and the array that it will reroll.
    HOw would i pass it as an argument?You put it in the argument list. Modifying your original code a bit:
    public static void switchReroll (int[] dice, int position) {
         switch (position) {
         case '1':
                 dice[0] =  die1.roll()
                 break;
         case '2':
                 dice[1] =  die1.roll();
                 break;
         case '3':
                 dice[2] =  die1.roll();
                     break;
         case '4':
                 dice[3] =  die1.roll();
                 break;
         case '5':
                  dice[4] =  die1.roll();
                 break;
         default:
                 t = maxRoll;//to be changed
        } //end of switch
    }which you could then call as this:
    switchReroll(numDie, reroll);Note that your code still isn't done; the above won't compile. This is just an example of how you could pass the stuff as an argument (and note how the values have different names in the main method than in the switchReroll method -- this works, but also note that it's the same array of ints in both).
    By the way -- you really don't need a switch statement for this. You can do the same thing with a couple lines of code, which would lessen the advantage for a separate method. But I'd suggest continuing down this path, and then you could change the implementation of the method later.

  • Help with Risk Rating calculation

    I'm trying to understand the risk rating calculation on an IPS4240 sensor.  From what I can tell, it looks like there are some additional parameters added to the equation that are not easy to determine.  It looks like the ARR (Attack Relevancy Rating) and/or WLR (Watch List Rating) are making changes (i.e. being added to the RR), but I cannot find any values for these.  Are there default values for ARR that the system uses?  What about the WLR, can that be viewed anywhere?
    Any help is appreciated.
    Thanks,
    Pat

    Hi Pat,
    I guess below is what you are looking for:
    http://www.cisco.com/web/about/security/intelligence/ipsmit.html
    It says the below:
    "Attack Relevancy Rating: The Attack Relevancy Rating  (ARR) is an IPS-generated value that  indicates if the attack target may  be vulnerable to an event-specific attack.  This information is  normally gathered through passive operating system identification but  can also be defined by a  user or gathered through integration with the  Cisco Security Agent Management  Console. If the operating system of the  targeted device is  unknown, there is no change to the  risk rating.  However, if the  targeted device operating system is discovered to be  relevant, the risk rating  increases by 10 in both Inline and  Promiscuous modes. If the targeted device operating system is found  to  be irrelevant, the risk rating in Promiscuous mode is reduced by  10,  and no change occurs in Inline mode."
    Let me know if this clears things up.
    Thanks and Regards,
    Prapanch

  • Help with implementing Swing GUI within jpg image

    Dear Java Experts,
    I have a question, is there a way to implement java swing objects (ie jbutton, jcombobox, etc) within an imageicon. Basically, i am trying to juggle between ways of getting JSwing GUI into a background jpg image. Please help me. I thank you all in advance.

    You've it back to front.
    Create an transparent extension of JPanel that paints an image on it's
    background before running it's super class paint method.
    You'll need to extend this example to stretch, center or tile the image
    but otheriwse it's complete.
    BTW - you have to pass an argument to this example that is the path of
    the image you want on the background of the panel, like:
    java -cp <whatever> MyJavaProject1 images/something.gif
    Enjoy.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class MyJavaProject1
         static class BackgroundPanel
              extends JPanel
              private ImageIcon mIcon;
              public BackgroundPanel(ImageIcon icon) {
                   mIcon= icon;
                   super.setOpaque(false);
              public void setOpaque(boolean flag) { }
              public void paint(Graphics g)
                   g.drawImage(mIcon.getImage(), 0, 0, null);
                   super.paint(g);
         public static void main(String[] argv)
              JFrame frame= new JFrame(argv[0]);
              BackgroundPanel panel= new BackgroundPanel(new ImageIcon(argv[0]));
              panel.setLayout(new GridLayout(0,2,4,4));
              panel.setBorder(new EmptyBorder(4,4,4,4));
              panel.add(new JLabel("Name"));
              panel.add(new JTextField());
              panel.add(new JLabel("Address"));
              panel.add(new JTextField());
              panel.add(new JLabel("Phone"));
              panel.add(new JTextField());
              frame.getContentPane().add(panel, BorderLayout.CENTER);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.pack();
              frame.setResizable(false);
              frame.setVisible(true);
    }

  • Help with "parameter type not within its bounds"

    Can someone please explain the behavior I'm seeing below?
    public class Node<ChildType extends Node<ChildType>>
    public class SubNode<ChildType extends SubNode<ChildType>> extends Node<ChildType>
      public static void main(String[] args)
        Node<Node> myNode; // ERROR: Node not within its bounds
        Node<SubNode> myNode2; // ERROR: SubNode not within its bounds
        Node<? extends Node> myNode3; // Works
        Node<? extends Node> myNode4 = new Node<Node>(); // ERROR: Node not within its bounds
        Node<? extends Node> myNode4 = new Node<SubNode>(); // ERROR: SubNode not within its bounds
    }How do I get it to work the way I expect? I want to construct a Node with a parameterized children type so that if you construct a Node, the children would also be of type Node. If you construct a SubNode, the children would also be of type SubNode, etc.
    Thank you,
    Gili

    I would make the "concrete" subclasses public:
    import java.util.Collection;
    import java.util.Collections;
    public interface Node<C extends Node<C>> {
        Collection<C> getChildren();
    public interface SubNode<C extends SubNode<C>> extends Node<C> {
        C getParent();
    abstract class DefaultNode<C extends Node<C>> {
        Collection<C> children;
        DefaultNode(Collection<C> children) {
         this.children = Collections.unmodifiableCollection(children);
        public Collection<C> getChildren() {
         return children;
    abstract class DefaultSubNode<C extends SubNode<C>> extends DefaultNode<C> {
        C parent;
        DefaultSubNode(Collection<C> children, C parent) {
         super(children);
         this.parent = parent;
        public C getParent() {
         return parent;
    public class ConcreteNode extends DefaultNode<ConcreteNode>
                    implements Node<ConcreteNode> {
        public ConcreteNode(Collection<ConcreteNode> children) {
         super(children);
    public class ConcreteSubNode extends DefaultSubNode<ConcreteSubNode>
                       implements SubNode<ConcreteSubNode> {
        public ConcreteSubNode(Collection<ConcreteSubNode> children, ConcreteSubNode parent) {
         super(children, parent);
    }

  • I need help with creating a rollover within an accordian

    I made a feature for my portfolio page..  when you click on an image inside an accourdian my portfolio will drop down.. the only thing im having trouble with is giving the illusion that the string is being pulled down i adjusted the states but when i preview it... theres no response to the rollover nothing is working...Please let me know Thanks so much,
    Joe

    Hello,
    Check this video : http://tv.adobe.com/watch/muse-feature-tour/muse-create-tabbed-and-accordion-panels/
    You can see the rollover state under states option here :
    You can double check your states and it will work as I have created a short video with image on all 3 stages : http://unidel.worldsecuresystems.com/surjeet/2013-10-28_1503.swf  Hope this helps!
    Cheers,
    Surjeet

  • Help with symbian belle widgets

    I have installed some third party transparent widgets that replaced my old widgets, I tried to revert to the old original widgets but I can't, I removed the installation and I got the widget no more existing, I tried installing some widget from a leaked archive of symbian belle, but it tells me "update error", anybody can help please ? 

    Have you installed Microsoft apps ? If not, try them, mail works superbly !
    If I have helped at all, a click on the White Star is always appreciated :
    you can also help others by marking 'accept as solution' 

  • Help with making buttons work within mc/shape tween

    hi,
    i've created a movie clip for a navigation link named
    "Products". when you mouse over the "Products" mc, the movie clip
    has a sub-navbar that tweens horizontally out of the movie clip.
    when the subnav is done coming out and stops, i have buttons that
    appear that i would like the user to be able to click on.
    everything works out fine until i roll over the button the rollover
    state doesn't work. i have a feeling it is because the button is
    nested, but not sure.
    i set up a simple example here:
    http://kurtcom.com/examples/jeannettes_damn_navbar.html
    let me know if you want me to email you the file as well,
    thanks!

    A single Path would just be an out line of your three shapes.  As you knew to create  the above using vectors requires three shape layers.  Shapes can only be filled  with a single color or pattern.  They also can be stroked and have layer styles added. Additional strokes may be need to highlight the green area like you show above..
    With CS6 you can merge shape layers into a single shape layer your result would be a single color shape however the merged paths would be the outlining path you seem to want. you can save the path in the path palette when the merged shape is the active layer.
    adding an empty layer and stroking the merged path,
    Message was edited by: JJMack

  • Help with running external programs within java

    Hi,
    I'm new here, and not sure whether i'm in the right place for this, but i thought i'd give it a shot anyway!
    Basically i have a fortran program already written, that takes in the name of a text file as an input. I'm wanting to create a user interface to create this text file, and then i would have a button or something to enable me to then run the fortran program and input the file all from the user interface, and get rid of the need to manually run the fortran program.
    Firstly, is this even possible?! Is it difficult to program and get to work?! Does anyone have any suggestions or guidance on this.
    Thanks

    @Op.
    ..and here are two links related to that.
    http://java.sun.com/developer/JDCTechTips/2003/tt0304.html
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Rating widget with data table

    I am using rating widgets with php generated tables... but I
    like the spry data regions better (for sorting). is it possible to
    dynamically create rating widgets in a spry data region? I tried
    doing it by applying the information from "Using HTML Fragments In
    XML Sample " but that doesnt work. Any ideas?

    Did u check:
    http://labs.adobe.com/technologies/spry/samples/tooltip/Tootlip_with_HTML_Panel.html
    http://labs.adobe.com/technologies/spry/samples/data_region/TooltipwithData.html

  • Dreamweaver - spry rating & repeating regions

    Hi,
    I'm trying to make a repeating region that contains a spry rating widget (I have downloaded the extension).
    The problem is that I need to develop a way to automatically increase the ID of the spry rating.
    The problem I am encountering is that only the first spry rating works properly. The remainder are displaying the data, but show only a text field. It appears that all are being repeated as
    id="SpryRating1".
    Does anyone have a way to increment the spry rating id for each element of the repeating region?
    Thanks for yours replies,
                       Gabriel
    PD: I have the same problem with the sustitution images. Does anyone have a solution?

    This is very easy to do with a server-side language. Create a variable counter, and increase the counter each time the repeat region runs.

Maybe you are looking for

  • Export / Import   to memory Id 2 . ( Unicode System)

    hi all , we get unicode syntax error for the statement    EXPORT d1200  TO MEMORY ID 2. Error discription is - 2 must be a character-type field (data type C, N, D, or T) . "INTERFACE". We get similar error in import statement as well. Please refer th

  • Images repository in portal

    Hi, I am planning to configure  Portal welcome screen,Theme and pages with some custom (Client) logos etc. Similar to SE80 in BW, MIME repository Is there any central location I can first save/upload all the images I required in portal and then use t

  • CPO on Activity Monitor over 100%

    I run Power eTrade Pro, a java based application with a continuous internet feed, and experience periods of over 100% CPU activity according to Activity Monitor. During those periods the program is frozen. This didn't happen with 10.4. It happens bot

  • Sales Order booked Email to party

    Hi, We need to send a mail to the customer when their sales order is booked.Is this possible??If, possible then how can this be done? Regards, AA.-

  • New iTouch home button wiggle

    I have a 16GB iTouch. The home button on it is 'loose/wiggles' slightly. Should I return it to get a new one, or are most of them similar to this?