URL variable in Spry Dataset

Hi guys, first time posting with a pain-in-the-bum problem i have been trying to figure out all day.
I want to display certain records in my xml file depending on a link being clicked on a previous page. Below is my current code:
// Create variable is_input to see if there is a # in the url
is_input = document.URL.indexOf('#');
// Check the position of the # in the url
if (is_input != -1)
// Create variable from # in the url to the end of the string
addr_str = document.URL.substring(is_input+1, document.URL.length);
// Loop through the url and write out values found
// or a line break to seperate values by the &
for (count = 0; count < addr_str.length; count++)
if (addr_str.charAt(count) == "&")
// Write a line break for each & found
{document.write ("<br>");
}else{
url_variable = (addr_str.charAt(count));
// Write the part of the url
document.write (url_variable);
}else{
document.write("No values detected");
var dsGlossary = new Spry.Data.XMLDataSet("glossary1.xml", "glossary/glossary_term[glossary_term_heading = url_variable]");
If you look at my dataset string you will see a variable called url_variable - i want to match records where url_variable = glossary_term_heading. I can write out url_variable to the page using document.write (url_variable); but cannot format it in such a way as for it to work within the dataset string.
Any help would be greatly appreciated!

Hi guys, me again. I just had a look at my post above and thought maybe i was waffling a bit. To summarise, all i want to do is have the dataset "dsGlossary" read the javascript variable. "url_variable" so i can match that with "glossary_term_heading" (a field in my XML file).
Again, thanks in advance for your replies.

Similar Messages

  • Spry tabbing and URL variables

    Hi there,
    Thanks to these forums I can now link to my lovely Spry tabs.
    However, I'm no longer able to pass my page variable by URL and I
    was wondering if there was a work-around for this. My basic link is
    as follows:
    <a href="index.cfm?ID=#ID#"
    onclick="TabbedPanels1.showPanel('third'); return
    false;">#eventName#</a>
    The link is tied to a specific database entry and, when
    clicked, should load that entry on the panel. The entry is to
    display on the third panel. While the panel links fine, the
    database entry isn't called as the variable isn't passed.
    Any ideas how I can best this little problem?
    Thanks!

    Kibbage.TEESO wrote:
    The biggest reason I try to not use URL parametersis that URL paramteres open you to SQL injection attacks.
    No more then Form variables do.  If you think that form variables are somehow magically more secure from injection or any other type of tampering then url variables then you have a very week understanding of Internet technology.
    It is no harder for me to modify a form [POST] variable then it for me to modify a url [GET] variable on any request I send to your server.  If your server trusts the form variables and does not take precautions; then your application is open to SQL injuection and other hacks.

  • Defining a spry data set from a url variable

    I am developing a family web site that, among other things, uses a single 'recipe' page to display recipes from different xml files as called by a url variable (e.g. ?xmlFile="{url}"&recipeName="{name}") from a summary page.  I can get the recipe name to reproduce using a $_GET php function, but I cannot establish the data set that way.  How can I define the data set from the incoming URL variable?  The necessary files are:
    The starting point from which I send the selected URL variable (use the scampi recipe)  http://ebogott.com/recipeBox.php.
    The file that is generated is http://ebogott.com/recipe.php?XMLfile=GrilledScampiOnAngelHair.xml&recipeName=Grilled%20Sh rimp%20Scampi%20on%20Angel%20Hair%20Pasta
    This methodology will allow me a number of cascading selections.  I know this is not unique.  I just haven't figured it out.
    don Carlos de la Playa

    don Carlos,
    The following shows the strength of the Spry framework. All very easy and simple.
    <!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" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    var dsRecipes = new Spry.Data.XMLDataSet("recipes/recipes.xml", "recipes/recipe");
    var dsIngredients = new Spry.Data.XMLDataSet("recipes/{dsRecipes::url}", "recipe/ingredients/ingredient");
    var dsProcess = new Spry.Data.XMLDataSet("recipes/poultrySoup.xml", "recipe/process/element");
    //-->
    </script>
    </head>
    <body>
    <div class="MasterDetail">
      <div spry:region="dsRecipes" class="MasterContainer">
        <div class="MasterColumn" spry:repeat="dsRecipes" spry:setrow="dsRecipes" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">{name}</div>
      </div>
      <div spry:detailregion="dsRecipes dsIngredients dsProcess" class="DetailContainer">
        <div class="DetailColumn">{@genre}</div>
        <div class="DetailColumn">{@serves}</div>
        <div class="DetailColumn">{@time}</div>
        <div spry:repeat="dsIngredients">
          <div class="DetailColumn">{dsIngredients::qty}</div>
          <div class="DetailColumn">{dsIngredients::measure}</div>
          <div class="DetailColumn">{dsIngredients::item}</div>
        </div>
        <div spry:repeat="dsProcess">
          <div class="DetailColumn">{dsProcess::element}</div>
        </div>
      </div>
      <br style="clear:both" />
    </div>
    </body>
    </html>
    You will have to give a bit of style to the detail region.
    I hope this helps.
    Ben

  • Using URL variable to set initialy selected ds row

    Hello everyone,
    Could anybody suggest a solution or point me to a working
    demo of a script that processes a URL variable and set the current
    row accordingly. I am trying to pass a @id of a particlar row in a
    URL variable to identify a particluar row, I want to be selected
    initially.
    Thanks,
    Nick

    Hy guys,
    Just figured it out myself. Here is the script:
    <script type="text/javascript">
    // define your datasource. I have called it dsGallery. This
    name is used later in the script a few times
    var dsGallery = new Spry.Data.XMLDataSet("gallery.xml",
    "/gallery/photos/photo");
    dsGallery.addObserver({ onPostLoad: function(ds, type) {
    var strReturn = "";
    var strHref = window.location.href;
    if ( strHref.indexOf("?") > -1 ){
    var strQueryString =
    strHref.substr(strHref.indexOf("?")).toLowerCase();
    var aQueryString = strQueryString.split("&");
    for ( var iParam = 0; iParam < aQueryString.length;
    iParam++ ){
    if (
    aQueryString[iParam].indexOf('id' + "=") > -1 ){
    var aParam = aQueryString[iParam].split("=");
    strReturn = aParam[1];
    // look if a row with a matching @id is present in the
    datasource
    var row = dsGallery.findRowsWithColumnValues({"@id":
    strReturn}, true);
    // If we have a matching row, make it the current row for the
    data set.
    if (row) dsGallery.setCurrentRow(row.ds_RowID);
    break;
    </script>
    Thanks to the folks whose scrips were really helfull in
    building this one.
    Nick

  • Slimbox not working with Spry Dataset

    Hi there,
    I'm trying to populate a page with Spry Dataset and use Slimbox2 to show a set of 4 images when a thumbnail is clicked.
    The original webpage WITHOUT Spry Dataset is here:
    http://shadowmuseum.com/portfolio/p-web.html
    Currently it works with just slimbox, but as soon as I add a Spry Dataset, the large images won't load anymore. When a thumbnail is clicked on, it opens the 1st large image of the set in a new page, completely removing the lightbox effect.
    I've scouted the internet for solutions; it's been suggested that slimbox doesn't work because spry doesn't have time to load the content first. But I'm not savvy with javascript at all, so have no idea how to work around it....
    Any help would be greatly appreciated.
    Thanks a lot.
    P.S. Below is the HTML code for the page with both spry & slimbox:
    <!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"><!-- InstanceBegin template="/Templates/bone.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="keywords" content="Shadow Museum, design, photography, london, web, web design, ana, ana lorraine lui, benjamin, backhouse, E1, E8, N16, graphic design, st martins, creative, agency, bespoke, multi-disciplinary" /><meta name="description" content="London based bespoke multi-disciplinary creative agency. Services include web design, photography, print design, and filmmaking." />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Shadow Museum || London-based bespoke multi-disciplinary creative agency</title>
    <script type="text/javascript" src="../zzAssets/scripts/Lightbox/jquery-1.3.1.min.js"></script>
    <script type="text/javascript" src="../zzAssets/scripts/Lightbox/js/slimbox2.js"></script>
    <script src="../zzAssets/scripts/SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="../zzAssets/scripts/SpryAssets/SpryData.js" type="text/javascript"></script>
    <link rel="stylesheet" href="../zzAssets/scripts/Lightbox/css/slimbox2.css" type="text/css" media="screen" />
    <!-- InstanceEndEditable -->
    <link href="../zzAssets/scripts/main.css" rel="stylesheet" type="text/css" />
    <script src="../zzAssets/scripts/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="../zzAssets/scripts/SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../zzAssets/scripts/clock/clockp.js"></script>
    <script type="text/javascript" src="../zzAssets/scripts/clock/clockh.js"></script>
    <!-- InstanceBeginEditable name="head" -->
    <script type="text/javascript">
    <!--
    var dsWeb = new Spry.Data.XMLDataSet("p-web.xml", "portfolio/project");
    dsWeb.setColumnType("info", "html");
    //-->
    </script>
    <!-- InstanceEndEditable --><!-- InstanceParam name="footer" type="boolean" value="true" --><!-- InstanceParam name="clock" type="boolean" value="true" -->
    </head>
    <body>
    <div id="clock_a"></div>
    <div id="menu">
      <ul id="mainMenu" class="MenuBarHorizontal">
        <li><a href="../index.html">Home</a>      </li>
        <li><a href="../news/news.html">News</a></li>
        <li><a class="MenuBarItemSubmenu" href="#">About</a>
            <ul>
              <li><a href="../about/our_story.html">Our Story</a></li>
              <li><a href="../about/our_values.html">Our Values</a></li>
            </ul>
        </li>
        <li><a href="#" class="MenuBarItemSubmenu">Services</a>
          <ul>
            <li><a href="../services/web_design.html">Web Design</a></li>
            <li><a href="../services/print_design.html">Print Design</a></li>
            <li><a href="../services/photography.html">Photography</a></li>
            <li><a href="../services/filmmaking.html">Filmmaking</a></li>
            </ul>
        </li>
        <li><a href="#" class="MenuBarItemSubmenu">Portfolio</a>
          <ul>
            <li><a href="p-web.html">Web Design</a></li>
            <li><a href="p-print.html">Print Design</a></li>
            <li><a href="p-photography.html">Photography</a></li>
            <li><a href="p-filmmaking.html">Filmmaking</a></li>
          </ul>
        </li>
        <li><a href="../contact/contact.html">Contact</a></li>
      </ul>
    </div>
    <!-- InstanceBeginEditable name="content area" -->
    <div id="content">
      <div id="p-web">
        <h2>Web  Portfolio</h2>
         <div class="SpryHiddenRegion" spry:region="dsWeb">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr spry:repeat="dsWeb">
            <td align="center" valign="top">
                   <a href="../zzAssets/images/p-web/{pic1}" rel="{label}" title="{title}"><img src="../zzAssets/images/p-web/{thm}" width="180" height="130" /></a>
                   <a href="../zzAssets/images/p-web/{pic2}" rel="{label}" title="{title}"></a>
                   <a href="../zzAssets/images/p-web/{pic3}" rel="{label}" title="{title}"></a>
                   <a href="../zzAssets/images/p-web/{pic4}" rel="{label}" title="{title}"></a>
              </td>
            <td align="left" valign="top">
                   <h3>{title}</h3>
                   {info}
                   <p><a href="http://{url}" target="_blank">{url-label}</a></p>
              </td>
          </tr>
        </table>
         </div>
        <p> </p>
      </div>
    </div>
    <!-- InstanceEndEditable -->
    <div id="footer">
      <div id="watermarkRight">
        <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td align="left" valign="top">©2009 Shadow Museum | Company Number 6576238
              | <a href="../terms.html" class="colourless">Terms &amp; Conditions</a></td>
            <td align="right" valign="top">contact us: <a href="mailto:[email protected]">[email protected]</a></td>
          </tr>
        </table>
      </div>
    </div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("mainMenu", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    <!-- InstanceEnd --></html>

    You are not re-initializing the lightbox library code after Spry have generated the markup.
    You can use the Spry region observer onPostUpdate to get notified of region re-generation and recall the initialization code of the lightbox.

  • Dynamic XML content displayed in HTML using url variable

    Hi guys,
    The following is code i am having issues with:
    <script type="text/javascript">
    <!--
    var xml_connect_00 = "new Spry.Data.XMLDataSet(";
    var xml_connect_01 = "assets/xml/toolkit.xml\",
    \"toolkit/section/";
    var xml_connect_02 =
    "/product\",{sortOnLoad:\"product_name\",sortOrderOnLoad:\"ascending\"";
    var xml_connect_03 = ")";
    // Create variable to see if there is a ? in the url
    var url_input = document.URL.indexOf('?');
    // Create variable from ? in the url to the end of the string
    var xml_category = document.URL.substring(url_input+1,
    document.URL.length);
    var dsSoftware =
    document.write(xml_connect_00,xml_connect_01,xml_category,xml_connect_02,xml_connect_03);
    --->
    </script>
    dsSoftware is my XML Data set connection string, and by using
    document.write, the correct string i want is displayed (in my
    html), but - as you can probably guess by now(!) - i want it to
    display in the actual Javascript code so i can connect to the xml
    file and display the contents depending on the url variable sent.
    Is this possible, and if so, am i going about it the right
    way? I am not the most proficient at JavaScript, so may have some
    ugly code (and not even 100% that this can even be done)!!
    Just to give you an outline as to why i am doing this - my
    XML file has different categories within it for different products.
    I send the category name via a url variable to another page
    (containing the above code) that will display the appropriate
    category information depending on what url variable is sent.
    Cheers in advance for any help.

    Me again!
    Sorry to keep updating, but i have now surpassed my last
    question and got the alert to work correctly. The question i have
    now regards the following code:
    <script type="text/javascript">
    <!--
    var params = Spry.Utils.getLocationParamsAsObject();
    var dsSoftware = new
    Spry.Data.XMLDataSet("assets/xml/toolkit.xml", "toolkit/section");
    //If the URL parameter 'software' has a value, set the XPath
    that includes a filter and then load the data.
    if (params.software){
    dsSoftware.setXPath("toolkit/section[name =
    '"+params.software+"']/product");
    dsSoftware.loadData();
    //alert(params.software);
    //-->
    </script>
    Everything seems to work without error, but i cannot load my
    xml file. The problem, i think, is that my xml heirachy is as
    follows:
    "toolkit/section/section_name/product"
    section_name is unique for each section, and that is what i
    am trying to pass through the url variable, so i can display all
    the products from that section.
    Can anyone tell me what i am doing wrong?
    Cheers in advance - again!!

  • GROUP BY in SPRY DATASET

    Hi,
    how can I set a GROUP BY in my Spry-Dataset? I got lots of <city> tags that sometimes contain the same city. And I dont want them all to be shown in the list only 1 time.
    Thanks for help,
    Denis

    DenisCGN wrote:
    :-) this is where I always look at. But understand nothing :-)
    It starts already here: function( ds, row, index ) where do I find ds? row? index? In the filter you showed me yesterday, it was written like that, too.
    the ds, row, and index are arguements of the function. Its basically in the information that Spry sends to your filter function that you can use to filter rows in your database.
    ds, is a reference to the current dataset that will have the filter applied,
    row, is a reference to the current row of your dataset that the filter is checking.
    index, is the current row number that is getting filtered.
    You can use these values to compile your own custom filter, as i did in example posted above. It uses the row variable to check for data in the current filtered row, and decided based on the information of that row, if the filter function should return the row, or remove the row ( return nothing );
    This is only one of the points. the other point is, that I dont know what to look for, when I need help. This filter thing from yesterday, is, nice, works only half, and brings me to the next frontier, like that GROUP BY thing, and that the dropdown fields are closed.
    There are a few points to look for information, when i first started, i used allot code from the examples. And searched the Spry API for information. And bought a few books on JavaScript. ( Spry got me hooked on JavaScript ). The Spry Docs is basically the base source of information. It links to almost everything you need. For more about data sets I would really suggest reading the articles that are bundled with Spry.
    These pages are bookmarked by me:
    http://labs.adobe.com/technologies/spry/docs.html
    http://labs.adobe.com/technologies/spry/articles/data_api/index.html
    http://labs.adobe.com/technologies/spry/samples/
    http://labs.adobe.com/technologies/spry/articles/data_set_overview/index.html
    http://labs.adobe.com/technologies/spry/articles/best_practices/index.html
    http://labs.adobe.com/technologies/spry/widgets/widgets.html
    When i got more used to Spry and JavaScript in I got most of my knowledge by analising all functions in side of Spry, all methods and functions properties, understanding how things work, and why things work. So i can provide better solutions for problems.
    When I got one, I got 3 new problems. Thats not so in PHP.
    An other thing is, that the german characters arent displayed right. and and and and...
    :-) I got to have a coffee now...
    Denis
    set column types to HTML, make sure you have the correct iso set for your XML and page. If you page is "iso-8859-15" make sure your XML and data is that as well. The same counts for UTF-8 and other encodings.

  • Spry dataset ie9 display anomaly

    I have a well-formed XML data set with 6 fields per record derived from an Excel spreadsheet which displays exactly as expected in Firefox using a Spry dataset constructed by Dreamweaver CS5..
    In IE9, however, an extra blank field is inserted somewhere around every 1000 fields or so which shifts the remaining fields of that record to the right into the margin area.
    This smells like a rendering bug in IE9, but if anyone has a better idea and a fix, I'd be very happy to hear from them.
    The site is not quite ready to go live, so I can't yet give you a url.

    Curiosity got the better of me.
    I use DW CS5 and this doesn't come with the CSVdataset option, but I found SpryCSVdataset.js on the web and cobbled together appropriate syntax with some difficulty given the paucity of documentation on the subject.  CSV doesn't show up as an option in the bindings panel, so it has to be done by hand.
    The csv file has the headings as the first record.  There is available syntax to override this and to add your own headings in the ds1 declaration.
    In case it helps anyone, the end result was:
    <head>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryCSVDataSet.js" type="text/javascript"></script>
    <script type="text/javascript">
    var ds1 = new Spry.Data.CSVDataSet("CSVdatafile.csv");
    </script>
    </head>
    <div spry:region="ds1" id="memorial">
    <table width="900" border="0">
      <tr class="spryEven">
        <th onClick="ds1.sort('No','toggle')">No</th>
        <th onClick="ds1.sort('Initials','toggle')">Initials</th>
        <th onClick="ds1.sort('Surname','toggle')">Surname</th>
        <th onClick="ds1.sort('Served','toggle')">Served</th>
        <th onClick="ds1.sort('Role','toggle')">Role</th>
    <th onClick="ds1.sort('Where','toggle')">Died</th>
        <th onClick="ds1.sort('When','toggle')">When</th>
      </tr>
      <tr spry:repeat="ds1" spry:odd="spryOdd" spry:even="spryEven">
        <td>{No}</td>
        <td>{Initials}</td>
        <td>{Surname}</td>
        <td>{Served}</td>
        <td>{Role}</td>
        <td>{Where}</td>
        <td>{When}</td>
      </tr>
    </table>
    </div>
    This generates the required display and the csv datafile is only 75k against 250k for the XML, which is a bonus.
    However, the display problem is still there!
    Experimenting by dropping fields and changing table width, it looks to me like there might be a rendering bug related to the width of the fields relative to the available column width (which so far I haven't found any way to control manually) and the number of wrapped fields ahead of the problem point.  Possibly something in the word wrap logic that only appears in IE?
    csv is also much more sensitive to empty fields than XML.

  • Unable to get URL Variable

    I've seen many posts about URL Variables, and I've tried implementing the solutions, but nothing seems to be working, so I'm hoping that someone out there might be able to help me with my situation.
    I have built a JSP page in JDeveloper. The page must identify the visitor using an id (passed as a url variable) as well as an account_id entered by the user on the page. I've created a procedure in my ModuleImpl.java file that receives both the url variable and account_id and then calls a pl/sql transaction I've created in the database.
    Thing is, if I take the procedure, which I've allowed to be shared to the Client interface, and plop it on my JSP Page, I get two inputs, one for the account_id and one for the url variable, meaning the user has to enter the url variable in the field for the procedure to work.
    I've tried modifying the value of the field and setting it equal to #{param.id}, but when I run the page, the input becomes a display field and is not sent to my java procedure. I've also tried the FacesContext way of getting a url parameter, but I can't get that to work in my java file.
    What I would like to have (or at least what my intensions were when I started this project) is to have the url variable field be hidden and automatically populated with the url variable so that when the customer enters their account_id and clicks submit, both the account_id and url variable are passed.
    Any idea on how to implement something like this?

    You can try setting the value of the parameter in the
    pagedef.xml file for your page directly using
    expression language.Thanks for your reply! I did that, or at least I think I did. Here is the NameData tag in my pagedef.xml file:
    <NamedData NDName="web_hash" NDType="java.lang.String"
    NDValue="${bindings.save_new_password_web_hash}"/>
    what I've tried doing, is changing the NDValue to the three values below, all of which didn't work (returned null):
    NDValue ="${param.id}"
    NDValue ="#{param.id}"
    NDValue ="${facesContext.externalContext.requestParameterMap['id']}"
    is there a different expression I should be using?
    Also, I will take a look at the solution you likend to.

  • Dw cs5.5 + Phonegap + spry dataset xml and images links broken

    Hi all,
    I'm building an app using DW CS5.5 and Phonegap.
    This is what I've done:
    created pages using the starter template (local)
    I created a php page that run a query on a mysql database and output an xml file
    I created a spry dataset using the php (see 2) file as data file
    It works locally and on-line on my website.
    But if I package an app using the android sdk from dw CS5.5 I have problems: all images are all broken. It seems that the link to image is not correct.
    In fact, all images are not using absolute path (http://www.mysite.com/images/...) but are set this way: /images/....
    So, my question is: have I to specify all images sources using absolute paths to make it work when packaged?
    TIA for any reply
    tony

    Hi Gramps,
    I just solved the problem with image paths (I made all src paths absolute).
    There is only one problem left: I opened another discussion: http://goo.gl/ysNDH
    But here the link you (correctly) need to trobleshoot the problem): http://www.camar.it/newsxml
    It should work on desktop browsers but it fails when I pack the app for android and install it on an android smartphone: I get "error loading page" when clicking on any details link (the button label is: DETTAGLI) on the news page.
    Tony

  • Any way to add a URL variable to EVERY SINGLE url in the site, all at once?

    Hi,
    I'm managing a web application, and we're looking at changing from using cookies, to passing session variables in every HTTP request to maintain session information.
    So basically, I have a variable that needs to be appended to every single URL in the entire site - not just in links, but in cflocation tags etc.
    Is there any way to just ADD information to the end of every URL, without otherwise CHANGING anything in that URL?
    This site is hand-coded, but I have access to Dreamweaver CS3, so I thought I'd ask if it was possible - it'd save me a bunch of time!
    Thanks,
    Joe

    Hi, thanks for the reply.
    I am familiar with DW's basic find/replace functions, but I don't think it'll work in this case.
    See, the URL's are almost ALL unique.  Many of them already include other URL variables... This is a pretty server-intensive web application, with a lot of data manipulation and database reads/writes.  
    So I was hoping for a function that could find all URL's (it could just look for a string containing .cfm), and append the code to include one more variable to the URL.
    I see there's a way to use a regex in the find/replace tool, but it'd probably take me as long to write and debug the regex as it'd take to manually mod the URLs lol.
    Thanks for any ideas!
    On Jun 24, 2010 10:57 AM, SugnaShane &lt;[email protected]&gt; wrote:
    It depends on how unique each URL is but you could try the Find and Replace function.
    Highlight code in code view
    Right Click
    Choose "Find and Replace
    You can then write the replace code and target a page or entire directory or site.

  • How can i hide a portion of the text inside a spry dataset "stackedcolumn"?

    Hi all
    I have a spry dataset set up reading a .xml file for the price/name/description/etc. I want to only show some of the text (a certain number of characters) at the start then give the visitor the option of clicking a toggle button to see more of the description and help with size of the pages.  How do i do that exactly?
    I know I have to probably implement jquery toggle but how does it work with a spry?
    here is the code as it stands.
       <div spry:region="catalog" class="SpotlightAndStacked">
          <div spry:repeat="catalog" class="SpotlightAndStackedRow">
            <div class="SpotlightContainer">
              <div class="SpotlightColumn"><a href="_images/catalog/Art/{Picture_File}" title="{Headline}"><img src="_images/catalog/thumbs/Art/{Picture_File}"></a></div>
            </div>
            <div class="StackedContainer">
              <div class="StackedColumn"> {Item_Last_Name}, {Item_First_Name}</div>
              <div class="StackedColumn"> {Item_Code_Number}</div>
              <div class="StackedColumn"> {Headline}</div>
              <div class="StackedColumn"> {Complete_Description}</div>
              <div class="StackedColumn"> {Item_Code_Number}</div>
              <div class="StackedColumn"> <strong>Retail price: {Retail_Price}</strong></div>
            </div>
            <br style="clear:both; line-height: 0px" />
          </div>
        </div>
    Thanks in Advance

    There are many options for editing objects/layers in the time line. You can split tracks, slip videp, trim, delete, cut, copy and paste etc. Without more specifics about what you want to do I would suggest you review the users guide. Select help to open the manual and then go to Timeline>Edit objects in the timeline. I am sure you will find the answer to your question.

  • Can you pass an array URL variable

    Hi,
    Doing a form which I want to validate, then re-display with
    error messages and the keyed data still in place should there be
    errors, or go onto a second form if all ok.
    I have tried to use <form
    action="<?=$_SERVER['PHP_SELF']?>" but as the various
    outcomes result in different screens I can't see how to do it
    without having reams of duplicate code - I couldn't make it work
    satisfactorily anyway.
    So I decided to do it in two stages - form (user screen) + a
    separate validation routine which passes validation results back if
    there are errors by calling the first screen but with URL variables
    to trigger process variations or go onto screen 2 if all ok.
    But I'm struggling with this .. two questions:
    i) Ideally I would like to use a session variable to pass
    actual error messages back to screen one in the event of errors but
    if I undertand things correctly (which is by no means certain)
    $S_Session is already an associatve array so it wouldn't be so easy
    to just add a variable number of messages to it and then know what
    you are unpacking elsewhere ... do you know what I mean?
    Perhaps if I give you my second question it may help
    illustrate what I'm going on about in part 1
    ii) The way I have tried to do it is to set it up as an array
    ($ERRORS) in the validation module and then added a text string
    each time I hit a specific error. The hope was that I could then
    send this back via the URL for further process but I'm getting
    syntax problem so maybe this is not possible .... a brief example
    Input Form php:
    $ERRORS = array();
    $ERRORS = $_GET['errors']
    if (sizeof($ERRORS) > 0) {
    echo "<p class=\"val_err_hdr\"> *** Validation
    error(s) - please correct the entries and try again ***
    </p>";
    blah blah
    Validation php:
    $ERRORS=array();
    if(!$loginFoundUser) {
    $ERRORS[] = "This e-mail address entered has already been
    registered on our database - if you have already registered you
    can"; }
    header("Location: input.form.php?errors=$ERRORS");
    When I run this I get a syntax error 'unexpected T_IF' on the
    'sizeof'' function condition.
    Any help much appreciated.

    .oO(patricktr)
    > Doing a form which I want to validate, then re-display
    with error messages and
    >the keyed data still in place should there be errors, or
    go onto a second form
    >if all ok.
    OK, quite common.
    > I have tried to use <form
    action="<?=$_SERVER['PHP_SELF']?>"
    Avoid short open tags, they are unreliable. Use "<?php
    print " instead
    of just "<?=" to be safe and independent from the server
    configuration.
    >but as the
    >various outcomes result in different screens I can't see
    how to do it without
    >having reams of duplicate code - I couldn't make it work
    satisfactorily anyway.
    What's a "screen" in this case? Just another part of the form
    or a
    completely different page?
    > So I decided to do it in two stages - form (user screen)
    + a separate
    >validation routine which passes validation results back
    if there are errors by
    >calling the first screen but with URL variables to
    trigger process variations
    >or go onto screen 2 if all ok.
    Don't use URL parameters in such a form processing scenario.
    Use a
    session instead, that's what they are for. The length of URLs
    is limited
    and there are things you simply don't want to pass between
    pages, but
    keep on the server instead.
    > But I'm struggling with this .. two questions:
    >
    > i) Ideally I would like to use a session variable to
    pass actual error
    >messages back to screen one in the event of errors but if
    I undertand things
    >correctly (which is by no means certain) $S_Session is
    already an associatve
    >array so it wouldn't be so easy to just add a variable
    number of messages to it
    >and then know what you are unpacking elsewhere ... do you
    know what I mean?
    The $_SESSION array itself is strictly associative, the used
    indexes
    must be strings or the serialization of the session data will
    fail.
    But if course you can always do things like this:
    $_SESSION['errors'] = array();
    $_SESSION['errors'][] = 'something went wrong';
    > Perhaps if I give you my second question it may help
    illustrate what I'm going
    >on about in part 1
    > ii) The way I have tried to do it is to set it up as an
    array ($ERRORS) in the
    >validation module and then added a text string each time
    I hit a specific
    >error. The hope was that I could then send this back via
    the URL for further
    >process but I'm getting syntax problem so maybe this is
    not possible .... a
    >brief example ...
    As said above - use the session instead.
    > Input Form php:
    > $ERRORS = array();
    > $ERRORS = $_GET['errors']
    There's a ';' missing at the EOL (this causes the error you
    mentioned
    below).
    Just a naming hint: Variables should not be named all
    uppercase (except
    for the predefined superglobal arrays). Such names should be
    reserved
    for constants. The most common style looks like this:
    myNiceFunction()
    $myNiceVariable
    MY_NICE_CONSTANT
    > if (sizeof($ERRORS) > 0) {
    if (!empty($_SESSION['errors'])) {
    > header("Location: input.form.php?errors=$ERRORS");
    The Location URI must be absolute including scheme and
    hostname. This is
    required by the HTTP spec:
    header("Location:
    http://$_SERVER[HTTP_HOST
    But I'm still not sure why you would need this redirect. The
    entire
    handling of a form (validation, processing) can be done on a
    single
    page. Only if the processing succeeds, you might want to
    redirect to
    some result page.
    Micha

  • Spry dataset is not working properly in IE8, Help me plz...

    I am a new user of dreamweaver CS5. I have designed some pages which are using Spry Dataset. It is working perfect in Firefox and IE 7 but it was not working at all in IE 8. Ben asked me to paste the following into the <HEAD> section
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    and after doing that it was working properly. But today I tested my site again and I came to know that it is only showing the Master Table, when we click on any master Picture of Spry Dataset it is not showing the details.
    Here is the link of  my site
    http://dsdforu.com/WomensKNewArrivalCollection.htmlhttp://www.dsdforu.com/WomensKSDWCollection.html
    I was trying to solve it by myself but I can't. Can any one tell me what am I doing wrong? or what would be the solution.
    Thanks for your time.
    Suboohi

    Hi Suboohi,
    I think the problem may be the pictures themselves. They do not seem to be loading quickly which gives the impression that they are not showing, especially when you have a slow connection.
    You might look at optomising the pictures and preloading the images to allow your site to work properly.
    I hope this helps.
    Ben

  • Url variable doesn't work in IE

       Hey guys, my page, www.powerhouse.com/Products/Inventory.php I have a bunch of links that reload the page with a url variable.  If FF 3, this works fine, yet in IE 8 the page does not load.  My error log has the following error:
    script '/var/www/powerhouse/public_html/Products/inventory.php' not found or unable to stat
    what stupid IE Hack do I need to get this to work?

    PHE Admin wrote:
    My error log has the following error:  
    script '/var/www/powerhouse/public_html/Products/inventory.php' not found or unable to stat
    what stupid IE Hack do I need to get this to work?
    You don't need any IE hack. I have just tested the page in both FF and IE8. It works just fine in both.
    However, it's very noticeable from your error log that it refers to inventory.php (all lowercase), whereas the actual page is Inventory.php (initial cap). The other thing that's noticeable is the path, which indicates your server is running on Linux, which is case-sensitive.
    From this, I conclude that you originally coded the page using inventory.php, and later updated it. This suggests that IE8 is probably still using a cached version. Clear your cache, and the problem will probably go away.

Maybe you are looking for