Jquery is not working after i enable the attachments in Share Point EditForm

Hi ,
I have customized the Edit form .After customization the attachment functionality is not working and resolved the issue by creating the new Edit form .The attachments section only works if i don't push any j query/java script functions.If i comment below
line two lines the attachment sections works.But i would need to include them .Could you tell me how would i call below script in EditForm.
//_spBodyOnLoadFunctionNames.push("Test");
//_spBodyOnLoadFunctionNames.push("checkStatus");
<script>
function redirect(offerID)
  var loc = "DispForm.aspx?ID=" + offerID;
  window.location.href = loc;
function Test()    
var TitleValue = "Drafting Communication";//$('#ctl00_m_g_1918401d_e6f3_4b9b_9262_dbb4aabcfd12_ff11_ctl00_ctl00_TextField').val();
alert(TitleValue );
if(TitleValue =="Drafting Communication")
$("select[Title='Workflow Stage']").find('option:contains("Stage 1 – Review")').remove(); 
 $("select[Title='Workflow Stage']").find('option:contains("Stage 2 – Review")').remove(); 
 $("select[Title='Workflow Stage']").find('option:contains("Stage 3 – Review")').remove();
 $("select[Title='Workflow Stage']").find('option:contains("Stage 4 – Review")').remove();
 else if(TitleValue =="Stage-1 Pre Approval Business")
 $("select[Title='Workflow Stage']").find('option:contains("Drafting Communication")').remove(); 
 $("select[Title='Workflow Stage']").find('option:contains("Stage 2 – Review")').remove(); 
 $("select[Title='Workflow Stage']").find('option:contains("Stage 3 – Review")').remove();
 $("select[Title='Workflow Stage']").find('option:contains("Stage 4 – Review")').remove();
else if(TitleValue =="Stage-2  Approval Marketing")
$("select[Title='Workflow Stage']").find('option:contains("Drafting Communication")').remove(); 
 $("select[Title='Workflow Stage']").find('option:contains("Stage 1 – Review")').remove(); 
 $("select[Title='Workflow Stage']").find('option:contains("Stage 3 – Review")').remove();
 $("select[Title='Workflow Stage']").find('option:contains("Stage 4 – Review")').remove(); 
else if(TitleValue =="Stage-3  Approval Director")
 $("select[Title='Workflow Stage']").find('option:contains("Drafting Communication")').remove(); 
 $("select[Title='Workflow Stage']").find('option:contains("Stage 2 – Review")').remove(); 
 $("select[Title='Workflow Stage']").find('option:contains("Stage 1 – Review")').remove();
 $("select[Title='Workflow Stage']").find('option:contains("Stage 4 – Review")').remove(); 
 else
$("select[Title='Workflow Stage']").find('option:contains("Drafting Communication")').remove(); 
 $("select[Title='Workflow Stage']").find('option:contains("Stage 2 – Review")').remove(); 
 $("select[Title='Workflow Stage']").find('option:contains("Stage 1 – Review")').remove();
 $("select[Title='Workflow Stage']").find('option:contains("Stage 3 – Review")').remove(); 
  $(".SelectA").hide();
