Combining JQuery and Normal Javascript

I have 2 html regions on my page which just contain text that is used in JQuery dialog boxes.
At the moment one dialog is displayed onload and the other is displyed on an onblur event on a page item. I am trying to alter the onblur, so it only fires if the page item is null
In my header I have
**<script type="text/javascript" src="&JAVASCRIPT_DIR.jquery/jquery-1.3.2.js"></script>
**<link type="text/css" href="&CSS_DIR.jquery-ui-1.7.2.custom.css" rel="stylesheet" />
**<script type="text/javascript" src="&JAVASCRIPT_DIR.jquery/jqueryui/jquery-ui-1.7.2.custom.js"></script>
**<script type="text/javascript">
$(function() {
**This is the onload message
$message = $("#message");
$message.dialog({
bgiframe: true,
modal: true,
buttons:
{ "Ok": function()  { $(this).dialog("close"); } } });
**This is the onblur message
function notNull(object){ if(object.value=="")
$notnull = $("#notnull");
$notnull.dialog({
autoOpen: false,
bgiframe: true,
modal: true,
buttons:
{ "Ok": function()  { $(this).dialog("close"); } } })
**</script>
on page item
**onblur="notNull(this);"
The onload message fires ok but the onblur does not work.
Any ideas where I am going wrong please
Gus

Hello Gus,
Maybe [this blog post|http://roelhartman.blogspot.com/2008/12/apex-how-to-emphasis-required-fields.html] will help (shameless plug).
The function you're looking for is:
function checkRequiredField(pThis){
if (!(pThis.value)){
     alert('Field must be entered');
     setTimeout(function(){pThis.focus();}, 5);
}Recently I changed the code to :
$(function(){
  // Add the requiredField class to all Fields with Required Labels
  $(".t502RequiredLabelwithHelp").parent().parent().next().children()
    .not('[type=hidden], [class=radio_group], [class=display_only]')
    .addClass("requiredField")
    .attr("onblur",'checkRequiredField(this)');
function checkRequiredField(pThis){
  $(pThis).removeClass("alertField");
  if (!(pThis.value)){
    $(pThis).addClass("alertField");
    $(pThis).append('<div id="alert" title="Field must be entered">Please enter a valid value for this field.</div>');
    $("#alert").dialog({
                         bgiframe: true,
                   modal: true,
                   minHeight : 100,
                   buttons: {
                     Ok: function() {
                     $(this).dialog('close');
                     $("#alert").remove();
}That way I didn't need a roundtrip to the server anymore, just plain jQuery stuff.
Hopes this sets you in the right direction!
Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this reply by marking it as either Helpful or Correct ;-)

Similar Messages

  • How to work JQuery and content editor webpart functionality in sharepoint 2013?

    Hi all,
    I have a requirement to display the list data in share-point page by using JQuery and content editor web-part. could you please any one suggest the process to display the list data using JQuery and ContentEditorWebpart.
    Thanks in advance.
    Thanks,
    phani kumar
    Phani kumar

    Hi,
    From your description, my understanding is that you want to show a list data in a page using jQuery and Content Query Web Part.
    You could use SharePoint REST API to accomplish your requirement, please refer to this code below:
    <div id="listData">
    </div>
    <script src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script><script type="text/javascript">
    $(document).ready(function(){
    //replace your list title
    $.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('customlist03')/items",
    type: "GET",
    headers: {"accept": "application/json;odata=verbose"},
    success: function (data) {
    if (data.d.results) {
    var obj = data.d.results;
    for(var i = 0; i < obj.length; i++)
    $("#listData").append("<div>title "+obj[i].Title+"</div>");
    error: function (xhr) {
    alert(xhr.status + ': ' + xhr.statusText);
    </script>​​
    The screenshot below is my result:
    Please refer to these articles:
    Working with lists and list items with REST
    https://msdn.microsoft.com/en-us/library/office/dn292552.aspx
    SharePoint 2013 – CRUD on List Items Using REST Services & jQuery
    http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
    You can also get list data using JavaScript Client Object Model(JSOM), you could refer to this article:
    How to: Complete basic operations using JavaScript library code in SharePoint 2013
    https://msdn.microsoft.com/en-us/library/office/jj163201.aspx?f=255&MSPPError=-2147217396
    Here is a link about how to add code into page via Content Editor Web Part:
    http://blogs.msdn.com/b/sharepointdev/archive/2011/04/14/using-the-javascript-object-model-in-a-content-editor-web-part.aspx
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • SPServices, jQuery, and GetPermissionsByToken

    I wanted to use GetPermissionsByToken in order to get the broken permissions to folders in a document library. Is there some other web service I call, I can use SPServices to access the permisison on document library folders, only? I need to do this only
    in a CEWP , client-side, using jQuery and SPServices, or just javascript in order to access this particular method of Permissions webservice. Or if there is some other service I could feed the ID of the folder(s) in question, to in order to retireve just the
    permisisons for each folder, please let me know.? I am in MOSS 3.0./SharePoint 2007

    I get what you're saying, but from what I've dealt with/understand SiteData.asmx only goes to the granualarity of the site object, and permissions down to the list.
    If you're able to get that working on the item level, can you share the code?
    If not, I can walk you through setting up a custom webservice that would call out the item you are looking for by passing the item Id and List Id as parameters and return the permissions.
    Brandon James SharePoint Developer/Administrator

  • Dreamweaver CS6-  jquery and jquery cycle to have 5 images slide (as a fade) in a banner code failure- help?

    Dreamweaver CS6- I am trying to use jquery and jquery cycle to have 5 images slide (as a fade) in a banner. I thought I got the code right but it stacked the images. I suspect I have the incorrect code for the position or I haven't properly added cycle.
    my head code:
    <title>slider</title>
    <script type="text/javascript" src="JS/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="JS/jquery.cycle2.min.js"></script>
    <script type="text/javascript">
    $('#slider').cycle({
    </script>
    <style type="text/CSS">
    #slider {margin:auto;}
    </style>
    My div code:
    <div id="slider">
      <p> 
        <img src="Leather web page/DSC_0531_4925.JPG"/>
        <img src="Leather web page/DSC_0035_edited-1.JPG"/>
        <img src="Leather web page/DSC_1593_edited-1.jpg"/>
        <img src="Leather web page/DSC_1595_edited-1.jpg"/>
        <img src="Leather web page/DSC_1821.jpg"/>
        </div>
    Any help would be greatly appreciated.

    1. You can use a constructor to change the defaults. The default values can be seen in jquery.cycle2.js starting at line 659 as per the following. As you can see at the bottom, the code automatically runs the slideshow(s)
    // @see: http://jquery.malsup.com/cycle2/api
    $.fn.cycle.defaults = {
        allowWrap:        true,
        autoSelector:     '.cycle-slideshow[data-cycle-auto-init!=false]',
        delay:            0,
        easing:           null,
        fx:              'fade',
        hideNonActive:    true,
        loop:             0,
        manualFx:         undefined,
        manualSpeed:      undefined,
        manualTrump:      true,
        maxZ:             100,
        pauseOnHover:     false,
        reverse:          false,
        slideActiveClass: 'cycle-slide-active',
        slideClass:       'cycle-slide',
        slideCss:         { position: 'absolute', top: 0, left: 0 },
        slides:          '> img',
        speed:            500,
        startingSlide:    0,
        sync:             true,
        timeout:          4000,
        updateView:       0
    // automatically find and run slideshows
    $(document).ready(function() {
        $( $.fn.cycle.defaults.autoSelector ).cycle();
    2. To center the slideshow, merely center the container as in
    div.cycle-slideshow {
        width: 1000px;
        margin: auto;

  • $CQ, $, JQuery, and JQPlot

    Can someone explain the use of $CQ versus $ in more detail for JQuery?  I already know that $CQ refers to CQ's built-in version of JQuery and that $ refera to any secondary jquery package that I may load.
    Let me be more precise.  My app requires charts and JQPlot seems one of the best plotting solutions available.  By default (as you would expect) jqplot.js file refers to JQuery through $.  My expectation would be that this would not work in CQ unless I renamed all the $ to $CQ in the jqplot.js file.  Oddly this wasn't true.  I simply added jqplot.js to my clientlib folder and was able to start rendering graphs.
    Very odd!  Why is that?
    The primary reason for asking is that while the JQuery base package is working, a JQPlot plugin (Cursor) is not...and I can only track it down to some issue between referring to $ versus $CQ.
    Thanks!

    CQ5 appears to use jQuery for some of the contributor / authour mode functionality. Wisely Adobe has name-spaced the version of jQuery they use for CQ5 in their $CQ alias.
    Open a javascript console in your browser and enter $CQ.fn.jquery --> "1.7"
    Next enter $.fn.jquery --> "1.X.X"
    You might need a specific version of jQuery for your jQplot plugin, and maybe you dont want to mess with upgrading CQ5's version of jQuery which is name-spaced in $CQ.
    Pretend jQplot depends on jQuery version "1.8.2", if you've addded a link to the newer version of jQuery on your page, the 1.8.2 version of jQuery will be aliased to "$" by default. This "$" is just for your convienience so you don't have to type jQuery("#foo").doSomthing(...); and can instead type $("#foo").doSomthing(...);
    You can therefore have both versions of jQuery running in the same page at the same time. Because jQuery 1.7 is referenced using $CQ and 1.8.2 is referenced via $
    Of course you could create your own namespace for jQuery
    var $JQ = jQuery.noConflict();
    $jQ("#foo").doSomthing(...)
    More to the point, if you've loaded both versions of jQuery on the same page...
    var plot1 = $.jqplot ('chart1', [[3,7,9,1,4,6,8,2,5]]); <--- uses jQuery version "1.8.2"
    var plot2 = $CQ.jqplot ('chart1', [[3,7,9,1,4,6,8,2,5]]); <--- uses jQuery version "1.7"
    Its best not to load two versions jQuery unless there's some compeling reason to do so.
    Of course all this really depends on how you're loading jQuery. See jQuery's docs for more on working with jQuery with other libraries.
    http://docs.jquery.com/Using_jQuery_with_Other_Libraries

  • Is there any BAPI which combines web and SAP??

    Is there any BAPI which combines web and SAP??

    Hi Krishna,
    <b>Good .. check the following documentation
    BAPIs are technically nothing else but RFC-enabled function modules meaning that they provide us with external access to the SAP system.
    However, BAPIs are more than "normal" RFC-enables function modules in that they generally access SAP business objects (like customer, sales order, etc.).
    Usually, a BAPI corresponds to a certain dialog transaction dealing with a SAP business object (e.g. BAPI_USER_CREATE -> SU01 to create SAP users).
    In web terms RFC is similar to HTTP and BAPIs are CGI applications.
    RFC will normally provide sy-subrc 0 or >0. Most of the BAPIS will provide a return-structure.
    RFC and BAPIs are remote enabled function modules. They are practicly the same. A BAPI is one step further as it usually is a self contained business function, such as "Create Purchase Order", or "Change Sales Document". BAPIs interface is very well defined and documented. BAPIs can be found in the BAPI browser via transaction BAPI. RFCs are just remote enabled function modules.
    refer links,
    http://searchsap.techtarget.com/ateQuestionNResponse/0,289625,sid21_cid558752_tax293481,00.html
    http://www.sap-img.com/abap/interview-question-on-bapi-rfc-abap-objects-tables.htm
    http://www.sap-img.com/fu033.htm
    http://www.sap-img.com/abap/ale-bapi.htm</b>
    Good Luck and thanks
    AK

  • What is difference between enjoy transactions and Normal transactions

    What is difference between enjoy transactions and Normal transactions
    Ex:- ME22 & ME22N
    What is difference between these two.

    hi ,
    the transaction code with 'N' are created with help of object concept.
    In your case ME22 is obsolete one and ME22N is the tcode created with object concept.
    pls Reward helpful points
    Thanks
    Siva

  • A single report can't combine portrait and landscape oriented pages

    Post Author: joelo2
    CA Forum: Crystal Reports
    Hi,
    Can a single report in Crystal report XI (version 11.5.8.826) combine portriat and landscape oriented pages like Crystal report 2008?   For example, I have one main report with several subreports in the main report.  I want one subreport be in portrait page orientation and the other subreports in landscape.  Can I do something like that in Crystal report XI version?    I even tried writing a small .net program to do this, but it doesn't seem to allow me to do that programmatically either.  Please help

    Post Author: ngra
    CA Forum: Crystal Reports
    I'd like to elevate this issue with Crystal Reports XI. There is a critical application which we developed in-house which needs both portrait and landscape orientation in each of the 30,000 plus documents we are sending out every month.If developers in Business Objects are picking this thread up - we need a patch for this limitation - quick. Right now, we are toying with the possibility of exporting the documents into a text format with markers indicating if a page is portrait or landscape. This is to be loaded into a Xerox machine (which costs hundreds of thousands of dollars), where it is mapped automatically to portrait or landscape. Note to Business Objects: This will provide us and countless others with much value. Think 80/20 rule - most bang for your development bucks and value for your customers!

  • Open PDF from database in a browser and run Javascript within PDF

    What we're trying to accomplish is to query a PDF in the database and open the PDF in the browse. Once opened if a user click on a link to open another PDF, it launchs a URL to Coldfusion, that queries the database and opens the PDF link. This all works but we also want to have the open PDF goto a section or bookmark within the PDF. We currently have JavaScripts within the PDF links that do that but only if the PDF is in the file system. We're using the app.openDoc to get a reference to the opened PDF. But when opening the PDF from the database we pass the control to Coldfusion using app.launchURL or app.getURL. These do not pass back a reference to the opened PDF and the JavaScripts fails.
    I'm looking for different methods or ideas.
    Is there another way to do this, I'm new to acrobat JavaScripting?
    Thanks, Rob

    I tried tapping and holding the attachment icon, it just shows "Open / Bookmark/ Copy"...
    Also i tried opening the attachement first and then tapping on it, it just shows "open in Safari"
    Is there any settings to be done to add the options of Opening in Adobe Reader/or any other Docu Sign app . the exhibition booth systems one would work i think
    Appreciate if someone could help

  • How do I combine text and photos on the same page in iPhoto using photobook

    How do I combine text and photos on the same page in iPhoto using photobook?

    You mean while creating a book in iPhoto?  Click on the layout button while viewing a page and select the layout that includes both text and photos.  Most themes will have those options.
    OT

  • Have Windows XP and Adobe 9 Reader and need to send a series of large documents to clients as a matter of urgency     When I convert 10 pages a MS-Word file to Pdf this results in file of 6.7 MB which can't be emailed.     Do I combine them and then copy

    I have Windows XP and Adobe 9 Reader and need to send a series of large documents to clients as a matter of urgency When I convert 10 pages a MS-Word file to Pdf this results in file of 6.7 MB which can't be emailed.  Do I combine them and then copy to JPEG 2000 or do I have to save each page separately which is very time consuming Please advise me how to reduce the size and send 10 pages plus quickly by Adobe without the huge hassles I am enduring

    What kind of software do you use for the conversion to pdf? Adobe Reader can't create pdf files.

  • I imported pics to catalogs on different external hard drives.  Later renamed external HDs.  I want to combine catalogs and have my source (NEF) files all together on one drive. Can I merge cats and will new path to source files be correct if when inporti

    I imported different trips to different catalogs on different external hard drives.  Later renamed external HDs.  I want to combine catalogs and have my source (NEF) files all together on one drive.  I’m not really sure how to get those source files back and get rid of the extra long path to where the source files are now located. If I re-link files to their current catalog (many different paths to files in same catalog) can I merge (import catalogs) into one master catalog?  Will the new (Master catalog) have the correct link to the source file?  If not, how or can this be done?
    I have tried to explain my situation as clearly as I can.  Do you understand my situation?
    This maybe something you don’t have time to help me with.  If not can you suggest somewhere I can get an answer?  I really need help.  PLEEEZZZ HELP ME.
    Bruce Schuerman
    Norman, OK
    405_514-4875 (call collect)
    [email protected]

    I imported different trips to different catalogs on different external hard drives.  Later renamed external HDs.  I want to combine catalogs and have my source (NEF) files all together on one drive.  I’m not really sure how to get those source files back and get rid of the extra long path to where the source files are now located. If I re-link files to their current catalog (many different paths to files in same catalog) can I merge (import catalogs) into one master catalog?  Will the new (Master catalog) have the correct link to the source file?  If not, how or can this be done?
    I have tried to explain my situation as clearly as I can.  Do you understand my situation?
    This maybe something you don’t have time to help me with.  If not can you suggest somewhere I can get an answer?  I really need help.  PLEEEZZZ HELP ME.
    Bruce Schuerman
    Norman, OK
    405_514-4875 (call collect)
    [email protected]

  • I imported different trips to different catalogs on different external hard drives.  Later renamed external HDs.  I want to combine catalogs and have my source (NEF) files all together on one drive.  I'm not really sure how to get those source files back

    I imported different trips to different catalogs on different external hard drives.  Later renamed external HDs.  I want to combine catalogs and have my source (NEF) files all together on one drive.  I’m not really sure how to get those source files back and get rid of the extra long path to where the source files are now located. If I re-link files to their current catalog (many different paths to files in same catalog) can I merge (import catalogs) into one master catalog?  Will the new (Master catalog) have the correct link to the source file?  If not, how or can this be done?
    I have tried to explain my situation as clearly as I can.  Do you understand my situation?
    This maybe something you don’t have time to help me with.  If not can you suggest somewhere I can get an answer?  I really need help.  PLEEEZZZ HELP ME.
    Bruce Schuerman
    Norman, OK
    405_514-4875 (call collect)
    [email protected]

    Is there any solution (other than buying
    I really think 'buying' is the best solution on this one.  Ideally, you would have at least five internal hard drives.
    System
    Projects
    Cache/Scratch
    Media
    Exports
    Use externals and network drive only for backup.

  • What are smart mailboxes and why do i need both smart and "normal" ones?

    What are smart mailboxes and why do I need both smart and "normal" mailboxes?

    Hi Kingoftypos,
    Thanks for that clarification. So, now it appears that the ultimate purpose of a Smart Mailbox is to point to all emails that meet the criteria in a single place, so if they are spread among several mailboxes, you will be able to see them all together. Here is an article from Apple that describes it:
    A Smart Mailbox displays in one location messages that are stored in other mailboxes, so you don’t have to move messages between mailboxes. The messages displayed by a Smart Mailbox are based on criteria you define, and are automatically updated to include new messages that match your criteria. For example, you might create a Smart Mailbox that displays all messages found in all mailboxes from a specific sender.
    If you change a message in a Smart Mailbox, such as marking the message as read or unread, or moving or deleting the message, the change is reflected in the mailbox where the message is actually stored.
    So, adam, I would think that, if you had mail going to a lot of different places, and wanted to be able to see a particular set of those in a single place, you would use a smart mailbox. Maybe use the rules to direct your mail to different places to start with, but a smart mailbox to bring a set of common ones all together into a single smart mailbox?
    Maybe you have Rules move your Amazon mail to an Amazon folder and your Apple mail to an Apple folder, but then you have a Smart Mailbox that contains any mail that has the word "Receipt" in the Subject line?
    Just a thought....
    Cheers,
    GB

  • Combined Upgrade and Unicode conversion of Sap 4.6C to ECC6.0

    Hello all,
    my project team intends to carry out a combined upgrade and unicode conversion of an SAP ERP 4.6C system with MDMP to ECC6.0 (no enhancement package). The system is running on Oracle 10.2.
    In preparation for this upgrade, I have gone through the SAP notes 928729, 54801.
    We need to get a rough estimate of the entire downtime so as to alert our end users. From the CU&UC documentation in 928729, I read up note 857081. However the program in this note cannot be used to estimate the downtime as my system is < SAP netweaver 6.20.
    Is there any other SAP note or tool or program that I can use to estimate the downtime for the entire CU&UC? Thanks a lot!

    Hi,
    Combined upgrade depend upon number of factors like database size, resources on the server and optimization. In order to get idea of how much downtime, it will take, I would suggest you to do combined upgrade and unicode conversion on sandbox system which should be the replica of your production system. And try to optimize it. From there you can get approx. downtime required.
    Also, please read combined upgrade and unicode conversion guides on  http://service.sap.com/unicode@sap
    Thanks
    Sunny

Maybe you are looking for