Ajaxcfc with jquery

Hi Guys.
I have one jquery function in which i want to load the contents dyanmically without refresh. I defined some ajaxcfc stuff as i am noob in this ajaxcfc.
can u please guide me that if i am doing wrong or right.
my ajax stuff:
Please see if my ajaxcfc stuff is wrong, can anybody correct it
<script type="text/javascript" src="branches/jquery/core/js/jquery.js"></script>
<script type="text/javascript" src="branches/jquery/core/js/jquery.AjaxCFC.js"></script>
<script type="text/javascript">
$.AjaxCFC({require:'json'}); // make sure json.cfc file is in same folder as your auth.cfc and ajax.cfc components!!! json.cfc comes in AjaxCFC package
$.AjaxCFCHelper.setDebug(false);
$.AjaxCFCHelper.setUseDefaultErrorHandler(true);
$.AjaxCFCHelper.setSerialization('json');
submitresults = function() {
loadresults();
return false;
loadresults = function(data){
$("#showme").html(data).show();
<div id="showme" style="display:none;width:90%;hight:auto;overflow:visible;">
Content goes here
</div>
submitresults is the onSubmit = return submitresults(); in the <form> tag
will that my above code will load contents without refresh.

Thanks David! From what I'd gathered I thought it was possible but wanted to double check before I propose something that doesn't work. Luckily I don't have to program it myself, I just have give advice on how to appoach it. Thanks again.

Similar Messages

  • Problem with jquery slide show conflict with vertical navigation menu in Firefox & Chrome

    Problem with jquery slide show conflict with vertical navigation menu in Firefox & Chrome. Works in IE. This is my first time trying to post a question - so please be kind. I am also not good with code and am finding css a real challenge after learning to design based on tables. I'm using CS5.
    The "test" page with the slide show is: http://www.reardanwa.com/index-slides.html   The same page without the slide show is http://www.reardanwa.com/
    I realize the images are not ideally sized - I'll fix those once I get the pages to function.  Maybe I need a different slide show? I would prefer a widget that I can modify to required size & postition. Again - I'm not good at building with code from scratch.
    The problem is the naviagation links that are directly next to the slide show do not work in Firefox of Chrome. They do work in IE.
    I've read about using jQuery.noConflict(); code but can't figure out the correct way to use it in my case or whether that's even part of the solution. I know my code is not well organized as I have cobbled together from various sources in an attempt to format the page the way the client wants it. Also, FYI, I will eventually try to make the page work in Surreal CMS.
    I've spent sevaral days over the last several weeks trying to solve sth slide show/navigation conflict - so any specific light you can shed will be much appreciated.
    Thanks in advance.
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Reardan Area Chamber of Commerce</title>
    <meta name="description" content="home page for Reardan Area Chamber of Commerce" />
    <meta name="keywords" content="Reardan WA, chamber of commerce" </>
    <script src="scripts/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="scripts/jquery.cycle.all.js" type="text/javascript">  </script>
    <script type="text/xml">
    </script>
    <style type="text/css">
                                  #slideshow { 
                                      padding: 10px;
                                            margin:0; 
                                  #slideshow-caption{
                                            padding:0;
                                            margin:0;
                                  #slideshow img, #slideshow div { 
                                      padding: 10px;
                                      background-color: #EEE;
                                      margin: 0;
    body {
              font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
              background: #004B8D;
              margin: 0;
              padding: 0;
              color: #000;
    /* ~~ Element/tag selectors ~~ */
    ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
              padding: 0;
              margin: 0;
    h1, h2, h3, h4, h5, h6, p {
              margin-top: 0;           /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
               /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
    .left
    position:absolute;
    left:0px;
    .center
    margin:auto;
    width:95%;
    .box
              position:relative;
              left:-90px;
              width:950px;
              height:350px;
              border-radius: 13px;
        -moz-border-radius: 13px;
        -webkit-border-radius: 13px;
              z-index:1000;
    .slide{
        position:absolute;
    a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
              border: none;
    /* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
    a:link {
              color: #42413C;
              text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
    a:visited {
              color: #6E6C64;
              text-decoration: underline;
    a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
              text-decoration: none;
    /* ~~this fixed width container surrounds the other divs~~ */
    .container {
              width: 960px;
              min-height:900px;
              padding:5px 0px 0px 0px;
              background: #E8F8FF;
              margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */
    /* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */
    .header {
              background: #E8F8FF;
              padding:10px 5px 0px 5px;
    .sidebar1 {
              float: left;
              width: 225px;
              margin: 60px;
              color: #FFFF0D;
              background: #595FFF;
              border-radius: 13px;
        -moz-border-radius: 13px;
        -webkit-border-radius: 13px;
              padding: 5px 5px 0px 5px;
        border: 3px solid #F7F723;
        z-index:-1;
    .sidebar2 {
              float: left;
              width: 275px;
              color: #FFFF0D;
              text-align: left;
              background: #595FFF;
              padding-bottom: 10px;
              border-radius: 13px;
        -moz-border-radius: 13px;
        -webkit-border-radius: 13px;
        border: 3px solid #F7F723;
        z-index:2;
    .sidebar3 {
              float: left;
              width: 275px;
              color: #FFFF0D;
              text-align: left;
              background: #595FFF;
              padding-bottom: 10px;
              border-radius: 13px;
        -moz-border-radius: 13px;
        -webkit-border-radius: 13px;
        border: 3px solid #F7F723;
        z-index:3;
    .content {
              padding: 0px 0px 0px 0px;
              width: 780px;
              float: left;
              background: #E8F8FF;
    /* ~~ This grouped selector gives the lists in the .content area space ~~ */
    .content ul, .content ol {
              padding: 0px 15px 5px 10px; /* this padding mirrors the right padding in the headings and paragraph rule above. Padding was placed on the bottom for space between other elements on the lists and on the left to create the indention. These may be adjusted as you wish. */
    /* ~~ The navigation list styles (can be removed if you choose to use a premade flyout menu like Spry) ~~ */
    ul.nav {
              list-style: none; /* this removes the list marker */
              border-top: 0px solid #FFFF66; /* this creates the top border for the links - all others are placed using a bottom border on the LI */
              margin-bottom: 50px; /* this creates the space between the navigation on the content below */
              font: Arial Black, Verdana, , Helvetica, sans-serif;
              font-size:1.3em;
              font-weight:bold;
              z-index:2;
    ul.nav li {
              border-bottom: 0px solid #FFFF66; /* this creates the button separation */
              font: 120%/1.4 Arial Black, Verdana, , Helvetica, sans-serif;
    ul.nav a, ul.nav a:visited { /* grouping these selectors makes sure that your links retain their button look even after being visited */
              padding: 3px 0px 5px 0px;
              display: block; /* this gives the link block properties causing it to fill the whole LI containing it. This causes the entire area to react to a mouse click. */
              width: 185px;  /*this width makes the entire button clickable for IE6. If you don't need to support IE6, it can be removed. Calculate the proper width by subtracting the padding on this link from the width of your sidebar container. */
              text-decoration: none;
              color: #FFFF0D;
              background: #595FFF;
    ul.nav a:hover, ul.nav a:active, ul.nav a:focus { /* this changes the background and text color for both mouse and keyboard navigators */
              background: #595FFF;
              font: 120%/1.4 Arial Black, Verdana, , Helvetica, sans-serif;
              color: #FFFFFF;
    /* ~~ The footer ~~ */
    .footer {
              padding: 10px 0;
              background:  #595FFF;
              color: #FFFF0D;
              position: relative;/* this gives IE6 hasLayout to properly clear */
              clear: both; /* this clear property forces the .container to understand where the columns end and contain them */
    /* ~~ miscellaneous float/clear classes ~~ */
    .fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
              float: right;
              margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
              float: left;
              margin-right: 8px;
    .clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
              clear:both;
              height:0;
              font-size: 1px;
              line-height: 0px;
    -->
    </style>
    </head>
    <body>
    <div class="container">
      <div class="header"><!-- end .header -->
      <a href="#"><img src="images/Chamber-Logo-2.gif" alt="Reardan Chamber Logo" width="187" height="163" hspace="10" vspace="5" align="top" /></a><img src="images/Reardan-Chamber-Title.gif" width="476" height="204" alt="Reardan Area Chamber of Commerce, Dedicated to Preserving and Enhancing Area Businesses" /><p></p>
      <p style="color: #F00">This Site is under construction! Please pardon our dust as we create!</p>
      </div>
      <div class="sidebar1">
        <ul class="nav">
          <li><a href="about.html">About Us</a></li>
          <li><a href="history.html">Reardan History</a></li>
          <li><a href="activities.html">Activities</a></li>
          <li><a href="business.html">Business<br />
            Directory</a></li>
          <li><a href="about.html">Join the<br />
            Chamber</a></li>
           <li><a href="links.html">Links<br />
      <span style="font-size: 85%">Tourism</span><br />
          </a></li>
        </ul>
         <!-- end .sidebar1 --></div>
    <br />
    <br />
    <br />
    <br />
    <div class="box" +"slide">
      <script type="text/javascript">
    // BeginOAWidget_Instance_2559022: #slideshow
                               slideshowAddCaption=true;
    $(window).load(function() {
      $('#slideshow').cycle({
                        after:                              slideshowOnCycleAfter, //the function that is triggered after each transition
                        autostop:                              false,     // true to end slideshow after X transitions (where X == slide count)
                        fx:                                        'blindX',// name of transition effect
                        pause:                              false,     // true to enable pause on hover
                        randomizeEffects:          true,  // valid when multiple effects are used; true to make the effect sequence random
                        speed:                              100,  // speed of the transition (any valid fx speed value)
                        sync:                              true,     // true if in/out transitions should occur simultaneously
                        timeout:                    5000,  // milliseconds between slide transitions (0 to disable auto advance)
                        fit:                              true,
                        height:                       '300px',
                        width:         '525px'   // container width (if the 'fit' option is true, the slides will be set to this width as well)
    function slideshowOnCycleAfter() {
              if (slideshowAddCaption==true){
                                  $('#slideshow-caption').html(this.title);
    // EndOAWidget_Instance_2559022
      </script>
      <div id="slideshow">
        <!--All elements inside this will become slides-->
        <img src="images/100_1537.jpeg" width="600" height="450" title="caption for image1" /> <img src="images/Parade-2011-2.jpg" width="300" height="225" title="caption for image2" /> <img src="images/100_1495.jpeg" width="600" height="450" title="caption for image3" />
        <div title="sample title"> Images for slide show will need to be re-sized to fit box to avoid distortion</div>
        <img src="images/beach4.jpg" width="200" height="200" title="caption for image4" /> <img src="images/beach5.jpg" width="200" height="200" title="caption for image5" /> </div>
      <!--It is safe to delete this if captions are disabled-->
      <div id="slideshow-caption"></div></div>
    <div class="sidebar2" "anotherClass editable"><p align="center"><strong>Chamber News</strong><br />
    Local News item
    <br />
    Another New item</p>
      <p align="center">lots of news this week<br />
        <br />
        <br />
        <br />
      </p>
    </div>
    <div class="sidebar3" "anotherClass editable"><p align="center"><strong>Upcoming Events</strong></p>
      <div align="center">    <a href="activities.html" style="color: #FFFF0D">Community wide yard sales</a><br />
        <br />
        <br />
        <br />
        <br />
      </div>
    </div>
    <div class="content"><br />
    <br />
    </div>
    <div class="footer">
            <p align="center"><span style="font-size: small">Reardan Area Chamber of Commerce</span><br />
              <span style="font-size: x-small">[email protected]  - 509.796.2102</span><br />
            </p>
            <!-- end .footer -->
    </div></body>
    </html>

    If you DO want the slideshow overlaping the navigation try the below css:
    .sidebar1 {
        float: left;
        width: 225px;
        margin: 60px 0px 60px 60px;
        color: #FFFF0D;
        background: #595FFF;
        border-radius: 13px;
        -moz-border-radius: 13px;
        -webkit-border-radius: 13px;
        padding: 5px 5px 0px 5px;
        border: 3px solid #F7F723;
    .box {
    float: left;
    margin-left:-60px;
    width:700px;
    height:350px;
    border-radius: 13px;
    -moz-border-radius: 13px;
    -webkit-border-radius: 13px;

  • Calling Reporting Services Web Service with jQuery possible?

    Hi,
    is it possible to call the Reporting Services Web Service with jQuery? If yes, can someone post me a small example?
    Background:
    My plan is to create a html with a form which is also uploaded then into the reportserver. I open this html later by clicking a link in a report (with gotoURL open.window). The report opens the html inclusive the overtaken of some additional parameters
    (reportname, reportdescription). These parameters I will use in the html-form as defaultvalues for the corresponding input-text-fields. Now the user can make some changes (i.e. the decription). With a click on a button I will send the new description to
    the Reporting Services Web Service by using the SetProperties method, closing the html-window and reload the report. Important is that I want to upload the html also into the reportserver itself.
    I have already found how to consume a web service via jQuery but with the Reporting Services Web Service I did not get it running in my tests.
    I have referenced to the following jQuery.js: http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
    Here you can see my tests I made with the results:
    $.ajax({
    type: 'POST',
    url: 'http://<..>/ReportServer/ReportService2010.asmx/ListChildren',
    data: {'ItemPath':'/','Recursive':false},
    complete: function(xData, status) {
    $('p').html($(xData.responseXML).text()); // result
    $("#divStatus").text( status ); // status }
    I got a NULL response with Status success. But where are the items?
    Another test which should response only one value was that:
    $.ajax({
    type: "POST",
    contentType: "text/xml; charset=utf-8",
    url: "http://<..>/ReportServer/ReportService2010.asmx/GetItemType",
    data: {"Item":"/Development"}, // Development is a Folder in my Reportserver-Root
    dataType: "xml",
    success: function (msg) {
    $("#divResult").html(msg.responseXML);
    error: function (data, status, error) {
    $("#divResult").html("WebSerivce unreachable<br> <br>" + data.responseXML + "<br> <br>(" + error + ")");
    Here I got an [object Error]
    And here my last test:
    var soapMessage = '<?xml version="1.0" encoding="utf-8"?>\
    <soap:Envelope \
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" \
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">\
    <soap:Body>\
    <GetItemType xmlns="http://www.microsoft.com/sql/ReportingServer">\
    <ItemPath>/Development</ItemPath>\
    </GetItemType>\
    </soap:Body>\
    </soap:Envelope>';
    $.ajax({
    type: "POST",
    contentType: "text/xml; charset=utf-8",
    url: http://<..>/ReportServer/ReportService2010.asmx?wsdl,
    data: soapMessage,
    dataType: "xml",
    success: processSuccess,
    error: processError
    function processSuccess(data, status, req) {
    if (status == "success")
    $("#response").text($(req.responseXML).find("Type").text());
    function processError(data, status, req) {
    alert(req.responseText + " " + status);
    Here I got an "Undefined error"
    Can anyone help me?
    Thanks
    René Illner

    Hi Rene,
    I have one vbscript class to call web services. May be if you need you can use it.
         dim ws
         set ws = new webservice
         ws.url = "http://servername/ReportServer/ReportService2010.asmx"
         ws.method = "MethodName"
         ws.parameters.Add "Parameter1", "Param1 Desc.."
         ws.parameters.Add "Parameter2","[email protected].."
         ws.execute
         set ws = nothing
    '------web service calling class
    class WebService
      public Url
      public Method
      public Response
      public Parameters
      public function execute()
        dim xmlhttp
        Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
        xmlhttp.open "POST", Url & "/" & Method, false
        xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
        xmlhttp.send Parameters.toString
        response = xmlhttp.responseText
        set xmlhttp = nothing
      end function
      Private Sub Class_Initialize()
        Set Parameters = new wsParameters
      End Sub
      Private Sub Class_Terminate()
        Set Parameters = Nothing
      End Sub
    End class
    class wsParameters
      public mCol
      public function toString()
        dim nItem
        dim buffer
        buffer = ""
        for nItem = 1 to Count
          buffer = buffer & Item(nItem).toString & "&"
        next
        if right(buffer,1)="&" then
          buffer = left(buffer,len(buffer)-1)
        end if
        toString = buffer
      end function
      public sub Clear
        set mcol = nothing
        Set mCol = CreateObject("Scripting.Dictionary")
      end sub
      public sub Add(pKey,pValue)
        dim newParameter
        set newParameter = new wsParameter
        newParameter.Key = pKey
        newParameter.Value = pValue
        mCol.Add mCol.count+1, newParameter
        set newParameter = nothing
      end sub
      public function Item(nKey)
        set Item=mCol.Item(nKey)
      end function
      public function ExistsXKey(pKey)
        dim nItem
        for nItem = 1 to mcol.count
          if mCol.Item(nItem).key = pKey then
            ExistsXKeyword = true
            exit for
          end if
        next
      end function
      public sub Remove(nKey)
        mCol.Remove(nKey)
      end sub
      public function Count()
        Count=mCol.count
      end function
      Private Sub Class_Initialize()
        Set mCol = CreateObject("Scripting.Dictionary")
      End Sub
      Private Sub Class_Terminate()
        Set mCol = Nothing
      End Sub
    end class
    class wsParameter
       public Key
       public Value
       public function toString()
         toString = Key & "=" & Value
       end function
    end class
    Regards, RSingh

  • User Login with jquery mobile

    I have this code that works perfectly but when i embed with Jquery mobile it fails to work. its a user authenication code
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include file="../Connections/VT.asp" -->
    <%
        ' *** Validate request to log in to this site.
        MM_LoginAction = Request.ServerVariables("URL")
        If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
        MM_valUsername = CStr(Request.Form("username"))
        If MM_valUsername <> "" Then
            Dim MM_fldUserAuthorization
            Dim MM_redirectLoginSuccess
            Dim MM_redirectLoginFailed
            Dim MM_loginSQL
            Dim MM_rsUser
            Dim MM_rsUser_cmd
            MM_fldUserAuthorization = ""
            MM_redirectLoginSuccess = "source.asp"
            MM_redirectLoginFailed = "error.asp"
            MM_loginSQL = "SELECT Username, Password"
            If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization
            MM_loginSQL = MM_loginSQL & " FROM dbo.Test_Register_Users WHERE Username = ? AND Password = ?"
            Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
            MM_rsUser_cmd.ActiveConnection = MM_VT_STRING
            MM_rsUser_cmd.CommandText = MM_loginSQL
            MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 70, MM_valUsername) ' adVarChar
            MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 50, Request.Form("password")) ' adVarChar
            MM_rsUser_cmd.Prepared = true
            Set MM_rsUser = MM_rsUser_cmd.Execute
            If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
                ' username and password match - this is a valid user
                Session("MM_Username") = MM_valUsername
                If (MM_fldUserAuthorization <> "") Then
                    Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
                Else
                    Session("MM_UserAuthorization") = ""
                End If
                if CStr(Request.QueryString("accessdenied")) <> "" And true Then
                    MM_redirectLoginSuccess = Request.QueryString("accessdenied")
                End If
                MM_rsUser.Close
                Response.Redirect(MM_redirectLoginSuccess)
            End If
            MM_rsUser.Close
            Response.Redirect(MM_redirectLoginFailed)
        End If
    %>
    <!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>
    <link href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" rel="stylesheet" type="text/css" />
    <script src="http://code.jquery.com/jquery-1.6.4.min.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js" type="text/javascript"></script>
    </head>
    <body>
    <div data-role="page" id="page">
      <div data-role="header">
        <h1>Header</h1>
      </div>
      <div data-role="content">
        <form id="form1" name="form1" method="POST" action="login_code.asp">
          <table width="325" border="0" cellpadding="3" cellspacing="3">
            <tr>
              <td width="94"> </td>
              <td width="210"> </td>
            </tr>
            <tr>
              <td>Username</td>
              <td><input type="text" name="username" id="username" /></td>
            </tr>
            <tr>
              <td>Password</td>
              <td><input type="text" name="password" id="password" /></td>
            </tr>
            <tr>
              <td colspan="2"><div align="center">
                <input type="submit" name="button" id="button" value="Submit" />
              </div></td>
            </tr>
          </table>
        </form>
      </div>
      <div data-role="footer">
        <h4>Footer</h4>
      </div>
    </div>
    </body>
    </html>

    "Fails to work" in what way?

  • Having trouble with jQuery toggle row to work right

    The results appear in a table and each row when clicked on shows detailed information.  I'm trying to use the jQuery toggle so it can open the detail information under the persons name.
    The jQuery code I have is this...
    <script>
    $(document).ready(function() {
         $("#title").click(function() {
         $("#detail").toggle();
    </script>
    Then my cfoutput table is this...
    <table>
    <thead>
    <tr><th>First Name</th></tr>
    </thead>
    <tbody>
    <cfoutput query="getRecords">
    <tr>
    <td id="title">#getRecords.firstN#</td>
    </tr>
    <tr>
    <td id="detail"><cfdiv bind="url:details.cfm?firstN=#firstN#" /></td>
    </tr>
    </cfoutput>
    </tbody>
    </table>
    Now what happens with that is all the detail records show up with the name and only the first row can toggle.  Everything else doesn't do anything.  Also is there a way to have the toggle show as closed first?  Thank you so much for any help with this.

    This is because you are referencing an ID with jQuery. An ID has to be unique, only one can exist, and after you create multiple cells with the same ID, jQuery just takes the first one.
    You will be better off using a class instead. So you can change you jQuery to look like this:
    $(document).ready(function() {
         $(".title").click(function() {
              $(this).parent().next().find('td').toggle();
    This will get the current clicked cells parent row, then go to the next row and look for the cell, then it will toggle.
    You then need to change your HTML to be something like this:
    <cfoutput query="getRecords">
        <tr>
            <td class="title">#getRecords.firstN#</td>
        </tr>
        <tr>
            <td class="detail"><cfdiv bind="url:details.cfm?firstN=#firstN#" /></td>
        </tr>
    </cfoutput>
    If you want to hide the detail cell first you can add some CSS to the detail class like so:
    .detail {
         display:none;
    Here is an example of it all - JSFiddle

  • Problems embedding html with jquery content

    Hey muse people.
    i'm currently struggling with a very annoying issue:
    I have a piece of html code with jquery bits in it (it's a 360° plugin). For some reason, it doesn't seem to work when i upload to my server and try it.
    I have tried the steps suggested in this thread: HELP! Adding Jquery to Muse! , but whenever i remove parts of the "JS Include" section, i get warnings and errors entering the page. The plugin works, though..
    Does anyone know a workaround on this one?
    Thanks in advance

    Hi Abhishek,
    thank you for looking into it:
    Homepage  <-  this is a simple page from muse with the html code embedded - it does not work (the image should switch when you click the "type" buttons)
    http://www.lichtermeile.de/simple/ <- here i just made an index.html and added the same code i used to embed as html in the muse page above
    It works just fine when i remove parts of the JS Include and fully remove the "Other scripts" section that muse added to the end of each html file .. but i don't know if that's a healthy and compatible way.
    This is the code:
    <html> 
    <script src='http://code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script>
        <script src='http://code.vostrel.cz/jquery.reel.js' type='text/javascript'></script>
        <img src="images/bild000.jpg" width="400" height="500"
          class="reel"
          id="image"
          data-images="images/bild###.jpg"
          data-cw="true"
          data-frames="36"
          data-duration="6"
          data-velocity="3"
          data-speed="-0.2"
          data-brake="0.2">
        <p>
          Please choose a product:
          <button id="image1">Type 1</button>
          <button id="image2">Type 2</button>
        </p>
        <script>
          $('#image1').click(function(){
            $('#image').reel('images', 'images/bild###.jpg');
          $('#image2').click(function(){
            $('#image').reel('images', 'images2/neu###.jpg');
        </script>
        <script> $.reel.def.indicator = 5; </script>
    </html>
    Thank you!!!

  • How to make thumbnails enlarge when using grid navigation effects with jquery

    I have used a grid navigation effect with jquery to display several thumbnail images but i would like the images to enlarge to a bigger size when they are clicked on, i dont want another window to open but for the image to appear on the same page like lightbox, except i dont need a gallery, just the enlarging function. Please see the code below of my page and the link to see the demo of the grid nav with jquery that i used (effect- 'rows move', example 9).
    http://tympanus.net/codrops/2011/06/09/grid-navigation-effects/comment-page-2/#comments
    <!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>My gallery</title>
    <link href="stylesheet.css" rel="stylesheet" type="text/css" />
    <link href="gridNavigation.css" rel="stylesheet" type="text/css" />
    <link href="reset.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    body {
              background-color: #000000;
    a:link {
              text-decoration: none;
              color:#f1d379;
    a:visited {
              text-decoration: none;
              color: #f1d379;
    a:hover {
              text-decoration: none;
              color: #9d6f1b;
    a:active {
              text-decoration: none;
              color: #f1d379;
    </style>
            <script type="text/javascript" src="scripts/jquery-1.6.1.min.js"></script>
                        <script type="text/javascript" src="scripts/jquery.easing.1.3.js"></script>
                        <script type="text/javascript" src="scripts/jquery.mousewheel.js"></script>
                        <script type="text/javascript" src="scripts/jquery.gridnav.js"></script>
    <script type="text/javascript">
    $(function() {
                                            $('#tj_container').gridnav({
                                                      type          : {
                                                          rows    : 2,
                                                                mode                    : 'rows',                               // use def | fade | seqfade | updown | sequpdown | showhide | disperse | rows
                                                                speed                    : 1000,                                        // for fade, seqfade, updown, sequpdown, showhide, disperse, rows
                                                                easing                    : 'easeInOutBack',          // for fade, seqfade, updown, sequpdown, showhide, disperse, rows
                                                                factor                    : 150,                                        // for seqfade, sequpdown, rows
                                                                reverse                    : ''                                        // for sequpdown
    </script>
    </head>
    <body>
    <div class="container" id="container">
    <div id="navbar_gallery" class="#navbar_gallery">
    <ul>
              <li><a  href="index.html">Homepage</a></li>
              <li><a  href="about_me.html" >About me</a></li>
              <li><a  href="gallery.html">Gallery</a></li>
              <li><a  href="contact.html">Contact</a></li>
      </ul>
    </div>
    <div class="maintext" id="page_maintext">
      <p class="page_heading">My Gallery</p>
    </div>
    <div class="content example5">
    <div id="tj_container" class="tj_container">
                                                      <div class="tj_nav">
                                                                <span id="tj_prev" class="tj_prev">Previous</span>
                                                                <span id="tj_next" class="tj_next">Next</span>
                                                      </div>
              <div class="tj_wrapper">
                                                                <ul class="tj_gallery">
                                                                          <li><a href="#"><img src="images/1.jpg" alt="image01" /></a></li>
                                                                          <li><a href="#"><img src="images/2.jpg" alt="image02" /></a></li>
                                                                          <li><a href="#"><img src="images/3.jpg" alt="image03" /></a></li>
                                                                          <li><a href="#"><img src="images/4.jpg" alt="image04" /></a></li>
                                                                          <li><a href="#"><img src="images/5.jpg" alt="image05" /></a></li>
                                                                          <li><a href="#"><img src="images/6.jpg" alt="image06" /></a></li>
                                                                          <li><a href="#"><img src="images/7.jpg" alt="image07" /></a></li>
                                                                          <li><a href="#"><img src="images/8.jpg" alt="image08" /></a></li>
                                                                          <li><a href="#"><img src="images/9.jpg" alt="image09" /></a></li>
                                                                          <li><a href="#"><img src="images/10.jpg" alt="image10" /></a></li>
                                                                          <li><a href="#"><img src="images/11.jpg" alt="image11" /></a></li>
                                                                          <li><a href="#"><img src="images/12.jpg" alt="image12" /></a></li>
                                                                          <li><a href="#"><img src="images/13.jpg" alt="image13" /></a></li>
                                                                          <li><a href="#"><img src="images/14.jpg" alt="image14" /></a></li>
                                                                          <li><a href="#"><img src="images/15.jpg" alt="image15" /></a></li>
                                                                          <li><a href="#"><img src="images/16.jpg" alt="image16" /></a></li>
                                                                          <li><a href="#"><img src="images/17.jpg" alt="image17" /></a></li>
                                                                          <li><a href="#"><img src="images/18.jpg" alt="image18" /></a></li>
                                                                          <li><a href="#"><img src="images/19.jpg" alt="image19" /></a></li>
                                                                          <li><a href="#"><img src="images/20.jpg" alt="image20" /></a></li>
                                                        </ul>
                </div>
      </div>
    </div>
    </body>
    </html>

    Ok so i've tried to do the above as suggested but i've obviously gone wrong somewhere as the fancybox function doesnt work, all that happens when clicking on thumbnail is the bigger version is opened in another browser window?
    <!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>My gallery</title>
    <link href="stylesheet.css" rel="stylesheet" type="text/css" />
    <link href="gridNavigation.css" rel="stylesheet" type="text/css" />
    <link href="reset.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="/fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
    <style type="text/css">
    body {
              background-color: #000000;
    a:link {
              text-decoration: none;
              color:#f1d379;
    a:visited {
              text-decoration: none;
              color: #f1d379;
    a:hover {
              text-decoration: none;
              color: #9d6f1b;
    a:active {
              text-decoration: none;
              color: #f1d379;
    </style>
            <script type="text/javascript" src="scripts/jquery-1.6.1.min.js"></script>
                        <script type="text/javascript" src="scripts/jquery.easing.1.3.js"></script>
                        <script type="text/javascript" src="scripts/jquery.mousewheel.js"></script>
                        <script type="text/javascript" src="scripts/jquery.gridnav.js"></script>
            <script type="text/javascript" src="/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
            <script type="text/javascript">
    $(function() {
                                            $('#tj_container').gridnav({
                                                      type          : {
                                                          rows    : 2,
                                                                mode                    : 'rows',                               // use def | fade | seqfade | updown | sequpdown | showhide | disperse | rows
                                                                speed                    : 1000,                                        // for fade, seqfade, updown, sequpdown, showhide, disperse, rows
                                                                easing                    : 'easeInOutBack',          // for fade, seqfade, updown, sequpdown, showhide, disperse, rows
                                                                factor                    : 150,                                        // for seqfade, sequpdown, rows
                                                                reverse                    : ''                                        // for sequpdown
    </script>
    <script type="text/javascript">
              $(document).ready(function() {
                        $(".fancybox").fancybox();
    </script>
    <script type="text/javascript">
    $(document).ready(function() {
                  $("#single_1").fancybox({
              helpers: {
                  title : {
                      type : 'float'
        $("#single_2").fancybox({
                  openEffect          : 'elastic',
                  closeEffect          : 'elastic',
                  helpers : {
                            title : {
                                      type : 'inside'
        $("#single_3").fancybox({
                  openEffect : 'none',
                  closeEffect          : 'none',
                  helpers : {
                            title : {
                                      type : 'outside'
                   $("#single_4").fancybox({
                  helpers : {
                            title : {
                                      type : 'over'
    </script>
    </head>
    <body>
    <div class="container" id="container">
    <div id="navbar_gallery" class="#navbar_gallery">
    <ul>
              <li><a  href="index.html">Homepage</a></li>
              <li><a  href="about_me.html" >About me</a></li>
              <li><a  href="gallery.html">Gallery</a></li>
              <li><a  href="contact.html">Contact</a></li>
      </ul>
    </div>
    <div class="maintext" id="page_maintext">
      <p class="page_heading">My Gallery</p>
    </div>
    <div class="content example5">
    <div id="tj_container" class="tj_container">
                                                      <div class="tj_nav">
                                                                <span id="tj_prev" class="tj_prev">Previous</span>
                                                                <span id="tj_next" class="tj_next">Next</span>
                                                      </div>
              <div class="tj_wrapper">
                                                                <ul class="tj_gallery">
                                                                          <li><a id="single_1" href="images/1-big.jpg" title="Row of beach huts"><img src="images/1.jpg" alt="Row of beach huts" /></a>
                                                                          <li><a id="single_2" href="images/2-big.jpg" title="Bees collecting pollen"><img src="images/2.jpg" alt="Bees collecting pollen" /></a></li>
                                                                          <li><a id="single_3" href="images/3-big.jpg" title="Frank"><img src="images/3.jpg" alt="Frank" /></a>
                                                                          <li><a id="single_4" href="images/4-big.jpg" title="New zealand beach"><img src="images/4.jpg" alt="Beach" /></a></li>
                                                                          <li><a id="single_5" href="images/5-big.jpg" title="Sonning river"><img src="images/5.jpg" alt="River" /></a></li>
                                                                          <li><a id="single_6" href="images/6-big.jpg" title="Steaming post in the morning sun"><img src="images/6.jpg" alt="steaming post" /></a></li>
                                                                          <li><a id="single_7" href="images/7-big.jpg" title="Portrait lady"><img src="images/7.jpg" alt="Portrait of lady" /></a></li>
                                                                          <li><a id="single_8" href="images/8-big.jpg" title="A great day at the coast"><img src="images/8.jpg" alt="Dog running along beach" /></a></li>
                                                                          <li><a id="single_9" href="images/9-big.jpg" title="Jam hut in new zealand"><img src="images/9.jpg" alt="Jam hut in new zealand" /></a></li>
                                                                          <li><a id="single_10" href="images/10-big.jpg" title="New zealand lake"><img src="images/10.jpg" alt="new zealand lake" /></a></li>
                                                                          <li><a id="single_11" href="images/11-big.jpg" title="Full speed ahead"><img src="images/11.jpg" alt="Dog running" /></a></li>
                                                                          <li><a id="single_12" href="images/12-big.jpg" title="Portsmouth docks"><img src="images/12.jpg" alt="Portsmouth docks" /></a></li>
                                                                          <li><a href="#"><img src="images/13.jpg" alt="image13" /></a></li>
                                                                          <li><a href="#"><img src="images/14.jpg" alt="image14" /></a></li>
                                                                          <li><a href="#"><img src="images/15.jpg" alt="image15" /></a></li>
                                                                          <li><a href="#"><img src="images/16.jpg" alt="image16" /></a></li>
                                                                          <li><a href="#"><img src="images/17.jpg" alt="image17" /></a></li>
                                                                          <li><a href="#"><img src="images/18.jpg" alt="image18" /></a></li>
                                                                          <li><a href="#"><img src="images/19.jpg" alt="image19" /></a></li>
                                                                          <li><a href="#"><img src="images/20.jpg" alt="image20" /></a></li>
                                                        </ul>
                </div>
      </div>
    </div>
    </body>
    </html>

  • Problem with Jquery Mobile Swatches

    Hello,
    Im trying to use Dreamweaver cs6 with Jquery Mobile but I'm receiving this error.
    File not found
    Dreamweaver could not file the file "Applications:Adobe Dreamweaver CS6: Configuration:JquerySwatch: JquerySwatchTemp.html" to load.
    Anybody can help me?
    Thanks

    Have a look here http://www.dmxzone.com/go/16740/clearing-dreamweaver-s-cache

  • Can I create a calculator like this with jQuery alone?

    My knowledge of Javascript is negligible. I was wondering if a calculator like this could be created with jQuery, or if it would require knowledge of writing Javascript?
    http://www.sonar6.com/pricing/

    Start with jQuery Calculation plugin.   Tweak values as required.
    http://www.pengoworks.com/workshop/jquery/calculation/calculation.plugin.htm
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • Has anyone found that the BC javascript validation conflicts with jquery mobile?

    I have added a form module to a page. Page has a desktop and mobile template - mobile template based on jquery.
    Form validates nicely on desktop (if the fields are not complete - then a javascript alert pops up. Visitor can close the alert dialog box and can complete the form.)
    However, on mobile, if the form is not filled out in manditory fields, the javascript alert pops up (as it should), but then the page goes to an error page - "Please fix this issue and re-insert your web form on your web page."
    Has anyone else had this problem. And even better - does anyone know of a solution? Thanks!

    This doesn't have to do with BC's form validation. The problem with your mobile site right now is that you are using the "$" variable which is usually associated with jQuery before jQuery is loaded on your page.  Once there's a javascript error on your page, the rest of the javascript will stop running so this error occurs very early on your page and some other javascript will stop working.
    To fix this you need to move the bit of javascript on line 13 of your page templates further down after the jQuery library is referenced, so this:
    <script>
            $(document).bind("mobileinit", function () {
    $.mobile.ajaxEnabled = false;
    });</script>
    <link href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" rel="stylesheet" type="text/css" />
    <script src="http://code.jquery.com/jquery-1.6.4.min.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js" type="text/javascript"></script>
    becomes this:
    <link href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" rel="stylesheet" type="text/css" />
    <script src="http://code.jquery.com/jquery-1.6.4.min.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js" type="text/javascript"></script>
    <script>
            $(document).bind("mobileinit", function () {
    $.mobile.ajaxEnabled = false;
    });</script>

  • How to validate input fields as the user is filling up a form with jQuery?

    Hello EA friends.
    Someone has experimented on how to validate input fields as the user is filling up a form with jQuery?, if the field is numeric and insert an A for example, an alert appears showing "insert a number" or not allowed to enter anything until a number is entered.
    Thanks and regards.
    Fer

    Hi Sudeshna.
    Sorry for not responding on time, how can I be included in this code?
    sym.setVariable("typeActivity", "input")
    var Element_1=document.createElement(typeActivity);
    $(Element_1).css({"text-align": "center"});
    //Answer
    sym.setVariable("Answer_1", "4");
    sym.$("box_1").append(Element_1)
    This code is on my creationComplete and it works fine.
    Would greatly appreciate your help.
    Regards.
    Fer García

  • File uploads using jQuery with jquery.fileupload.js fails in Firefox over SSL

    Please see the link below where I originally posted the question.
    http://stackoverflow.com/questions/27792614/file-uploads-using-jquery-with-jquery-fileupload-js-fails-in-firefox-over-ssl

    Thanks. In my estimation that is exactly the issue. But that doesn't help with a resolution.
    The actual file size: 945,991 bytes
    If Firefox is miscalculating the length (in Safari/Chrome 945991 and 946241 in Firefox), then Firefox is reporting erroneously and should be raised as a bug in Firefox, would you agree?

  • Export a column to bibtex.bib with jquery

    Hi,
    Is it possible to create a link or button with jquery inside my content type(for example in the welcome page of the content type) that export the content of a column of this content type to a .bib file(for example bibtex.bib) ? user click on this link or
    button and download this already created .bib file. if it is possible how can I achieve this?

    The only content type that has a welcom page is the document set.
    You'd then want a custom action on the ribbon to kick off a process that exports the data into a file and attempts to download it. It sounds like you're going to be pushing the limits of what jQuery is suitable for. It's brilliant for displaying content
    but it's not typically used to create files for downloading.
    You could gather the information from that column using the REST API, it's not the easiest to find guides on but this covers a lot of the basics:
    http://www.c-sharpcorner.com/uploadfile/anavijai/rest-api-in-sharepoint-2010-for-listdata-svc-part-2/
    Once you've got that data from the list you've got to create a file with that content in the appropriate format. Javascript normally doesn't have access to the file system, for good reason but there is a plugin here that might be of use:
    http://jquery.tiddlywiki.org/twFile.html
    Once the file has been created you'd need to kick off something that redirects the user to the download link but that's relateively straight forward.
    Frankly i'd say managed code is the best option for this, while you might be able to manage it through jQuery and the CSOM it's far from the easiest option and not the one i'd follow. Encode the bibtex file generation process using C# and then call it using
    a custom action.

  • Error when  longing to UCM 11g its going to another URL  with  JQUERY exception

    when i longing to UCM 11g its going to following URL with  JQUERY exception
    http://172.18.2.91:16200/cs/idcplg?IdcService=GET_DOC_PAGE&Action=GetTemplatePage&Page=JQUERY_COOKIE_JS
    OR
    http://172.18.2.91:16200/cs/idcplg?IdcService=GET_DOC_PAGE&Action=GetTemplatePage&Page=JQUERY_UI_CUSTOM_JS
    JQUERY exception :
    /** * Cookie plugin * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * Create a cookie with the given name and value and other optional parameters. * * @example $.cookie('the_cookie', 'the_value'); * @desc Set the value of a cookie. * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); * @desc Create a cookie with all available options. * @example $.cookie('the_cookie', 'the_value'); * @desc Create a session cookie. * @example $.cookie('the_cookie', null); * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain * used when the cookie was set. * * @param String name The name of the cookie. * @param String value The value of the cookie. * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. * If set to null or omitted, the cookie will be a session cookie and will not be retained * when the the browser exits. * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will * require a secure protocol (like HTTPS). * @type undefined * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/[email protected] */ /** * Get the value of a cookie with the given name. * * @example $.cookie('the_cookie'); * @desc Get the value of a cookie. * * @param String name The name of the cookie. * @return The value of the cookie. * @type String * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/[email protected] */ jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { // name and value given, set cookie options = options || {}; if (value === null) { value = ''; options = $.extend({}, options); // clone object since it's unexpected behavior if the expired property were changed options.expires = -1; } var expires = ''; if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { var date; if (typeof options.expires == 'number') { date = new Date(); date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); } else { date = options.expires; } expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE } // NOTE Needed to parenthesize options.path and options.domain // in the following expressions, otherwise they evaluate to undefined // in the packed version for some reason... var path = options.path ? '; path=' + (options.path) : ''; var domain = options.domain ? '; domain=' + (options.domain) : ''; var secure = options.secure ? '; secure' : ''; document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); } else { // only name given, get cookie var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); // Does this cookie string begin with the name we want? if (cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; } };

    If you are using Server 2003 x64 you need to make sure that you change IIS to run in 32 bit mode. FDM is a 32 bit application and requires that IIS is running in 32 bit mode in IIS6. If you are using IIS7 it runs in 32 bit mode automatically, but with IIS 6 it can only run in 64 or 32 bit mode, not both.

  • General search form with JQuery not working

    Hi,
    I tried to use jquery to submit a search form because I need some checking before submit. However,  it did not go to search results page, but went to home page instead.
    Here is my html:
    <form name="catsearchform96767" id="generalSearchForm" method="post">
        <p><label style="opacity: 1;" for="f-search">Search</label> <input type="text" name="CAT_Search" id="f-search" /> <button type="submit">GO</button></p>
    </form>
    Javascript:
    $('#generalSearchForm').submit(function(){
         $(this).attr('action', '/Default.aspx?SiteSearchID=1060&amp;ID=/search-results');
         $(this).unbind().submit();
         return false;                                         
    It does not work with JQuery. But when I moved form action url from jquery to html, it worked. Any ideas? Cheers.

    Hi David,
    Below is the complete code I have used to load the current user to the people picker in SharePoint 2013.
    $(document).ready(function(){
    SP.SOD.executeFunc('sp.js', 'SP.ClientContext', LoadCurrentUser);
    function LoadCurrentUser() {
    var context = SP.ClientContext.get_current();
    var siteColl = context.get_site();
    var web = siteColl.get_rootWeb();
    this._currentUser = web.get_currentUser();
    context.load(this._currentUser);
    context.executeQueryAsync(Function.createDelegate(this, SetPickersToCurrentUser), Function.createDelegate(this, LoadUserfailed));
    function LoadUserfailed() {
    alert('failed');
    function SetPickersToCurrentUser()
    var loginName = this._currentUser.get_title();
    SetPeoplePicker('Order Team', loginName);
    function SetPeoplePicker(fieldName, userAccountName) {
    var peoplePickerDiv = $("[id$='ClientPeoplePicker'][title='" + fieldName + "']");
    var peoplePickerEditor = peoplePickerDiv.find("[title='" + fieldName + "']");
    var spPeoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[peoplePickerDiv[0].id];
    peoplePickerEditor.val(userAccountName);
    spPeoplePicker.AddUnresolvedUserFromEditor(true);
    Let me know if you have any questions. I will help you out!
    -Praveen.
    ASP.NET and SharePoint developer
    Blog: http://praveenbattula.blogspot.com
    Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you.

Maybe you are looking for

  • How to have RAC accept Forms and Reports connection to non specific node?

    Hi all, I have posted this in the Forms forum w/ no result, hoping someone here can help; Oracle Forms and Reports services, not the entire app server. Version 10.1.2.0.2, one server Oracle database, RAC Version 11.1.0.6.0, 3 nodes Instance=RMSTEST N

  • Setting only the TO field on the Created on Field in Selection screen to Current date

    Hello, We have a requirement to Set only the To date in the Created on Field in Selection screen to the Current date, I have tried through Dynamic variable option to set the Date calculation but I am able to see Options to set the Current date to Fro

  • Problem viewing data through autogenerated java class

    I have a AQ created with a custom data types as below. User type definition type clr_msg_type as object( firm_id number, b_com_id number, cl_com_id number, action varchar2(15), action_id varchar2(15), user_id varchar2(30), clr_status varchar2(20), p_

  • Error in date format in lsmw recording

    Hi all, I am uploading condition records using recording..I have two date fields DATAB and DATBI which are of data type dats...I have defined the corresponding source fields as char8...Now in the last step when i am processing the batch input session

  • Bluetooth Prefs on Intel Mac

    I recently upgraded from a PwrBk to a Intel Core 2D iMac 2.3/2GB/10.4.8. I was using a Palm device with the PwrBk and had no troubles using iSync and no troubles with Sys Prefs. I've been able to get the Palm syncing on the Intel Mac, but run into an