Binding question i think (:

I'm working on a website (holiday homes for rent). One of the
pages is contact.cfm. People visiting the site will come to that
page after clicking a text link "
Contact us about this house"on a result page with available
holiday homes. The problem is that that result page is not an
actual part of my webpage but a external page loaded in a frame in
my website. The contact link for a particular house looks like
this:
http://www.a20realestate.com/contact.cfm?ref=REF000176
What I would like is that the reference number appears in my
contact.cfm page
How do I accomplish that? Has it something to do with formurl
or binding?
Thanks in advance

Url variables passed to contact.cfm are accessible in the
url structure
<!--- in contact.cfm --->
<cfif isDefined("url.ref")>
<cfoutput>reference number is
#url.ref#</cfoutput>
</cfif>
To display all url variables ..
<cfdump var="#url#">

Similar Messages

  • Question: I think I made mistakes using several different id apple. How can I cancel all of them except the one I would like to maintain ?

    Question: I think I made mistakes using several different id apple. How can I cancel all of them except the one I would like to maintain ?

    From Here   http://support.apple.com/kb/HE37
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.

  • Quick Easy Question- I think...

    If you have 15 expressions, concatenated by Boolean OR's, how many of the expressions must be true for the entire thing to be true? My friend and I are arguing whether the answer is...
    a. at least 1
    b. all of them
    c. cannot be determined
    Thank you so much for your input. We are studying for an exam, trying to finish the practice questions. I appreciate any input and your time!! :-)

    Hi,
    Programming languages are created by humans, and therefore it is usually pretty easy to answer such questions. Think about the human language..
    Do you have a car or a house or a space ship?
    Any one who owns a car or a house would answer yes, even if they didn't own a space ship. That is, the whole expression evaluates to true if one of the statements is true.
    /Kaj

  • Might go for T400/500- Many questions concerning Think Vantage

    Hi,
    I am deciding on my first IBM, a T400 or T500
    I have a few questions concerning the Think Vantage Function:
    a) Does the recovery DVD set back the hard drive partitions to factory settings?
    b) Does the Think Vantage function set back the hard drive partitions to factory settings?
    This means the original size of the partitions, when they have been changed manually.
    c) Does Think Vantage work with a self buyed Windows Vista?
    d) Does Think Vantage work unter Windows XP
    e) Does Think Vantage need drivers/ anything else to work or is it entirly working on the hardware side, so no software/ windows is needed
    f)Will Think Vantage work under Windows 7 in a T400/500
    g) How was the past situation? Did a under Windows XP working Think Vantage also work on Vista / have there been drivers delivered, when needed, for the new OS
    h) Is it possible to set up a new OS (like Vista Ultimate) and then backup it up on a external hard drive and later recover from this?
    What do I want to achieve?
    I want to recover the factory settings at all times, this means partition size, number of partitions etc. and Windows Vista Business. Then I want to install Vista Ultimate do my settings and backing it up to an external drive or whatever and then recover from that all 3 Months. In the end I should be able to set back factory settings with the earliest/ first backup from Windows Business; Furthermore I might want to install Windows 7 sometimes.
    Thank you for your help! Kind regards
    Message Edited by Schwenker on 11-23-2008 08:23 AM

    Hello,
    I would recommend Acronis to do this job. Here is a link at thinkpad-forum.de.
    You´ll  get Acronis for free if you buy a PCWelt.
    Your answers:
    A. yes
    B: yes
    C: yes
    D: yes
    E: No, windows is needed and if it´s XP than MS NET 2.0 also.
    F: yes, when windows 7 is out, than Thinkvantage will work then, on Server 2008 it seems to work.
    G:Thinkvantage work in Vista and XP environment.
    H: yes, you can backup it on a extern hdd and later recover the R&R Image to the internal disc.
    What do I want to achieve?
    I would recommend Acronis to do this job. Here is a link at thinkpad-forum.de.
    You´ll  get Acronis for free, if you buy a PCWelt.
    here are some interesting benchmark with first versions of Windows 7 and XP.
    Windows 7 unmasked
    Perceptions becomes reality
    Message Edited by Agotthelf on 23-11-2008 10:23 PM
    Follow @LenovoForums on Twitter! Try the forum search, before first posting: Forum Search Option
    Please insert your type, model (not S/N) number and used OS in your posts.
    I´m a volunteer here using New X1 Carbon, ThinkPad Yoga, Yoga 11s, Yoga 13, T430s,T510, X220t, IdeaCentre B540.
    TIP: If your computer runs satisfactorily now, it may not be necessary to update the system.
     English Community       Deutsche Community       Comunidad en Español

  • Begginer`s question . i think

    Okey .. so i'm new with java but i need to find out something ..
    i'm using a java application for my mobile, a notepad to be exact.
    For it to store notes it uses a .rms file ( from what i've seen is a db of somekind ).
    I was wondering if there is a application or something to see all the entries of this .rms file from the pc and to edit them.
    Is this possible ?
    Thank you.

    Yes. About that.
    What is the reason that it's phone dependent ?
    I've seen a lot of similarities in .rms files with different records:
    The begging is the same:
    midp-rms   [?     :??wI"?9*{??????   and i think after there some variabiles that are in some connection with the file size and the number of the records
    and the separator from recordings is:
          ?       ( where ^ is variabile )
    So .. i repet my question: What is the reason that rms files are phone dependent ?

  • WSIF Binding Question

    I have a question about the capabilities of WSIF Bindings.
    In our current environment we have several session beans that we want to invoke from a BPEL process. We would like to invoke the session bean using a local interface and not the remotee interface. Is this possible?
    Some of the parameters for the methods on our EJB takes Java classes generated by the XMLBeans tool. As a result the classes are not serializable. Does WSIF require parameters to be serializable?
    Thanks,
    Frank

    A single instance is created at the first invocation [note: The initiate( null ) operation is invoked if the class is an instance of IWSIFJavaService].
    That single java object is invoked (concurrently) by all the process instances when they reach an <invoke> node which leverage WSIF Java binding.
    Edwin

  • Binding Question

    Ok, I'm slowly, slowly starting to get my tiny little brain around the binding API.
    I've worked out the following bit of code to 'or' together a bunch of boolean values:
    BooleanProperty parent = new SimpleBooleanProperty();
    BooleanProperty child1 = new SimpleBooleanProperty();
    BooleanProperty child2 = new SimpleBooleanProperty();
    BooleanProperty child3 = new SimpleBooleanProperty();
    parent.bind(child1.or(child2).or(child3));
    System.out.println(String.format("0) Parent=%s (child1=%s, child2=%s, child3=%s)",
            parent.get(), child1.get(), child2.get(), child3.get()));
    child1.set(true);
    System.out.println(String.format("0) Parent=%s (child1=%s, child2=%s, child3=%s)",
            parent.get(), child1.get(), child2.get(), child3.get()));Seems obvious now but originally I spent a lot of time working out why this wouldn't work (I guess I was thinking that since the '.bind' method was like an 'equals', the '.or' method was similar):
    // don't do this at home
    parent.or(child1);
    parent.or(child2);
    parent.or(child3);My problem now is that I don't know my variables up front. Imagine I've got a class that gets boolean values passed to it to bind to, how do I progressively bind to it in a nice way? Do I need to keep track of the BooleanBinding instance and add to this?
    The best I've come up with for doing this is the following, but this seems horribly complex for what I want to do and I reckon (hoping) I'm missing something. Can anyone streamline the following at all?
    public class MyClass
        private BooleanProperty parent;
        private BooleanProperty first;
        private BooleanBinding binding;
        public MyClass()
            parent = new SimpleBooleanProperty();
        public void trackThisGuy(BooleanProperty child)
            if (first == null)
                // first guy we have to bind directly
                parent.bind(child);
                first = child;
            else if (booleanBinding == null)
                // second guy we have to create our binding with the first guy
                booleanBinding = first.or( child );
                parent.bind(booleanBinding);     
            else
                // everyone else we add to our binding and rebind
                booleanBinding = booleanBinding.or(child);
                parent.bind(booleanBinding);
    }I feel like I should be able to replace that whole mess of if-else statements with a single line of something like parent.or(child) but, as we found out above, that doesn't work.
    Currently I'm just holding onto the BooleanProperty's passed in and then recreating the whole binding each time but this is not nice either.
    Cheers for the help,
    zonski

    Hi Michael,
    I have a few scenarios where I have hit this issue.
    One example is the 'glasspane' example I have mentioned in a few posts earlier. In this, I have a top-level StackPane with a 'glasspane' in it that blocks the dialog (by preventing input and showing a loading cursor) whenever one of the child controllers is 'busy' (i.e. it is running a background thread).
    The child controllers get added and removed dynamically on a regular basis. So I'd like to be able to have a method to do something like:
    public void registerBusyWorker(BusyWorker child)
        glassPane.visibileProperty().orWithCurrentBinding(child.busyPoperty());
    public void removeBusyWorker(BusyWorker child)
        glassPane.visibileProperty().removeFromCurrentBinding(child.busyPoperty());
    } I've just used those method names to be explicit about what I am trying to do, I'm not suggesting they would be good names.
    Of course I could implement this with the low level API and I could do it the old fashion way and roll my own event handlers, etc. I was just expecting the high level binding to give me something nice in this space. It could be that my case falls outside the 80-20 rule and it may not be worth catering for, but I've certainly hit it. Maybe my expectations of the API have been influenced by the Hibernate Criteria API too (http://docs.jboss.org/hibernate/core/3.3/reference/en/html/querycriteria.html) which has similar Java based 'expressions' but a totally different way of doing it.
    If I implemented it using the low-level binding API I believe it would look like this:
    private List<BusyWorker> busyWorkers = new ArrayList<BusyWorker>();
    public void registerBusyWorker(BusyWorker child)
        busyWorkers.add(child);
        child.busyProperty().addListener(this);
        updateState();
    public void removeBusyWorker(BusyWorker child)
        busyWorkers.remove(child);
        child.busyProperty().removeListener(this);
        updateState();
    public void changed(ObservableValue<? extends Boolean> source, Boolean oldValue, Boolean newValue)
        updateState();
    protected void updateState()
        for (BusyWorker : busyWorkers)
            if (busyWorker.isBusy())
                glassPane.setVisible(true);
                return;
        glassPane.setVisible(false);
    }

  • Simple audio question (I think)

    Thanks everyone for answering this question which I think is fairly simple. I have a new TV that I use as the monitor for my computer and connect my Itv to. Currently I have both the cable, my computer and ITV hooked up through HDMI. Whenever I switch between the different HDMI inputs I obviously do not continue getting the sound out from my ITV. The question is I would like to be able to leave my ITV running while it is playing music to my stereo and surf the internet with my computer output on the screen. I know I could obviously play Itunes on my computer however the ITV seems to have much better output quality. Anyone has a solution for this?
    I look forward to your answers. Have a great day and thanks again.
    Message was edited by: mameares

    Welcome to the  Discussion Forums.
    Not without some other device to feed audio through. Your tv will only play from one input at a time, when you switch to the input from your mac/pc, it will always cut off the audio from other inputs.

  • Http Binding question

    Hello guys.
    I'm new in SOA Suite :) I have question about HTTP binding adapter. I downloaded MS wfetch application to test my REST composite application. I try invoke my composite :
    Host: 192.168.10.2:8001\r\n
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n
    Accept-Language: en-us,en;q=0.5\r\n
    Accept-Encoding: gzip,deflate\r\n
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n
    Content-Type: application/x-www-form-urlencoded\r\n
    \r\n
    entry_id=test&entry_type=eee&file_name=aaa&mime_type=fff&meta_data=rrrr
    At response I got :
    HTTP/1.1 500 Internal Server Error\r\n
    When I try to invoke my REST composite using xml it's work fine !! At Oracle MAN :
    For HTTP POST request methods, you can select a payload type of either URL-encoded (ampersand-separated name-value pairs) or XML.
    Please help me.
    Edited by: user5427713 on Feb 22, 2011 11:49 PM
    Edited by: user5427713 on Feb 22, 2011 11:50 PM

    Thank you. I created composite where interface is JCA HTTP Bindung Adapter. At Adapter configuration I set
    Verb : POST
    Payload Type : url-encoded
    Endpoint : /soa-infra/services/CDP/CDPProxyREST/ProxyInterface
    At Wfetch :
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n
    Accept-Language: en-us,en;q=0.5\r\n
    Accept-Encoding: gzip,deflate\r\n
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n
    Content-Type: application/x-www-form-urlencoded\r\n
    \r\n
    entry_id=test&entry_type=eee&file_name=aaa&mime_type=fff&meta_data=rrrr&uploadedFile=ddddd
    I got response error :
    HTTP/1.1 500 Internal Server Error\r\n
    X-Powered-By: Servlet/2.5 JSP/2.1\r\n
    X-ORACLE-DMS-ECID: 0000ItIYiI55yWK5qVp2iY1DN_6b00147b\r\n
    When I create request :
    Content-type: text/xml\r\n
    SOAPAction: "Request-Response"\r\n
    \r\n
    <soapenv: ... >
    <root:root><root:entry_id>ssadsd<root:entry_id><root:.......</root:root>
    I got normal response with data without error.

  • Another CFInput and CFC Binding question.

    I have been away from CF since version 5.  Now, I have a need to start back up
    on CF, but at version 9.  I am kind of liking these cfc's.
    Here is what I am having trouble with:
    I have a cfform(html) that has a handful of elements in it.  The first element is a cfselect which is bound to cfc.getClientList(Done this way to allow the drop down to be reusable).  This piece of the puzzle works just fine.  What I am trying to do from this is when a user selects a client from the dropdown, the remaining five elements are bound to another function called getClientDetail which has a returntype of query.  I want to be able to bind the 5 columns returned in my query to the 5 cfinputs below my cfselect.  Any thoughts on this would be helpful as I have tried almost everything I can think of to make this work.

    Copy the following 2 files into the same directory under your web root. The comments are self-explanatory.
    selectEmployee.cfm
    <!--- The cfajaxproxy tag creates a client-side proxy for the Employee CFC.
            View the generated page source to see the resulting JavaScript. 
            The Employee CFC is in the same directory as this page. --->
    <cfajaxproxy cfc="Employee" jsclassname="emp">
    <html>
        <head>
            <script type="text/javascript">
                /* Asynchronous call to get the employee details.
                   The function is called when the user selects an employee. */
                    var getEmployeeDetails = function(id){
                    var e = new emp();
                    e.setCallbackHandler(populateEmployeeDetails);
                    e.setErrorHandler(myErrorHandler);
                /* Pass the employee name to the getEmployees CFC function. */
                    e.getEmployeeDetails(id);
                /* Callback function: sets the results of getEmployeeDetails into input fields */
                var populateEmployeeDetails = function(employee)
                    var first_name = employee.DATA[0][0];
                    var email_name = employee.DATA[0][1];
                    var department = employee.DATA[0][2];
                    var phone      = employee.DATA[0][3];
                    var location   = employee.DATA[0][4];
                    document.empForm.fname.value = first_name;
                    document.empForm.email.value = email_name;
                    document.empForm.dept.value = department;
                    document.empForm.tel.value = phone;
                    document.empForm.loc.value = location;          
                /* Error handler */
                var myErrorHandler = function(statusCode, statusMsg)
                    /* blank the field entries*/
                    document.empForm.fname.value = '';
                    document.empForm.email.value = '';
                    document.empForm.dept.value = '';
                    document.empForm.tel.value = '';
                    document.empForm.loc.value = '';
                    alert('Status: ' + statusCode + '. ' + statusMsg);
            </script>
    </head>
    <body>
    <cfform name="empForm">
    Employee: <cfselect  value="emp_id" display="name" name="employee" bind="cfc:Employee.getEmployee()" bindonload="true" onChange="getEmployeeDetails(this.value)">
    </cfselect><br>
    First name: <cfinput name="fname"><br>
    E-mail name: <cfinput name="email"><br>
    Department: <cfinput name="dept"><br>
    Telephone: <cfinput name="tel"><br>
    Location: <cfinput name="loc"><br>
    <cfinput name="sbmt" type="submit" value="send" onclick="if(employee.value==''){alert('You must select an employee');return false;}">
    </cfform>
    </body>
    </html>
    Employee.cfc
    <cfcomponent output="false">
    <cffunction name="getEmployee" access="remote" output="false" returntype="any">
    <cfset var getAllEmployees = queryNew("","")>
    <cfset var arr = arrayNew(2)>
    <cfquery name = "getAllEmployees" dataSource = "cfdocexamples">
        SELECT Emp_ID,  FirstName || ' ' || LastName as Name
        FROM Employees
    </cfquery>
    <cfset arr[1][1]="">
    <cfset arr[1][2]="Select employee">
    <cfloop query="GetAllEmployees">
    <cfset arr[currentrow+1][1]=emp_id>
    <cfset arr[currentrow+1][2]=name>
    </cfloop>
    <!--- Alternative, if you require no "Select employee" option --->
    <!--- <cfloop query="GetAllEmployees">
    <cfset arr[currentrow][1]=emp_id>
    <cfset arr[currentrow][2]=name>
    </cfloop> --->
    <cfreturn arr>
    </cffunction>
    <cffunction name="getEmployeeDetails" access="remote" output="false" returntype="query">
    <cfargument name="employee_id">
    <cfset var employeeDetails = queryNew("","")>
    <cfset var emp_id = arguments.employee_id>
    <cfif isNumeric(emp_id)>
        <cfquery name = "employeeDetails" dataSource = "cfdocexamples">
            SELECT firstname, email as email_name, department, phone, location
            FROM Employees
            WHERE emp_id = <cfqueryparam cfsqltype="cf_sql_integer" value="#emp_id#">
        </cfquery>
    </cfif>
    <!--- Will activate error-handler in the caller --->
    <cfif NOT isNumeric(emp_id) or employeeDetails.recordcount EQ 0>
        <cfthrow message="You selected no employee.">
    </cfif>
    <cfreturn employeeDetails>
    </cffunction>
    </cfcomponent>

  • Mutt Binding Question [Solved]

    So I want to be able to abort/exit mutt's line editor with <esc> (like is default in many other programs..). I don't know why, but it seems there is no corresponding binding for this functionality. The default keybind for this is control-g listed here as "n/a."  If I do "macro editor <esc> \cg" escape will just put ^G in the line editor. Does anyone know how to fix this?
    Last edited by angelic_sedition (2014-04-27 05:29:29)

    jasonwryan wrote:http://unix.stackexchange.com/questions … pt-in-mutt
    No real solution on the mutt side it would seem.. that's pretty dissapointing. Enter is basically the same behaviour if nothing is typed and "macro editor <esc> <enter>" works for searches. That's useless for the editor when adding headers though since it will just go to the next header, so I've found the next best solution to be using something like xsendkey or xdotool to fake control-g:
    macro editor \e "<enter><shell-escape>xsendkey Control+g<enter>"
    It will just type the shell command without the first enter when adding headers. I guess this suffices (it doesn't cause any slowdown at least; index bindings work immediately after hitting escape) though I'm kind of surprised mutt doesn't and can't do this..

  • A CSS question I think

    If you would take a look at this page http://www.gcfa.org/add_data.asp you will see that between the header and the navigation bar a white line is there. I don't won't it there, how can I get rid of it?
    It must be in my CSS I guess, I checked the images and neither one of them the Header nor the Navigation menu have a white border. Here's my code. Thanks in advance for your help.
    My page:
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="Connections/BishopsLogin.asp" -->
    <%
    Dim MM_editAction
    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
      MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
    End If
    ' boolean to abort record edit
    Dim MM_abortEdit
    MM_abortEdit = false
    %>
    <%
    If (CStr(Request("MM_insert")) = "form1") Then
      If (Not MM_abortEdit) Then
        ' execute the insert
        Dim MM_editCmd
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_BishopsLogin_STRING
        MM_editCmd.CommandText = "INSERT INTO dbo.DeptData (Department, SubpageTitle, LinkDescription, URL, DateLastModified, ModifiedBy) VALUES (?, ?, ?, ?, ?, ?)"
        MM_editCmd.Prepared = true
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 201, 1, 30, Request.Form("Department")) ' adLongVarChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 201, 1, 1000, Request.Form("SubpageTitle")) ' adLongVarChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 201, 1, 1000, Request.Form("LinkDescription")) ' adLongVarChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 201, 1, 500, Request.Form("URL")) ' adLongVarChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 201, 1, 10, Request.Form("DateLastModified")) ' adLongVarChar
        MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 201, 1, 50, Request.Form("ModifiedBy")) ' adLongVarChar
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
        ' append the query string to the redirect URL
        Dim MM_editRedirectUrl
        MM_editRedirectUrl = "adding_data_results.asp"
        If (Request.Form<> "") Then
          If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
            MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.Form
          Else
            MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.Form
          End If
        End If
        Response.Redirect(MM_editRedirectUrl)
      End If
    End If
    %>
    <%
    Dim rs_Add_Data__MMColParam
    rs_Add_Data__MMColParam = "1"
    If (Request.QueryString("RecordID") <> "") Then
      rs_Add_Data__MMColParam = Request.QueryString("RecordID")
    End If
    %>
    <%
    Dim rs_Add_Data
    Dim rs_Add_Data_cmd
    Dim rs_Add_Data_numRows
    Set rs_Add_Data_cmd = Server.CreateObject ("ADODB.Command")
    rs_Add_Data_cmd.ActiveConnection = MM_BishopsLogin_STRING
    rs_Add_Data_cmd.CommandText = "SELECT ID, Department, SubpageTitle, LinkDescription, URL, DateLastModified, ModifiedBy FROM dbo.DeptData WHERE ID = ? ORDER BY ID DESC"
    rs_Add_Data_cmd.Prepared = true
    rs_Add_Data_cmd.Parameters.Append rs_Add_Data_cmd.CreateParameter("param1", 5, 1, -1, rs_Add_Data__MMColParam) ' adDouble
    Set rs_Add_Data = rs_Add_Data_cmd.Execute
    rs_Add_Data_numRows = 0
    %>
    <%
    Dim MM_paramName
    %>
    <%
    ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
    Dim MM_keepNone
    Dim MM_keepURL
    Dim MM_keepForm
    Dim MM_keepBoth
    Dim MM_removeList
    Dim MM_item
    Dim MM_nextItem
    ' create the list of parameters which should not be maintained
    MM_removeList = "&index="
    If (MM_paramName <> "") Then
      MM_removeList = MM_removeList & "&" & MM_paramName & "="
    End If
    MM_keepURL=""
    MM_keepForm=""
    MM_keepBoth=""
    MM_keepNone=""
    ' add the URL parameters to the MM_keepURL string
    For Each MM_item In Request.QueryString
      MM_nextItem = "&" & MM_item & "="
      If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
        MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
      End If
    Next
    ' add the Form variables to the MM_keepForm string
    For Each MM_item In Request.Form
      MM_nextItem = "&" & MM_item & "="
      If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
        MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
      End If
    Next
    ' create the Form + URL string and remove the intial '&' from each of the strings
    MM_keepBoth = MM_keepURL & MM_keepForm
    If (MM_keepBoth <> "") Then
      MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
    End If
    If (MM_keepURL <> "")  Then
      MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
    End If
    If (MM_keepForm <> "") Then
      MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
    End If
    ' a utility function used for adding additional parameters to these strings
    Function MM_joinChar(firstItem)
      If (firstItem <> "") Then
        MM_joinChar = "&"
      Else
        MM_joinChar = ""
      End If
    End Function
    %>
    <!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>GCFA: Update Data Files</title>
    <link href="samples/OneColumn.css" rel="stylesheet" type="text/css" />
    <style type="text/css" media="screen">
    @import url("images/nav_bar.css");
    </style>
    <script language="JavaScript1.2" type="text/javascript" src="images/mm_css_menu.js"></script>
    <script type="text/javascript">
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    </head>
    <body class="oneColLiqCtrHdr" onload="MM_preloadImages('images/Slices/nav_bar_r2_c2_f2.gif','images/Slices/nav_bar_r2_c 3_f2.gif','images/Slices/nav_bar_r2_c5_f2.gif')">
    <div id="container">
        <div id="header">   
           <div id="#DataFiles_LOGO"></div>
      </div>
      <div id="mainContent">
        <div id="FWTableContainer1445733177">
          <table border="0" cellpadding="0" cellspacing="0" width="799">
            <!-- fwtable fwsrc="nav_bar_revised.png" fwpage="Page 1" fwbase="nav_bar.gif" fwstyle="Dreamweaver" fwdocid = "1445733177" fwnested="0" -->
            <tr>
              <td><img src="images/Slices/spacer.gif" width="1" height="1" border="0" alt="" /></td>
              <td><img src="images/Slices/spacer.gif" width="221" height="1" border="0" alt="" /></td>
              <td><img src="images/Slices/spacer.gif" width="221" height="1" border="0" alt="" /></td>
              <td><img src="images/Slices/spacer.gif" width="5" height="1" border="0" alt="" /></td>
              <td><img src="images/Slices/spacer.gif" width="221" height="1" border="0" alt="" /></td>
              <td><img src="images/Slices/spacer.gif" width="130" height="1" border="0" alt="" /></td>
              <td><img src="images/Slices/spacer.gif" width="1" height="1" border="0" alt="" /></td>
            </tr>
            <tr>
              <td colspan="6"><img name="nav_bar_r1_c1" src="images/Slices/nav_bar_r1_c1.gif" width="799" height="5" border="0" id="nav_bar_r1_c1" alt="" /></td>
              <td><img src="images/Slices/spacer.gif" width="1" height="5" border="0" alt="" /></td>
            </tr>
            <tr>
              <td rowspan="2"><img name="nav_bar_r2_c1" src="images/Slices/nav_bar_r2_c1.gif" width="1" height="25" border="0" id="nav_bar_r2_c1" alt="" /></td>
              <td><a href="javascript:;" onmouseout="MM_swapImgRestore();MM_menuStartTimeout(1000)" onmouseover="MM_menuShowMenu('MMMenuContainer1015135953_0', 'MMMenu1015135953_0',6,24,'nav_bar_r2_c2');MM_swapImage('nav_bar_r2_c2','','images/Slices /nav_bar_r2_c2_f2.gif',1);"><img name="nav_bar_r2_c2" src="images/Slices/nav_bar_r2_c2.gif" width="221" height="24" border="0" id="nav_bar_r2_c2" alt="" /></a></td>
              <td><a href="http://www.gcfa.org/Department_Data.aspx" target="_top" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('nav_bar_r2_c3','','images/Slices/nav_bar_r2_c3_f2.gif',1);"><i mg name="nav_bar_r2_c3" src="images/Slices/nav_bar_r2_c3.gif" width="221" height="24" border="0" id="nav_bar_r2_c3" alt="Department Data Files" /></a></td>
              <td rowspan="2"><img name="nav_bar_r2_c4" src="images/Slices/nav_bar_r2_c4.gif" width="5" height="25" border="0" id="nav_bar_r2_c4" alt="" /></td>
              <td><a href="http://www.gcfa.org/help_topics.html" target="_top" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('nav_bar_r2_c5','','images/Slices/nav_bar_r2_c5_f2.gif',1);"><i mg name="nav_bar_r2_c5" src="images/Slices/nav_bar_r2_c5.gif" width="221" height="24" border="0" id="nav_bar_r2_c5" alt="Help Topics" /></a></td>
              <td rowspan="2"><img name="nav_bar_r2_c6" src="images/Slices/nav_bar_r2_c6.gif" width="130" height="25" border="0" id="nav_bar_r2_c6" alt="" /></td>
              <td><img src="images/Slices/spacer.gif" width="1" height="24" border="0" alt="" /></td>
            </tr>
            <tr>
              <td colspan="2"><img name="nav_bar_r3_c2" src="images/Slices/nav_bar_r3_c2.gif" width="442" height="1" border="0" id="nav_bar_r3_c2" alt="" /></td>
              <td><img name="nav_bar_r3_c5" src="images/Slices/nav_bar_r3_c5.gif" width="221" height="1" border="0" id="nav_bar_r3_c5" alt="" /></td>
              <td><img src="images/Slices/spacer.gif" width="1" height="1" border="0" alt="" /></td>
            </tr>
          </table>
          <div id="MMMenuContainer1015135953_0">
            <div id="MMMenu1015135953_0" onmouseout="MM_menuStartTimeout(1000);" onmouseover="MM_menuResetTimeout();"> <a href="http://www.gcfa.org/add_data.asp" target="_top" id="MMMenu1015135953_0_Item_0" class="MMMIFVStyleMMMenu1015135953_0" onmouseover="MM_menuOverMenuItem('MMMenu1015135953_0');"> Add Data </a> <a href="http://www.gcfa.org/update_data.asp" target="_top" id="MMMenu1015135953_0_Item_1" class="MMMIVStyleMMMenu1015135953_0" onmouseover="MM_menuOverMenuItem('MMMenu1015135953_0');"> Update Data </a> <a href="http://www.gcfa.org/delete_data.asp" target="_top" id="MMMenu1015135953_0_Item_2" class="MMMIVStyleMMMenu1015135953_0" onmouseover="MM_menuOverMenuItem('MMMenu1015135953_0');"> Delete Data </a> </div>
          </div>
        </div>
        <br />
            <br />
            <br />
            <br />
            <br />
          <strong>Enter the information you are wanting  to add to our database:</strong><br />
      </div>
        <form ACTION="<%=MM_editAction%>" METHOD="POST" name="form1" target="_top" id="form1">
          <table width="689" align="left">
        <tr valign="baseline">
          <td align="left" valign="top" nowrap="nowrap">Department:</td>
          <td><label>
            <input name="Department" type="text" id="Department" size="75" maxlength="500" />
          </label></td>
        </tr>
        <tr valign="baseline">
          <td align="left" valign="top" nowrap="nowrap">Subpage Title:</td>
          <td><label>
            <input name="SubpageTitle" type="text" id="SubpageTitle" size="75" maxlength="1000" />
          </label></td>
        </tr>
        <tr valign="baseline">
          <td align="left" valign="top" nowrap="nowrap">Link Description:</td>
          <td><label>
            <input name="LinkDescription" type="text" id="LinkDescription" size="75" maxlength="1000" />
          </label></td>
        </tr>
        <tr valign="baseline">
          <td align="left" valign="top" nowrap="nowrap">URL:</td>
          <td><input name="URL" type="text" id="URL" size="75" maxlength="500" /></td>
        </tr>
        <tr valign="baseline">
          <td height="24" align="left" valign="top" nowrap="nowrap">Date Modified:</td>
          <td><input name="DateLastModified" type="text" id="DateLastModified" size="75" maxlength="10" /></td>
        </tr>
        <tr valign="baseline">
          <td align="left" valign="top" nowrap="nowrap">Modified By:</td>
          <td><label>
            <input name="ModifiedBy" type="text" id="ModifiedBy" size="75" maxlength="50" />
          </label></td>
        </tr>
        <tr valign="baseline">
          <td height="20" align="left" valign="top" nowrap="nowrap"> </td>
          <td> </td>
        </tr>
        <tr valign="baseline">
          <td align="left" valign="top" nowrap="nowrap"><p> </p></td>
          <td align="left" valign="top" nowrap="nowrap"><label>
            <input type="submit" name="Add_Info" id="Add_Info" value="Add data to database now!" />
          </label></td>
        </tr>
      </table>
      <p> </p>
      <p><br />
          <br />
          <br />
          <br />
          </p>
      <p> </p>
      <p> </p>
      <p> </p>
      <p><br />
          </p>
      <input type="hidden" name="MM_insert" value="form1" />
    </form> </p>
      <p> </p>
      <p> </p>
      <p> </p>
      <p> </p>
      <p> </p>
      <p> </p>
      <p> </p>
      <p> </p>
      <p>  </p>
    </div>
      <div id="footer">
        <p align="center">This site is maintained by the General Council on Finance and Administration <script language="JavaScript">
    var today_date= new Date()
    var year=today_date.getFullYear()
    document.write(year)
    //--> </script>
    &copy;</p>
      <!-- end #footer --></div>
    <!-- end #container --></div>
    </body>
    </html>
    <%
    rs_Add_Data.Close()
    Set rs_Add_Data = Nothing
    %>
    My CSS Pages:
    @charset "utf-8";
    body {
    /*background:#ffffff;*/
    margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
    padding: 0;
    text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
    /*color: #000000;*/
    width: 100%;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    border-top-style: none;
    border-right-style: none;
    border-bottom-style: none;
    border-left-style: none;
    background-repeat: no-repeat;
    background-position: right top;
    background-image: url(../images/body_bg.jpg);
    .oneColLiqCtrHdr #container {
    width: 99%; /* the auto margins (in conjunction with a width) center the page */
    /* border: 1px solid #000000;*/
    text-align: left; /* this overrides the text-align: center on the body element. */
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
    background-color: ;
    background-repeat: no-repeat;
    background-position: right top;
    .oneColLiqCtrHdr #header {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: 700;
    color: #FFFFFF;
    font-size: 18px;
    background-repeat: no-repeat;
    height: 124px;
    width: 100%;
    background-image: url(../images/dept_data_files_logo.jpg);
    padding: 0px;
    /*background-color: #67120D;*/
    .oneColLiqCtrHdr #mainContent {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #3C0D0D;
    font-weight: 700;
    padding-top: 0;
    padding-right: 0px;
    padding-bottom: 0;
    padding-left: 0px;
    margin: 0px;
    width: 760px;
    .oneColLiqCtrHdr #footer {
    padding: 0 10px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: 700;
    color: #FFFFFF;
    background-color: #000000;
    /*width:780px;*/
    .oneColLiqCtrHdr #footer p {
    margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
    padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
    h1 {
    color:#FFFFFF;
    font-size: 36px;
    h2,h3 {
    10px;
    8px;
    color: #000000;
    #DataFiles_LOGO{
    height:127px;
    width: 740px;
    background-repeat: no-repeat;
    background-image: url(../images/dept_data_files_logo.jpg);
    background-position: left top;
    padding: 0px;
    margin: 0px;
    top: 0px;
    float: left;
    And my Navigation CSS:
    td img {
    /* Another Mozilla/Netscape bug with making sure our images display correctly */
    display: block;
    #FWTableContainer1445733177 {
    /* The master div to make sure that our popup menus get aligned correctly.  Be careful when playing with this one. */
    position:relative;
    margin:0px;
    width:799px;
    height:30px;
    text-align:left;
    #MMMenuContainer1015135953_0 {
    /* This ID is related to the master menu div for menu MMMenuContainer1015135953_0 and contains the important positioning information for the menu as a whole */
    position:absolute;
    left:7px;
    top:29px;
    visibility:hidden;
    z-index:300;
    #MMMenu1015135953_0 {
    /* This class defines things about menu MMMenu1015135953_0's div. */
    position:absolute;
    left:0px;
    top:0px;
    visibility:hidden;
    background-color:#ffffff;
    border:1px solid #000000;
    width:208px;
    height:76px;
    .MMMIFVStyleMMMenu1015135953_0 {
    /* This class determines the general characteristics of the menu items in menu MMMenu1015135953_0 */
    border-top:1px solid #000000;
    border-left:1px solid #000000;
    border-bottom:1px solid #ffffff;
    border-right:1px solid #ffffff;
    width:208px;
    height:26px;
    voice-family: "\"}\"";
    voice-family:inherit;
    width:200px;
    height:18px;
    .MMMIVStyleMMMenu1015135953_0 {
    /* This class determines the general characteristics of the menu items in menu MMMenu1015135953_0 */
    border-top:0px;
    border-left:1px solid #000000;
    border-bottom:1px solid #ffffff;
    border-right:1px solid #ffffff;
    width:208px;
    height:25px;
    voice-family: "\"}\"";
    voice-family:inherit;
    width:200px;
    height:18px;
    #MMMenu1015135953_0_Item_0 {
    /* Unique ID for item 0 of menu MMMenu1015135953_0 so we can set its position */
    left:0px;
    top:0px;
    #MMMenu1015135953_0_Item_1 {
    /* Unique ID for item 1 of menu MMMenu1015135953_0 so we can set its position */
    left:0px;
    top:26px;
    #MMMenu1015135953_0_Item_2 {
    /* Unique ID for item 2 of menu MMMenu1015135953_0 so we can set its position */
    left:0px;
    top:51px;
    #MMMenuContainer1015135953_0 img {
    /* needed for Mozilla/Camino/Netscape */
    border:0px;
    #MMMenuContainer1015135953_0 a {
    /* Controls the general apperance for menu MMMenuContainer1015135953_0's items, including color and font */
    text-decoration:none;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:14px;
    color:#ffcc33;
    text-align:center;
    vertical-align:middle;
    padding:3px;
    background-color:#000000;
    font-weight:bold;
    font-style:normal;
    display:block;
    position:absolute;
    #MMMenuContainer1015135953_0 a:hover {
    /* Controls the mouse over effects for menu MMMenuContainer1015135953_0 */
    color:#ffcc33;
    background-color:#990000;

    Glad you sorted this out.
    You might want to mark this as Answered so folks trying to help answer questions won't have to click on this link now.  Thanks!
    E. Michael Brandt
    www.divahtml.com
    www.divahtml.com/products/scripts_dreamweaver_extensions.php
    Standards-compliant scripts and Dreamweaver Extensions
    www.valleywebdesigns.com/vwd_Vdw.asp
    JustSo PictureWindow
    JustSo PhotoAlbum, et alia

  • A simple Spry Accordion Question (I think)

    Hi all:
    I've searched but can't find, but I think this is a simple one.
    I've created a basic Spry accordion menu with DW/CS3 - Insert/Spry/Spry Accordion. How do I get the first "Content 1" to be hidden/not visible upon page load. Right now, the "Lable 2" must be clicked to hide the "Content 1" which of course shows the "Content 2"? Guessing it's in the JS, but I'm not sure. TIA for any help. HTML and JS Code below.
    <!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>Untitled Document</title>
    <script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="Accordion1" class="Accordion" tabindex="0">
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 1</div>
        <div class="AccordionPanelContent">Content 1</div>
      </div>
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 2</div>
        <div class="AccordionPanelContent">Content 2</div>
      </div>
    </div>
    <script type="text/javascript">
    <!--
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    //-->
    </script>
    </body>
    </html>
    JAVASCRIPT
    var Spry;
    if (!Spry) Spry = {};
    if (!Spry.Widget) Spry.Widget = {};
    Spry.Widget.Accordion = function(element, opts)
        this.element = this.getElement(element);
        this.defaultPanel = 0;
        this.hoverClass = "AccordionPanelTabHover";
        this.openClass = "AccordionPanelOpen";
        this.closedClass = "AccordionPanelClosed";
        this.focusedClass = "AccordionFocused";
        this.enableAnimation = true;
        this.enableKeyboardNavigation = true;
        this.currentPanel = null;
        this.animator = null;
        this.hasFocus = null;
        this.duration = 500;
        this.previousPanelKeyCode = Spry.Widget.Accordion.KEY_UP;
        this.nextPanelKeyCode = Spry.Widget.Accordion.KEY_DOWN;
        this.useFixedPanelHeights = true;
        this.fixedPanelHeight = 0;
        Spry.Widget.Accordion.setOptions(this, opts, true);
        // Unfortunately in some browsers like Safari, the Stylesheets our
        // page depends on may not have been loaded at the time we are called.
        // This means we have to defer attaching our behaviors until after the
        // onload event fires, since some of our behaviors rely on dimensions
        // specified in the CSS.
        if (Spry.Widget.Accordion.onloadDidFire)
            this.attachBehaviors();
        else
            Spry.Widget.Accordion.loadQueue.push(this);
    Spry.Widget.Accordion.onloadDidFire = false;
    Spry.Widget.Accordion.loadQueue = [];
    Spry.Widget.Accordion.addLoadListener = function(handler)
        if (typeof window.addEventListener != 'undefined')
            window.addEventListener('load', handler, false);
        else if (typeof document.addEventListener != 'undefined')
            document.addEventListener('load', handler, false);
        else if (typeof window.attachEvent != 'undefined')
            window.attachEvent('onload', handler);
    Spry.Widget.Accordion.processLoadQueue = function(handler)
        Spry.Widget.Accordion.onloadDidFire = true;
        var q = Spry.Widget.Accordion.loadQueue;
        var qlen = q.length;
        for (var i = 0; i < qlen; i++)
            q[i].attachBehaviors();
    Spry.Widget.Accordion.addLoadListener(Spry.Widget.Accordion.processLoadQueue);
    Spry.Widget.Accordion.prototype.getElement = function(ele)
        if (ele && typeof ele == "string")
            return document.getElementById(ele);
        return ele;
    Spry.Widget.Accordion.prototype.addClassName = function(ele, className)
        if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1))
            return;
        ele.className += (ele.className ? " " : "") + className;
    Spry.Widget.Accordion.prototype.removeClassName = function(ele, className)
        if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) == -1))
            return;
        ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), "");
    Spry.Widget.Accordion.setOptions = function(obj, optionsObj, ignoreUndefinedProps)
        if (!optionsObj)
            return;
        for (var optionName in optionsObj)
            if (ignoreUndefinedProps && optionsObj[optionName] == undefined)
                continue;
            obj[optionName] = optionsObj[optionName];
    Spry.Widget.Accordion.prototype.onPanelTabMouseOver = function(panel)
        if (panel)
            this.addClassName(this.getPanelTab(panel), this.hoverClass);
    Spry.Widget.Accordion.prototype.onPanelTabMouseOut = function(panel)
        if (panel)
            this.removeClassName(this.getPanelTab(panel), this.hoverClass);
    Spry.Widget.Accordion.prototype.openPanel = function(panel)
        var panelA = this.currentPanel;
        var panelB = panel;
        if (!panelB || panelA == panelB)   
            return;
        var contentA;
        if( panelA )
            contentA = this.getPanelContent(panelA);
        var contentB = this.getPanelContent(panelB);
        if (! contentB)
            return;
        if (this.useFixedPanelHeights && !this.fixedPanelHeight)
            this.fixedPanelHeight = (contentA.offsetHeight) ? contentA.offsetHeight : contentA.scrollHeight;
        if (this.enableAnimation)
            if (this.animator)
                this.animator.stop();
            this.animator = new Spry.Widget.Accordion.PanelAnimator(this, panelB, { duration: this.duration });
            this.animator.start();
        else
            if(contentA)
                contentA.style.height = "0px";
            contentB.style.height = (this.useFixedPanelHeights ? this.fixedPanelHeight : contentB.scrollHeight) + "px";
        if(panelA)
            this.removeClassName(panelA, this.openClass);
            this.addClassName(panelA, this.closedClass);
        this.removeClassName(panelB, this.closedClass);
        this.addClassName(panelB, this.openClass);
        this.currentPanel = panelB;
    Spry.Widget.Accordion.prototype.openNextPanel = function()
        var panels = this.getPanels();
        var curPanelIndex = this.getCurrentPanelIndex();
        if( panels && curPanelIndex >= 0 && (curPanelIndex+1) < panels.length )
            this.openPanel(panels[curPanelIndex+1]);
    Spry.Widget.Accordion.prototype.openPreviousPanel = function()
        var panels = this.getPanels();
        var curPanelIndex = this.getCurrentPanelIndex();
        if( panels && curPanelIndex > 0 && curPanelIndex < panels.length )
            this.openPanel(panels[curPanelIndex-1]);
    Spry.Widget.Accordion.prototype.openFirstPanel = function()
        var panels = this.getPanels();
        if( panels )
            this.openPanel(panels[0]);
    Spry.Widget.Accordion.prototype.openLastPanel = function()
        var panels = this.getPanels();
        if( panels )
            this.openPanel(panels[panels.length-1]);
    Spry.Widget.Accordion.prototype.onPanelClick = function(panel)
        // if (this.enableKeyboardNavigation)
        //     this.element.focus();
        if (panel != this.currentPanel)
            this.openPanel(panel);
        this.focus();
    Spry.Widget.Accordion.prototype.onFocus = function(e)
        // this.element.focus();
        this.hasFocus = true;
        this.addClassName(this.element, this.focusedClass);
    Spry.Widget.Accordion.prototype.onBlur = function(e)
        // this.element.blur();
        this.hasFocus = false;
        this.removeClassName(this.element, this.focusedClass);
    Spry.Widget.Accordion.KEY_UP = 38;
    Spry.Widget.Accordion.KEY_DOWN = 40;
    Spry.Widget.Accordion.prototype.onKeyDown = function(e)
        var key = e.keyCode;
        if (!this.hasFocus || (key != this.previousPanelKeyCode && key != this.nextPanelKeyCode))
            return true;
        var panels = this.getPanels();
        if (!panels || panels.length < 1)
            return false;
        var currentPanel = this.currentPanel ? this.currentPanel : panels[0];
        var nextPanel = (key == this.nextPanelKeyCode) ? currentPanel.nextSibling : currentPanel.previousSibling;
        while (nextPanel)
            if (nextPanel.nodeType == 1 /* Node.ELEMENT_NODE */)
                break;
            nextPanel = (key == this.nextPanelKeyCode) ? nextPanel.nextSibling : nextPanel.previousSibling;
        if (nextPanel && currentPanel != nextPanel)
            this.openPanel(nextPanel);
        if (e.stopPropagation)
            e.stopPropagation();
        if (e.preventDefault)
            e.preventDefault();
        return false;
    Spry.Widget.Accordion.prototype.attachPanelHandlers = function(panel)
        if (!panel)
            return;
        var tab = this.getPanelTab(panel);
        if (tab)
            var self = this;
            Spry.Widget.Accordion.addEventListener(tab, "click", function(e) { return self.onPanelClick(panel); }, false);
            Spry.Widget.Accordion.addEventListener(tab, "mouseover", function(e) { return self.onPanelTabMouseOver(panel); }, false);
            Spry.Widget.Accordion.addEventListener(tab, "mouseout", function(e) { return self.onPanelTabMouseOut(panel); }, false);
    Spry.Widget.Accordion.addEventListener = function(element, eventType, handler, capture)
        try
            if (element.addEventListener)
                element.addEventListener(eventType, handler, capture);
            else if (element.attachEvent)
                element.attachEvent("on" + eventType, handler);
        catch (e) {}
    Spry.Widget.Accordion.prototype.initPanel = function(panel, isDefault)
        var content = this.getPanelContent(panel);
        if (isDefault)
            this.currentPanel = panel;
            this.removeClassName(panel, this.closedClass);
            this.addClassName(panel, this.openClass);
        else
            this.removeClassName(panel, this.openClass);
            this.addClassName(panel, this.closedClass);
            content.style.height = "0px";
        this.attachPanelHandlers(panel);
    Spry.Widget.Accordion.prototype.attachBehaviors = function()
        var panels = this.getPanels();
        for (var i = 0; i < panels.length; i++)
            this.initPanel(panels[i], i == this.defaultPanel);
        if (this.enableKeyboardNavigation)
            // XXX: IE doesn't allow the setting of tabindex dynamically. This means we can't
            // rely on adding the tabindex attribute if it is missing to enable keyboard navigation
            // by default.
            var tabIndexAttr = this.element.attributes.getNamedItem("tabindex");
            // if (!tabIndexAttr) this.element.tabindex = 0;
            if (tabIndexAttr)
                var self = this;
                Spry.Widget.Accordion.addEventListener(this.element, "focus", function(e) { return self.onFocus(e); }, false);
                Spry.Widget.Accordion.addEventListener(this.element, "blur", function(e) { return self.onBlur(e); }, false);
                Spry.Widget.Accordion.addEventListener(this.element, "keydown", function(e) { return self.onKeyDown(e); }, false);
    Spry.Widget.Accordion.prototype.getPanels = function()
        return this.getElementChildren(this.element);
    Spry.Widget.Accordion.prototype.getCurrentPanel = function()
        return this.currentPanel;
    Spry.Widget.Accordion.prototype.getCurrentPanelIndex = function()
        var panels = this.getPanels();
        for( var i = 0 ; i < panels.length; i++ )
            if( this.currentPanel == panels[i] )
                return i;
        return 0;
    Spry.Widget.Accordion.prototype.getPanelTab = function(panel)
        if (!panel)
            return null;
        return this.getElementChildren(panel)[0];
    Spry.Widget.Accordion.prototype.getPanelContent = function(panel)
        if (!panel)
            return null;
        return this.getElementChildren(panel)[1];
    Spry.Widget.Accordion.prototype.getElementChildren = function(element)
        var children = [];
        var child = element.firstChild;
        while (child)
            if (child.nodeType == 1 /* Node.ELEMENT_NODE */)
                children.push(child);
            child = child.nextSibling;
        return children;
    Spry.Widget.Accordion.prototype.focus = function()
        if (this.element && this.element.focus)
            this.element.focus();
    Spry.Widget.Accordion.PanelAnimator = function(accordion, panel, opts)
        this.timer = null;
        this.interval = 0;
        this.stepCount = 0;
        this.fps = 0;
        this.steps = 10;
        this.duration = 500;
        this.onComplete = null;
        this.panel = panel;
        this.panelToOpen = accordion.getElement(panel);
        this.panelData = [];
        Spry.Widget.Accordion.setOptions(this, opts, true);
        // If caller specified speed in terms of frames per second,
        // convert them into steps.
        if (this.fps > 0)
            this.interval = Math.floor(1000 / this.fps);
            this.steps = parseInt((this.duration + (this.interval - 1)) / this.interval);
        else if (this.steps > 0)
            this.interval = this.duration / this.steps;
        // Set up the array of panels we want to animate.
        var panels = accordion.getPanels();
        for (var i = 0; i < panels.length; i++)
            var p = panels[i];
            var c = accordion.getPanelContent(p);
            if (c)
                var h = c.offsetHeight;
                if (h == undefined)
                    h = 0;
                if (p == panel || h > 0)
                    var obj = new Object;
                    obj.panel = p;
                    obj.content = c;
                    obj.fromHeight = h;
                    obj.toHeight = (p == panel) ? (accordion.useFixedPanelHeights ? accordion.fixedPanelHeight : c.scrollHeight) : 0;
                    obj.increment = (obj.toHeight - obj.fromHeight) / this.steps;
                    obj.overflow = c.style.overflow;
                    this.panelData.push(obj);
                    c.style.overflow = "hidden";
                    c.style.height = h + "px";
    Spry.Widget.Accordion.PanelAnimator.prototype.start = function()
        var self = this;
        this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval);
    Spry.Widget.Accordion.PanelAnimator.prototype.stop = function()
        if (this.timer)
            clearTimeout(this.timer);
            // If we're killing the timer, restore the overflow
            // properties on the panels we were animating!
            if (this.stepCount < this.steps)
                for (i = 0; i < this.panelData.length; i++)
                    obj = this.panelData[i];
                    obj.content.style.overflow = obj.overflow;
        this.timer = null;
    Spry.Widget.Accordion.PanelAnimator.prototype.stepAnimation = function()
        ++this.stepCount;
        this.animate();
        if (this.stepCount < this.steps)
            this.start();
        else if (this.onComplete)
            this.onComplete();
    Spry.Widget.Accordion.PanelAnimator.prototype.animate = function()
        var i, obj;
        if (this.stepCount >= this.steps)
            for (i = 0; i < this.panelData.length; i++)
                obj = this.panelData[i];
                if (obj.panel != this.panel)
                    obj.content.style.height = "0px";
                obj.content.style.overflow = obj.overflow;
                obj.content.style.height = obj.toHeight + "px";
        else
            for (i = 0; i < this.panelData.length; i++)
                obj = this.panelData[i];
                obj.fromHeight += obj.increment;
                obj.content.style.height = obj.fromHeight + "px";

    On the bottom of yourpage you have this:
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    Change it to this:
    var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false, defaultPanel: -1 });
    Ken Ford

  • Java loop question - I think!

    Hello,
    I currently have the below code which opens a file, reads all the contents and prints it. I would like to modify it such that it the searches the file for a particular word e.g. "from" and when it reaches it, it inserts something after it e.g. "me". I think I need to put a nested loop somewhere in my while loop. Can some advise me please?
    Many thanks,
    Aisling.
    void modifyFile (String username)
    String record = null;
    int recCount = 0;
    try {
    FileReader fr = new FileReader("/tmp/Scripts/Script.xml");
    BufferedReader br = new BufferedReader(fr);
    record = new String();
    while ( (record = br.readLine()) != null) {
    recCount++;
    System.out.println(recCount + ": " + record);
    catch (IOException e) {
    // catch possible io errors from readLine()
    System.out.println("Uh oh, got an IOException error!");
    e.printStackTrace();
    }

    I tried the replaceall suggestion but it still does not work. I have included my effort below -
    Any ideas why it wont work?
    My understanding is that the below code reads a file line by line. As long as the line isnt null(i.e. end of file), the contents of the file should be printed and any instances of "from" should be replaced with the variable username. This is then written back to the file. Correct?
    Thanks again,
    Aisling.
    void modifyFile (String username)
    String record = null;
    int recCount = 0;
    try {
    FileReader fr = new FileReader("/tmp/Scripts/Script.xml");
    BufferedReader br = new BufferedReader(fr);
    record = new String();
    while ( (record = br.readLine()) != null) {
    recCount++;
    record.replaceAll("from", username);
    System.out.println(recCount + ": " + record);
    FileWriter fw = new FileWriter ("/tmp/Scripts/Script.xml");
    fw.write(record);
    catch (IOException e) {
    // catch possible io errors from readLine()
    System.out.println("Uh oh, got an IOException error!");
    e.printStackTrace();
    }

  • Newbie question (I think you can answer me)

    Hello.
    I am a newbie about EJB. But I am teacher of a Java course and I have
    introduced EJB to my students. I have said them that EJB is good for big
    applications but, when the application is small, is overkill (I read this in
    several books). But then a student has asked me (I don't know how to
    exppress the sentence in English) "How big has to be the application in
    order to take advantage of EJB?". I mean: EJB is overkill for an application
    with two concurrent users. But, if concurrent users are thousand, it is
    necessary. Where is the limit between two situations? Of course, there is no
    exact limit but it must exist some QUANTITATIVE parameter.
    I had no reply for my student. Good question but no answer. I said that I
    will look for this information.
    I am getting mad looking for this information in Internet. I have seen no
    studies that study such a basic question. Even it has been impossible to
    find "a ballpark estimate". I seen EJB FAQs, pages, books about EJBs, but I
    found nothing. Any information of this kind would help me a lot.
    So, please, can anybody help me?
    Any help would be greatly appreciated.
    Thanks,
    Pau Vic.
    (I sent a former copy of this message to an unrelated thread. This was a
    mistake. Please excuse the inconveniences)

    Thank you, Ji.
    Pau Vic.
    "ji zhang" <[email protected]> escribió en el mensaje
    news:[email protected]...
    >
    Hi Pau.
    How big has to be the application in order to take advantage of EJB?There is no measurement standard for developers to decide the utilizationof EJB
    in their applications. It is clearly unnecessary to develop a nonenterprise application
    for only few ( as you mentioned 2 ) routing users with EJBs.
    The question is more likely why using EJBs. Few major considerationslisted below:
    >
    1) A real production internet application is getting to rely on anapplication
    container ( for example: #1 application server WebLogic ) to handleunderly resources,
    backend works and Object life cycles.
    By using EJBs, EJB container handles the sophisticate backend jobs foryou.
    Developers may only focus on their business logics.
    2) A real production internet application may be also a combination ofsome reusable
    logical components. To reduce the application development hardness,modeled and
    specification oriented plugable components such as EJBs may be used. Thatis also
    why the EJB component vendors exist.
    3) There are concepts of scalability and high availability in realproduction.
    EJB components can be easily deployed to be scaled and load balanced inthe EJB
    containers in a cluster. Fully implemented Weblogic Cluster is a goodexample.
    >
    There may be other advantages of using EJB as well.
    Thanks.
    Ji Zhang
    Developer Relations Engineer
    BEA WebLogic Support
    "Pau Vic" <[email protected]> wrote:
    Hello.
    I am a newbie about EJB. But I am teacher of a Java course and I have
    introduced EJB to my students. I have said them that EJB is good for
    big
    applications but, when the application is small, is overkill (I read
    this in
    several books). But then a student has asked me (I don't know how to
    exppress the sentence in English) "How big has to be the application
    in
    order to take advantage of EJB?". I mean: EJB is overkill for an
    application
    with two concurrent users. But, if concurrent users are thousand, it
    is
    necessary. Where is the limit between two situations? Of course, there
    is no
    exact limit but it must exist some QUANTITATIVE parameter.
    I had no reply for my student. Good question but no answer. I said that
    I
    will look for this information.
    I am getting mad looking for this information in Internet. I have seen
    no
    studies that study such a basic question. Even it has been impossible
    to
    find "a ballpark estimate". I seen EJB FAQs, pages, books about EJBs,
    but I
    found nothing. Any information of this kind would help me a lot.
    So, please, can anybody help me?
    Any help would be greatly appreciated.
    Thanks,
    Pau Vic.
    (I sent a former copy of this message to an unrelated thread. This was
    a
    mistake. Please excuse the inconveniences)

Maybe you are looking for

  • You'r wrong man and you know it!!

    Quote Another one to close.... You guy's should really investigate a bit more on the AMD64 CPU.... It doesn't overclock that well!!!!! Remember, when you turn up the CPU clock, you also turn the Memory controller up the same level, and it's there tha

  • The definition of base class Application was not found.

    Hello: I have been coding in Flash Builder Burrito and publishing to my Xoom for a few weeks. All of a sudden at the end of the day I'm getting this compiler error which says: 1017: The definition of base class Application was not found.    AppName.m

  • How do place a file for download from our server?

    I have some pdf forms that I place on a site, but I had the set up as hyperlinks to webpages so that they opened up in browsers. This isn't good because the pdfs are forms to be filled out and we've had a variety of problems with people trying to fil

  • Can mac os leopard be installed in macbook pro 2011?

    Hi, I need help. Is possible to install mac os leopard in a macbook pro 2011, 2.2 GHz quad core i7 to create a dual boots? I tried and the software disc got stuck and nothing came out on the screen. Good thing i got the disc out. thank for your help.

  • ITunes freezes when shutting down, playcount not saved

    Okay, hey... Everytime I shut down my iTunes, it freezes, and this Windows-standard-popup shows and ask me if I want to report the error or just shut down the program. (Sorry this message is different in English, I'm currently on a Danish computer).