Spry with LightBox script

Hello all, I am new into spry framework but I managed to use
it with prototype, lightbox and scriptaculous.
The question is how can I access the {ds_RowID} and
{ds_RowCount} from Javascript?
I am using the following that works but returns Script Error.
var myCurRow = eval('{ds_RowID}');
var myTotalRow = eval('{ds_RowCount}');
if ( (myCurRow+1) >= myTotalRow) {
localinit();
I am using the following to create the XML instanses:
var dsGalleries = new
Spry.Data.XMLDataSet("/ssp_director/galleries.php",
"galleries/gallery");
var dsGallery = new
Spry.Data.XMLDataSet("/ssp_director/galleries.php",
"galleries/gallery");
var dsPhotos = new
Spry.Data.XMLDataSet("{dsGalleries::@file}",
"gallery/photos/photo");
Thank you for your help.
Yiannis

Hi Yiannis,
You want to do something like this:
var myCurRow = dsPhotos.getCurrentRow().ds_RowID;
var myTotalRow = dsPhotos.getRowCount();
--== Kin ==--

Similar Messages

  • Spry and Lightbox II

    I just finished a photo Gallery using Spry and Lightbox, any
    feedback would be greatly appreciated.
    http://www.daishocreative.com/ourWork/index.html
    Thank you and happy Holidays

    This is what you get with script disabled:
    http://www.projectseven.com/cs4public/spgalusable.gif
    You also need a loading image to indicate something is
    happening when you
    click a thumbnail and your VCR controls are not apparent
    enough.
    Al Sparber - PVII
    http://www.projectseven.com
    The Finest Dreamweaver Menus | Galleries | Widgets
    http://www.projectseven.com/go/pop
    The Ultimate DW Menu System
    "extrem94" <[email protected]> wrote in
    message
    news:gjavpb$7uf$[email protected]..
    >I just finished a photo Gallery using Spry and Lightbox,
    any feedback would
    >be greatly appreciated.
    >
    http://www.daishocreative.com/ourWork/index.html
    >
    > Thank you and happy Holidays

  • Spry with Drupal 6?

    Has anyone had any luck integrating Spry with Drupal 6.x?
    I found some support for Drupal 5 such as this module:
    http://drupal.org/project/spry
    Thanks in advance for any pointers.
    Dave

    Hi,
    You are really close.
    Give the first UL an ID:
    <ul id="MenuBar1" class="MenuBarHorizontal menu" >
    and add the other class.
    After the list markup, add a constructor:
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1");
    //-->
    </script>
    And then attach the required files to the head:
    <script src="SpryAssets/SpryMenuBar.js"
    type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css"
    rel="stylesheet" type="text/css" />
    Here it is working:
    http://www.dbooth.net/spry/menu.htm
    Hope this helps,
    Don

  • Looking for jquery lightbox script that stretches image to fill viewport

    There are a lot of lightbox scripts out there, but most of them seem to favor static-sized images.
    I'm surprised that I haven't been able to find too many of these scripts allow for images to make maximum use of a viewport's dimensions. In other words, lightbox-style scripts that will fit the target image inside the viewport (while retaining the image's native proportions), whatever size said viewport may be.
    I can easily imagine everyone from graphic designers, to painters, to photographers jumping on such a tool. After all, there's nothing worse than looking at a 500px image on a 1920px display. It makes the work feel small, and by proxy, the work's author look small.
    Granted, for the images to not appear stretched, the native size of the image would have to be larger than needed for most visitors, but portfolio websites aren't high-traffic websites. They're solely visited by potential employers and clients, and loading time isn't much of a concern anymore with today's average home broadband speeds topping 1mb/s.
    Ideally, the script would grey-out the website, and display an image to match 95% of the viewport's X or Y resolution (whatever is smallest) while retaining the image's native proportions.
    Does anyone know where I can find such a script, preferable in jquery (since I'm already using it on my website)?

    Finally found one! -> http://www.shadowbox-js.com
    I've been testing it out, and it does exactly what I described above. It's great.

  • How use Spry detailregion inside script ?

    Hi everybody, someone can help me how can i do that work ? I am trying to send information to Flickr API to create image galleries with information from my database...
    <div id="content2" spry:detailregion="ds1">  
        <script src="badge.js" type="text/javascript"></script>
        <script src="http://api.flickr.com/services/feeds/photos_public.gne?id=23366962@HU5&tags={ds1::flickr}&format=json" type="text/javascript"></script>
    </div>
    Thank YOU !!!!

    OK... nobody yet...
    I am trying something different now using PHP, but still not getting what i want:
    <?php $recentPhotos = $gallery->findRecentPhotos(30,?> {ds1::url}<?php ); ?>
    Someone can help me in that ?
    Thanks !!!

  • Error message with a script sending emails to multiple recipients.

    Hi all,
    I am very new with powershell scripting and I want to request your attention and help on this issue.
    I am getting this error message "Send-MailMessage: An invalid character was found in the mail header: ','" given by this script:
    Param (
    [string]$Path = "C:\Temp\",
    [string]$SMTPServer = "smtp.domain1.com",
    [string]$From = "[email protected]",
    [string[]]$To = "[email protected],[email protected]",
    [string]$Subject = "New backup file"
    $SMTPMessage = @{
    To = $To
    From = $From
    Subject = "$Subject at $Path"
    Smtpserver = $SMTPServer
    $File = Get-ChildItem $Path | Where { $_.LastWriteTime -ge [datetime]::Now.AddHours(-6) }
    If ($File)
    { $SMTPBody = "`nThe following files have recently been added/changed:`n`n"
    $File | ForEach { $SMTPBody += "$($_.FullName)`n" }
    Send-MailMessage @SMTPMessage -Body $SMTPBody
    I found the ForEach() approach but when I put it inside I get an infinite loop.
    Many thanks for any suggestions

    [string[]]$To = "[email protected],[email protected]",
    should be
    [string[]]$To = @("[email protected]","[email protected]")

  • Problem with Java Script after upgrade from BW 3.5 to BI7

    Dear Colleagues,
    We're facing the issue with Java Script after upgrade of BW 3.5 to BI7.
    Just after update we checked the basic functionality and it occured that some of web templates that use Java Script don't work. They generate seelction screen, but after selection the screen becomes blank without any error messages.
    We're currently stucked since web templates weren't converted to BI7 version so they should work exactly as before the upgrade.
    We compared the Java code with other environment that was not upgraded - it's perfectly the same.
    The only explanation that comes to my mind is that some Java Script settings on the server level were changed during the upgrade but I have no idea where I can check that.
    Thanks in advance for any suggestions,
    Andrzej Bobula

    Hi Deepu,
    Thanks, it was great to read your reply and then few minutes later talk to you live on SDN Day!
    Unfortunately, http cache clean-up did not help. But there is another funny thing I found - for exactly the same 3.5 webtemplate html code returned from WebAS 3.5 was different then from 7.0.
    Unfortunately, this editor does not allow to paste complete code, even in CODE brackets, but here are main differences:
    <b>3.5</b>
       if (navigator.appName == "Microsoft Internet Explorer")
    <frame src="/sap/bw/BEx?SAP-LANGUAGE=E&PAGENO=1&REQUEST_NO=1&CMD=GET_TEMPLATE"
    name="Content">
    and
    <b>7.0</b>
       if (navigator.appName.indexOf("Microsoft Internet Explorer")!=-1)
    <frame src="/sap/bw/BEx?SAP-LANGUAGE=E&PAGENO=8&REQUEST_NO=0&CMD=GET_TEMPLATE"
    name="Content" 0nLoad="javascript:loadTitle()">
    (I intentionaly put 0 i/o o in 0nLoad, otherwise Forum's editor does not accept the text.
    How about SAP's claim that technical upgrade from 3.x to 7.0 changes nothing?
    Regards,
    Vitaliy

  • Need help with a script applied by GPO

    Hello,
    I need to automate WebFeed insertion for Remote App Users at user logon.
    RDS 2012 R2 in place. Remote Apps are provided to W7 clients.
    Currently, WebFeed link must be inserted manually in each user's Control Panel\RemoteApp and Desktop Connections. There
    is no straight forward way from Microsoft.
    But there is a script and instruction I found on web...
    I followed the instruction... Created GPO. GPO applies to user but nothing happens.
    Can somebody check the script and the instruction that I could wrongly applied.
    In instruction there is no word about changing something in the script but only wcx file that the script should
    use.
    The script is below and here is my .wcx file:
    <?xml version="1.0? encoding="utf-8? standalone="yes"?>
    <workspace name="Enterprise Remote Access" xmlns="http://schemas.microsoft.com/ts/2008/09/tswcx" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <defaultFeed url="https://my_webserver_real_FQDN/rdweb/Feed/webfeed.aspx" />
    </workspace>
    I changed the quotes to vertical (") from (”) that
    were in my wcx when copied the lines from web.
    Still not works.
    I
    checked Application log, PowerShell and RemoteApp in eventviewer under user session
    Everything is clean.
    Were I can check the script execution log?
    When the user with applied script logs in, the icon of Remote
    connection appears for 10 seconds on the task bar and disappears.
    Looks like it's trying...
    Check please if the script really should not be touched and provide some troubleshooting
    steps.
    Thanks!
    INSTRUCTIONS from
    the link:
    http://www.concurrency.com/infrastru...rver-2012-rds/
    "Unfortunately
    Windows 7 clients are out of luck here. If you really want to use GPO to deploy
    RemoteApps to Windows 7 clients, then you have to jump through a few
    hoops.
    Create a new GPO and under User ConfigurationPoliciesWindows
    SettingsScripts, double click Logon and click the
    Show Files
    button. This will open an explorer window where you can copy files that will be
    saved within this GPO. Download the
    Install-RADCConnection.ps1 script from the TechNet gallery and
    save it there. Also create a new Text file named something like feed.wcx,
    open it in Notepad and paste in the following three lines of text:
    <?xml
    version=”1.0″ encoding=”utf-8″ standalone=”yes”?>
    <workspace
    name=”Enterprise Remote Access” xmlns=”http://schemas.microsoft.com/ts/2008/09/tswcx”xmlnss=”http://www.w3.org/2001/XMLSchema”>
    <defaultFeed
    url=”https://rds.domain.com/RDWeb/Feed/webfeed.aspx”
    />
    </workspace>
    Now select the PowerShell Scripts tab and
    click the Add button.
    Click Browse and select the .ps1 file and
    for the parameters enter the name of the wcx file. Click OK twice and you are
    ready to scope that policy to a set of users.   
    <#
    .SYNOPSIS
    Installs a connection in RemoteApp and Desktop Connections.
    .DESCRIPTION
    This script uses a RemoteApp and Desktop Connections bootstrap file(a .wcx file) to set up a connection in Windows 7 workstation. No user interaction is required.It sets up a connection only for the current user. Always run the script in the user's session.
    The necessary credentials must be available either as domain credentials or as cached credentials on the local machine. (You can use Cmdkey.exe to cache the credentials.)
    Error status information is saved in event log: (Applications and Services\Microsoft\Windows\RemoteApp and Desktop Connections).
    .Parameter WCXPath
    Specifies the path to the .wcx file
    .Example
    PS C:\> Install-RADCConnection.ps1 c:\test1\work_apps.wcx
    Installs the connection in RemoteApp and Desktop Connections using information
    in the specified .wcx file.
    #>
    Param(
    [parameter(Mandatory=$true,Position=0)]
    [string]
    $WCXPath
    function CheckForConnection
    Param (
    [parameter(Mandatory=$true,Position=0)]
    [string]
    $URL
    [string] $connectionKey = ""
    [bool] $found = $false
    foreach ($connectionKey in get-item 'HKCU:\Software\Microsoft\Workspaces\Feeds\*' 2> $null)
    if ( ($connectionKey | Get-ItemProperty -Name URL).URL -eq $URL)
    $found = $true
    break
    return $found
    # Process the bootstrap file
    [string] $wcxExpanded = [System.Environment]::ExpandEnvironmentVariables($WCXPath)
    [object[]] $wcxPathResults = @(Get-Item $wcxExpanded 2> $null)
    if ($wcxPathResults.Count -eq 0)
    Write-Host @"
    The .wcx file could not be found.
    exit(1)
    if ($wcxPathResults.Count -gt 1)
    Write-Host @"
    Please specify a single .wcx file.
    exit(1)
    [string] $wcxFile = $wcxPathResults[0].FullName
    [xml] $wcxXml = [string]::Join("", (Get-Content -LiteralPath $wcxFile))
    [string] $connectionUrl = $wcxXml.workspace.defaultFeed.url
    if (-not $connectionUrl)
    Write-Host @"
    The .wcx file is not valid.
    exit(1)
    if ((CheckForConnection $connectionUrl))
    Write-Host @"
    The connection in RemoteApp and Desktop Connections already exists.
    exit(1)
    Start-Process -FilePath rundll32.exe -ArgumentList 'tsworkspace,WorkspaceSilentSetup',$wcxFile -NoNewWindow -Wait
    # check for the Connection in the registry
    if ((CheckForConnection $connectionUrl))
    Write-Host @"
    Connection setup succeeded.
    else
    Write-Host @"
    Connection setup failed.
    Consult the event log for failure information:
    (Applications and Services\Microsoft\Windows\RemoteApp and Desktop Connections).
    exit(1)
    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis

    Use GPP for this. Do not use a script.  Post your issues in the GP forum.
    You should also visit the RDS forum to get information on how to distribute remote app links.
    ¯\_(ツ)_/¯

  • What's Wrong With This Script

    A couple of years ago I was using an AppleScript file (thanks to someone else's assistance) but it no longer works.
    I have an extra internal drive, that is partitioned, and used for sequential daily backups. When the computer starts up, of course all the drives mount - but I prefer that they are off the desktop until neded.
    Rather than selecting the volumes and then dragging to the Trash, I found it easier to have a script run at startup which then asks if the drives should be unmounted.
    Things were great - until I upgraded to Tiger.
    I am hoping that someone can tell me what's wrong with the script so that I can start using it again. As you can probably tell, I don't have any experience in AppleScript. At the moment the script runs - it presents the dialogue box - and then just ends after a response, but the drives do not unmount.
    The partitions on the drive are called Monday Tuesday Wednesday Thursday Saturday
    The existing script is as follows:
    on run
    display dialog "Unmount All Backup Drives?" buttons {"Yes", "No"} default button 1
    set x to button returned of result
    if x is "Yes" then tell application "Finder" to eject "Monday"
    end run

    This relates to another (current) thread in AppleScript discussions.
    Your script works with Panther as that operating system allows INTERNAL drives to be "ejected" (and, if you eject one volume on a partitioned drive, all the volumes on that drive are ejected -- this explains why ejecting "Monday" actually ejected Monday through Friday).
    With Tiger, you would find that your script works exactly as expected with EXTERNAL drives, but INTERNAL drives need a different approach.
    To get behavior exactly as you had before, try this script:
    --BEGINNING
    display dialog "Unmount All Backup Drives?" buttons {"Yes", "No"} default button 1
    set x to button returned of result
    if x is "Yes" then set driveName to "Monday"
    set driveInfo to do shell script "diskutil list | grep \"" & driveName & "\""
    set driveID to last word of driveInfo
    do shell script "diskutil unmountDisk " & driveID & ""
    --END
    For reasons that aren't entirely clear to me, this approach, while it works reliably, is very slow -- on my fast machine, the unmount process takes nearly 20 seconds. (Using UNIX directly in Terminal, with the same command, is very quick.) (In the AS, the delay occurs in second "do shell script.")
    Another puzzle that has cropped up is described in the related thread "Applescript to Mount/Unmount a Disk . . ." (current). While the above approach works for Justin Surpless, it often prompts for a password -- unacceptable in his application. I've not seen this on my PPC (and I tried 10.4.7, which he's using); his may be an Intel Mac, if that could be the difference.

  • Change Page size with a Script

    I have made artwork in Illustrator that is set up as two page spreads on 1 artboard.
    I need to convert this to single page spreads.
    I.e. So for half the documents, I need to set the anchor point of the document to top left and half the width of the artboard.
    For the other half of the documents, I need to set anchor point to to right and half the width.
    Is this possible with scripting?
    I have look around online to find ways of accessing the document size and anchor point via scripting, but cannot seem to find any resources.
    Thanks for any help that can be offered.
    Edit: Also is it possible to create a new artboard with a script and assign it a name?

    here you go, this script splits the artboard in two
    // carlos canto
    // http://forums.adobe.com/message/5380624#5380624
    var idoc = app.activeDocument;
    var ab = idoc.artboards[0];
    var abBounds = ab.artboardRect;// left, top, right, bottom
    var ableft = abBounds[0]; // 0
    var abtop = abBounds[1]; // 612
    var abright = abBounds[2];
    var abbottom = abBounds[3];
    var abwidth = abright - ableft; // 792 // width
    var abheight = abtop- abbottom; // 0 // height
    var half = ableft + abwidth/2;
    var abright2 = half;
    ab.artboardRect = [ableft, abtop, abright2, abbottom];
    var ableft2 = half;
    var newAB = idoc.artboards.add([ableft2, abtop, abright, abbottom]);

  • How to install adobe flash player through command line with some script

    Hi Guys,
    Do you know how to install adobe flash player through command line with some script?
    Thanks,
    Galina

    Windows. I tried silent install  with "install_flash_player.exe /install" but it works only with one file that I downloaded from adobe.com - "install_flashplayer10_mssd_aih.exe". But it is possible to download this last file only one time, every next time it redirects me to download install_flash_player.exe file.

  • How to make a selection of a layer delete content and paste another content with Photoshop scripting..?

    how to make a selection of a layer delete content and paste another content with Photoshop scripting..?

    There is a more specific Forum …
    Photoshop Scripting

  • NEED a java coder to help with a script for a programs of mine.

    I play a game, very competitively, and need someone to make and compile a script for me. I am willing to pay upwards of 100 USD for this script made to MY standards. There will be a lot of work involved...Probably 12 hours studying my game and the purpose of the script(s). I will be buying 2-3 scripts, at roughly 50-100 USD each, depending on the quality. I will transfer the money via paypal, or other means if we can reach an agreement.
    Please IM me at Chadtrapier on AIM or send an email to [email protected]
    Or...Add me on MSN - [email protected]
    We can reach an agreement with these scripts...
    Thank you, I will also check this thread, so reply if you would like.
    ~Chad

    Ummm. Do you think that's a lot of money or something? Think in the range of 40-60 per hour. And if you're talking about warcraft I don't think they java hooks to make bots. I think you need to figure out what your problem is first and maybe learn to code them yourself.

  • Renaming a Swatch with a script

    I was wondering if it is possible to rename a swatch with a script. In an open document I would like the script to run and do the following:
    If swatch Pantone 032 is in the document change the swatch name to 032 (Red).
    If swatch Pantone 577 is in the document change the swatch name to 577 (Drain).
    I have a list of 35 swatches that if they are in the document I need them renamed.
    Anyone offer some help?
    Thanks to the community for offering support to guys that struggle with or have no background in coding!

    I have done the exact same process as what you are looking for. I got this working:
    var SW = app.activeDocument.swatches;
    if (SW.length > 0) {
        for (i=0; i < SW.length; i++){   
            changeName(SW[i]);
    function changeName(swatchObject){
                    if (swatchObject.name == "10 YELLOW"){                       
                        swatchObject.name = "10 yellow";
                    if (swatchObject.name == "12 YELLOW"){                       
                        swatchObject.name = "12 yellow";
    In this instance, it changed 10 YELLOW and 12 YELLOW to a lowercase name. You would need to go in and type in a conditional statement for each swatch you are wanting to rename.
    When the script is ran, it doesnt appear to update the swatch name. However, if you double click on one of the swatches, the name that is showed will be the changed value, and when you hit cancle on that pop-up dialogue, all the others will switch to the new name.
    Anybody know if there is a way to update the swatch palette within the script to show the new names automatically?

  • Changing SPRM 0 with a script ?

    Hi list,
    In have searched the archives but I did not found an answer or solution: Is there any way you can change SPRM 0 (menue language) with a script ???
    Any help would be great, Michael

    Hi Chris,
    let me first distinguish between a normal menue and a "language menue" which is a menue that is automatically created when you add a second language to the project. Lets say we have got English an Spanish as languages - so in the menue tab you have the option to choose between english and spanish. Now in the scripts I find no way to adress a menue according to it´s language. I can adress the main menue - but wether in english or spanish is no available option. Only choice would be to build a completly seperat menue called "main menue spanish" - okay, I could do that - but what reason is left there for the "language menues" - as nobody sets the DVD player correctly anyway?
    But maybe I miss the point - you say "select the correct language based on the users previous selection" - how exactly would you do that? I have stored the users choice in GRPM 0 (eng=0, span=1) and it does change the audiostream and subtitels like expected - how do I change the language ??
    michael

Maybe you are looking for

  • Previewing ASPX in Dreamweaver 8

    I would like to preview ASPX files locally in Dreamweaver 8. I suspect you need additional software other than Dreamweaver 8 and an ASPX file to do this. Am I wrong? Could it be possible that I am just not doing the TEST SERVER setup correctly? So 1-

  • Can i do airplay from my Macbook pro to my appleTV????

    can i do airplay from my Macbook pro to my appleTV????

  • Trouble printing

    I have an all-in-one printer, scanner & copier - Model PSC`1315V - I can scan, print a test page - make a copy of document but cannot print anything from the computer - either on notebook word  or print out an E-mail - when i write a document and pre

  • Placing ScrollBar Back On Top Of The JScrollPane

    Hi.... Just a tiny problem......I have a problem placing the scrollbar back on top of the JScrollPane after few sentences of words are placed into the JTextArea at once. The JTextArea is within the JScrollPane. Does anyone has any idea on how I can p

  • Sequential reads vs Direct reads

    Hello gurus, Could you please let me know what are the main difference between direct reads and sequential reads in terms of performance? Thanks and best regards,