function getTagFromIdentifierAndTitle(tagName, title) 
  var tags = document.getElementsByTagName(tagName);
    for (var i=0; i < tags.length; i++) {
     var tempString = tags[i].id;
    if (tags[i].title== title) {
    alert(tags[i].title);
      return tags[i].value;
  return null;
function checkStatus() {
  var selectedId = getField('select','Current Status').options[getField('select','Current Status').selectedIndex].value;
   var docID = 73;
  if(selectedId == 'Approved')
   $("input[value$='Save']").attr('disabled', true); 
function getField(fieldType,fieldTitle) {   
    var docTags = document.getElementsByTagName(fieldType);   
    for (var i=0; i < docTags.length; i++) {   
        if (docTags[i].title == fieldTitle) {   
            return docTags[i]   
//_spBodyOnLoadFunctionNames.push("Test");
//_spBodyOnLoadFunctionNames.push("checkStatus");
</script>

Hi,
According to your post, my understanding is that you failed to use the _spBodyOnLoadFunctionNames.push() function.
Per my knowledge, the _spBodyOnLoadFunctionNames.push() is SharePoint's version of jQuery's $(document).ready() or $(function(){}).
I recommend you to add a content-editor-webpart on the page and add the code below on the source editor to check whether it works.
 <script language="javascript">
_spBodyOnLoadFunctionNames.push("FunctionName");
function FunctionName(){
    alert(Test);
</script>
More information:
SharePoint JavaScript – Page Load Add function: _spBodyOnLoadFunctionNames
If it works well, the issues is caused by the functions you created.
You need to check whether your code are correct.
In addition, you can make init.js loaded before _spBodyOnLoadFunctionNames.
Here is a similar thread for your reference:
http://sharepoint.stackexchange.com/questions/93937/spbodyonloadfunctionnames-not-working-on-master-page
Best Regards,
Linda Li
Linda Li
TechNet Community Support

Similar Messages

  • Problem with new version 4.3.2 apps not working " after update to the new version "

    Problem with new version 4.3.2 apps not working " after update to the new version "
    i was in 4.3.1 then i do the update , but now after update i face this problem , so what i Supposed to do ?!!

    Hi There
    Had the same problem as you. App would terminate when launched.
    Solution to working You Tube app:
    -Go to playstore
    - Uninstall app (it doesn't remove the app, only removes the update)
    - "Et Voila", working again.
    This doesn't correct the problem, it's just a workaround for you to be able to use youtube app again.
    Hope it helped.
    Best Regards

  • The sound in my IPad is not working after I downloaded the new iOS 7. I tried to reset the IPad to no avail. Could anyone be so kind to help me?

    The sound in my IPad is not working after I downloaded the new iOS 7. I tried to reset the IPad to no avail. Could anyone be so kind to help me?

    I"m going to make the presumption that you've checked the volume and that you don't have it muted. One thing some have suggested is to go into the settings and reset all settings.
    It is kind of a drag because you wil have to retweak everything but it's helped for some.

  • My camera does not work after I restored the system, how can I use it again?

    My camera does not work after I restored the system, how can I use it again?
    Thank you for your help!

    Did try to restore "as new device" without using the backup after that?
    Did you try to reset the phone by holding the sleep and home button until the Apple logo coes back again?

  • My Wifi is not working after re setting the net work also

    My Wifi is not working after re setting the network also.

    Read here:
    http://support.apple.com/kb/ts1559
    If nothing helps, make an appointment at any Apple store.

  • Jquery content not working after the updates from firefox

    Hi, i've realized that some of my website's banner is not working after the recent updates from firefox, whereas those website's banner is working in google chrome.
    Hope there is a solution for this as i'm using the firefox for years and wish this issues can be settle.
    The banner URL is http://www.irs.com.my/slider/index.html

    SlideDeck has a post on how to resolve this error, caused by a bug in this very old version of their library that you're using. See: [http://www.slidedeck.com/blog/firefox-20-update-and-slidedeck-js-weve-got-you-covered/ Firefox 20 update and SlideDeck.js – we’ve got you covered] for more information. As a Pro customer, you were supposed to get an email notice, but... here you are.
    I studied the script before discovering that and found two issues, but there might be more:
    (1) slidedeck.jquery.js detects Firefox 20 as Firefox 2 and halts. Note that this regex is the problem:
    firefox2:F.match(/firefox\/2/)?true:false
    (2) Starting in Firefox 16, the -moz-transform property was unprefixed, that is, you need to use transform for Firefox 16 and later.

  • Scniwall 2400 GVC (vpn) is not working after FIPS Enable

    Hi ,Yesterday i have enabled FIPS Mode on my Sonicwall 2400 after that globle vpn is not working i i am getting following error which connecting:2015/07/10 16:17:52:918 Information x.x.x.x Phase 1 has completed.2015/07/10 16:17:52:918 Error x.x.x.x Failed to validate incoming ISAKMP payload after decryption.2015/07/10 16:17:52:918 Information An incoming ISAKMP packet from x.x.x.x was ignored.2015/07/10 16:17:52:933 Warning x.x.x.x Received an unencrypted packet but encryption keys have already been established.2015/07/10 16:17:52:933 Error x.x.x.x Failed to decrypt buffer.2015/07/10 16:17:52:933 Information An incoming ISAKMP packet from x.x.x.x was ignored.
    I have change the VPN policy as well according to FIPS requirement but still same issue.
    Can any one help me to find out the issue.
    Regards,Zohaib
    This topic first appeared in the Spiceworks Community

    Hi ,Yesterday i have enabled FIPS Mode on my Sonicwall 2400 after that globle vpn is not working i i am getting following error which connecting:2015/07/10 16:17:52:918 Information x.x.x.x Phase 1 has completed.2015/07/10 16:17:52:918 Error x.x.x.x Failed to validate incoming ISAKMP payload after decryption.2015/07/10 16:17:52:918 Information An incoming ISAKMP packet from x.x.x.x was ignored.2015/07/10 16:17:52:933 Warning x.x.x.x Received an unencrypted packet but encryption keys have already been established.2015/07/10 16:17:52:933 Error x.x.x.x Failed to decrypt buffer.2015/07/10 16:17:52:933 Information An incoming ISAKMP packet from x.x.x.x was ignored.
    I have change the VPN policy as well according to FIPS requirement but still same issue.
    Can any one help me to find out the issue.
    Regards,Zohaib
    This topic first appeared in the Spiceworks Community

  • JQuery script not working after DW update

    After updating to the latest DreamWeaver Version 12 build 5861 a jQuery script for collapsible panels no longer works.
    I had used the script many times in the past few years on various sites and when I open the html and php pages I created in the past the script still runs in Live View and as a web page.
    As I mentioned above since I updated to build 5861 the script no longer works for any new pages I create. I used FireFox view source to confirm the links to the jQuery engine and the actual script are correct. I have placed the engine script link above the actual script, as well as deleted additional links to other engines used by other plug-ins.
    Any thoughts would be appreciated.

    I discovered the cause but not the solution.
    After the update and the creation of a new site the first element I created involved a jQuery script and when I went to check it's functionality it failed. I have been mostly obsessing on getting various scripts to work. As I mentioned if I placed the code in the head all was fine, if I linked to a script file it failed and according to FireFox view source the html was linked to the file.
    Well a few minutes ago I bypassed the script issue and placed an image in a document and saw that Dreamweaver wrote the code as a absolute path to the image rather than a relative path.
    Before the update DW accepted a relative path for the scripts such as:
        <script type="text/javascript" src="scripts/diQuery-collapsiblePanel.js"></script>
    After the update I can get the scripts to work if I enter absolute paths:
        <script src="http://localhost/panel/scripts/diQuery-collapsiblePanel.js"></script>
    The funny thing is that the CSS files work fine with relative paths.
    I thought perhaps I set the site up incorrectly and had the links referencing the Site Root instead of the document but thats not the case. It is set to Document and should be creating Relative paths to images.
    I can not see any other Preference settings involving the way paths are written. I would really like to get back to Relative paths for all elements.
    Any thoughts?

  • Iphoto is not working after upgrade to the OSX Mavericks version

    seems like i have the 9.2.3 version for Iphoto and it's not working on OSX Mavericks. i've checked the app store, and it didn't show that i should update my iphoto as well. does that mean i have to purchase the new iphoto?

    update it to the latest version available (from outside the appstore) then be sure to open it and activate it after that it will be available on the Mac app store as "update"

  • My front camera will not work after I downloaded the IOS 7.0.4 .. Why is that ?

    My front camera will not work on my iPod 5 after I downloaded the IOS 7.0.4! Why is that ??

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                                
    iOS: How to back up                                                                                     
    - Restore to factory settings/new iOS device.             
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar                                      

  • Trackpoint does not work after switching from the tablet to laptop mode.

    I use my tablet to run a smartboard. Sometimes when I switch to the tablet mode and back by reversing the display, the trackpoint and mouse keys stop working. The touchpad below it still works. I am running windows 7. I have gone into the control panel, under mouse, and both the trackpoint and touchpad are still both checked. ?? When I restart the functions return.

    Hi Remaxjoe,
    Welcome to Lenovo Community Forums!
    I’m really sorry to hear that trackpoint is not working properly in your Lenovo system.
    I would suggest you to download the Ultranav drivers for your system and install it.
    Below is the link to enter downloads page and install the Ultranav driver.
    •             Support Drivers & Software downloads
    Please click on "QUICK PATH”, enter your system model and select the exact model depending on the MTM number of your device.
    Spoiler (Highlight to read)
    You can refer here for further information.
    Hope this helps!
    Best regards,
    Mithun.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • HT201328 Unlocking my iPhone 4s did not work after I did the Restore in my device. Need Help

    I received an email confirmation from my carrier that my request to have my iPhone 4s to be unlocked has been sent to Apple and completed, and I followed the instruction given to me for Restoring my device but  still not able to use other SIM card. I was advice that I will be able to get the unlock info from Apple when I do the Restore, I'm still getting the error message "SIM card is invalid...." when I replaced the SIM card that came from my carrier with another. Please help. I need to know what am I missing. Appreciate any help.

    Yes, I believe the steps did Restore my device as new. I followed the steps given to me in How to Restore software in my device..still I believe the Unlocking did not work because I'm not able to use other SIM card

  • Capture streaming does not work after upgrade of the source database.

    Hello,
    We have a complex system with 2 X RAC databases 10.2.0.4 (source) and 2 X single databases (target) 11.2.0.2
    Streaming is running only from source to target.
    After upgrading RAC databases to 11.2.0.2 , streaming is working only from one RAC to one single database.
    First RAC streaming is flowing to first single database only, and second RAC to second single only.
    First source-target is streaming fine, second capture are aborted just after starting with following errors:
    Streams CAPTURE CP05 for STREAMS started with pid=159, OS id=21174
    Wed Mar 28 10:41:55 2012
    Propagation Sender/Receiver (CCA) for Streams Capture and Apply STREAMS with pid=189, OS id=21176 started.
    Wed Mar 28 10:43:05 2012
    Streams APPLY AP05 for STREAMS started with pid=134, OS id=21696
    Wed Mar 28 10:43:06 2012
    Streams Apply Reader for STREAMS started AS0G with pid=191 OS id=21709
    Wed Mar 28 10:43:06 2012
    Streams Apply Server for STREAMS started AS04 with pid=192 OS id=21711
    Wed Mar 28 10:43:30 2012
    Streams CAPTURE CP05 for STREAMS with pid=159, OS id=21174 is in combined capture and apply mode.
    Capture STREAMS is handling 1 applies.
    Streams downstream capture STREAMS uses downstream_real_time_mine: TRUE
    Starting persistent Logminer Session with sid = 621 for Streams Capture STREAMS
    LOGMINER: Parameters summary for session# = 621
    LOGMINER: Number of processes = 3, Transaction Chunk Size = 1
    LOGMINER: Memory Size = 10M, Checkpoint interval = 1000M
    LOGMINER: SpillScn 0, ResetLogScn 7287662065313
    LOGMINER: summary for session# = 621
    LOGMINER: StartScn: 12620843936763 (0x0b7a.84eb6bfb)
    LOGMINER: EndScn: 0
    LOGMINER: HighConsumedScn: 12620843936763 (0x0b7a.84eb6bfb)
    LOGMINER: session_flag 0x1
    LOGMINER: LowCkptScn: 12620843920280 (0x0b7a.84eb2b98)
    LOGMINER: HighCkptScn: 12620843920281 (0x0b7a.84eb2b99)
    LOGMINER: SkipScn: 12620843920280 (0x0b7a.84eb2b98)
    Wed Mar 28 10:44:53 2012
    LOGMINER: session#=621 (STREAMS), reader MS00 pid=198 OS id=22578 sid=1148 started
    Wed Mar 28 10:44:53 2012
    LOGMINER: session#=621 (STREAMS), builder MS01 pid=199 OS id=22580 sid=1338 started
    Wed Mar 28 10:44:53 2012
    LOGMINER: session#=621 (STREAMS), preparer MS02 pid=200 OS id=22582 sid=1519 started
    LOGMINER: Begin mining logfile for session 621 thread 1 sequence 196589, /opt/app/oracle/admin/singledb/stdbyarch/singledb_1_196589_569775692.arc
    Errors in file /opt/app/oracle/diag/rdbms/singledb/singledb/trace/singledb_ms00_22578.trc (incident=113693):
    ORA-00600: internal error code, arguments: [krvxruts004], [11.2.0.0.0], [10.2.0.4.0], [], [], [], [], [], [], [], [], []
    Incident details in: /opt/app/oracle/diag/rdbms/singledb/singledb/incident/incdir_113693/singledb_ms00_22578_i113693.trc
    Use ADRCI or Support Workbench to package the incident.
    See Note 411.1 at My Oracle Support for error and packaging details.
    krvxerpt: Errors detected in process 198, role reader.
    We have 5 streaming processes running.
    When we rebuilded one of them, everything works fine, but other are too big for rebuilding.
    Has anybody met with such a behaviour ?
    Oracle development is already working on it but we need faster solution.
    Thanks
    Jurrai

    wwn wrote:I got this after a former kernel update and I can give you only a typical windows advice: reinstall all the Bumblebeestuff after uninstallation and after a reboot. Sounds strange but worked for me.
    What exactly did you reinstall? I am experiencing the same problem.

  • CS6 now not supported after i updated the applications.

    CS6 is now not working after i updated the applications. They were working minutes before i decided to update.  i keep getting this pop up when im trying to open one of the applications
    is there anyone that could help me resolve this problem?

    Run the Creative Cloud Cleaner Tool, reinstall from scratch.
    Mylenium

  • IChat video is not working after installed the 10.6.4 update

    Hi. I'd like to know, how to solve the problem for my iChat video that has stopped working after I installed the latest update. I dunno what's the problem but it shows that, when I clicked on the preferences for iChat on the Audio/Video, I got "This computer does not support video chats". But that thing is, my iSight camera's working just fine, even the indicator's also lighted up. Is there any solution to this?
    I would really appreciate it.
    Thanks.
    Regards,
    Daniel.

    Hi,
    The camera can only be used by one App at a time (unless you have certain Add-ons).
    However if it works in other applications and not iChat I would check that the Video Menu > Camera Enabled is ticked.
    This, if unticked, is the camera Off.
    IF you have just done the 10.6.4 update I would Repair Permissions as well.
    Try rebooting the computer.
    9:06 PM Wednesday; July 7, 2010
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

Maybe you are looking for

  • Combining Purchasing and AP data

    Trying to combine a bit of AP data with some Purchasing info.  The data mix would be about 75-80% Purchasing data to 20-25% AP data.  Multiproviders don't work unless the format is the same, and infosets are problematic.  We've got a cube built for e

  • Mini freezing during syncing

    Recently my iPod mini randomly deleted all music/playlists etc. on it. When I connected it to my mac, iTunes told me it had a bug, and that it would automatically download software to fix the bug. I clicked ok, and after the bug had been 'fixed' star

  • Understanding the User Menu in XI

    hi, I am pretty new to XI (as you can probably tell by few queries i have posted). When you log in to your XI SAP system, the system essentially displays a "User Menu", which includes many folder with different options for monitoring, sld, runtime se

  • PARAMETER ID's for Purchase Order Release

    Hi , Can you give the SETPA/GETPA PARAMETER ID's for Purchase order release. Regards, Chow.

  • Change Book Cover layout

    Hi everyone, Is there anyway to change the amount of images required on a cover. I am trying to use the stock colour black book and only want one image on the front cover but seem to be stuck with three. For instance if i only place one image onto th