.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Javascript fails in chrome and firefox, works fine in IE

Posted By:      Posted Date: August 27, 2010    Points: 0   Category :SharePoint


I am customizing Newform.aspx i.e. hiding some fields, making other readonly etc. It works fine in IE but fails miserably in chrome and firefox i.e. readonly are no more readonly, hidden are no more hidden. Here is my code:

<script language="javascript" type="text/javascript">
    function autoFillFields()
       var ctrl = findacontrol("Reference Customer");
    var param = getURLParam('RefFromCust');   
    var properParam = replaceCharacters(param);
    ctrl.value = properParam;
    var ctrl = findacontrol("RefReqOpptyId");
    var param = getURLParam('OpptyId');   
    var properParam = replaceCharacters(param);
    ctrl.value = properParam;

    param = getURLParam('RefFromAE');
    properParam = replaceCharacters(param);
    setPeoplePicker("People Picker", properParam);
    hideFldCtrl("Approval Sta

View Complete Post

More Related Resource Links

Javascript Error in Internet Explorer but works fine in Firefox

Hi All,i was working on one of the project as it is working fine in Firefox but it is giving the javascript exception in internet explorer.Errror:  Error says  "s" is undefined in the s.currencyCode="USD" line but "s" is defined in the external javascript file  s_code.jsCan anyone suggest the solution for this issue:Please find my code where the error is displayed <script type="text/javascript" language="JavaScript" >var s_account="mnsdev"</script><script type="text/javascript" language="JavaScript" src="http://media.world.com/ads/usen/rpt/Omniture/s_code.js"></script><script type="text/javascript" language="JavaScript" >s.currencyCode="USD"s.charSet="ISO-8859-1"s.SEMct = s.getQueryParam('s_kwcid');s.SEMct = s.getValOnce(s.SEMct,'SEM_ct',0);s.clickPast(s.SEMct,'event9','event10');s.SEMvar=s.getQueryParam('s_kwcid');s.SEMdate=new Date;s.SEMdate.setTime(s.SEMdate.getTime()+60*86400000)if(s.SEMvar){s.c_w('SEM_ck','1',s.SEMdate)}s.SEMchk=s.c_r('SEM_ck');if(s.SEMchk&&s.events)s.SEMok='ok';if(s.SEMvar||s.SEMok) s.t()

Toggling of iFrames works fine in Firefox but not in IE


I have different iFrames on my page and one of the iFrame has pdf plugin that shows the PDF document and i have another iFrame that pops up on delete button click and  a function to toggle the iFrames. It works fine in Firefox but in IE my pop up iFrame is always behind the PDF. 
Any thought how can I set it right, there is some issue with the z-index of PDF, it is set to infinity something like that in IE ! 


.aspx page when browsed with chrome browser works fine but with IE8 it displays "Internet explorer c

HiI have VS 2008 installed and have  IE8 browser as well as google chrome browser.However wheneever i try to run a .aspx page in solution explorer of VS with the browse with.. options,the page runs fine with chrome browser but not with IE8.The IE browser shows the error "Ineternet explorer cannot display the page".I have set the IE as the default browser in the browse with ... option of the VS 2008.Please suggest.

Jquery scripts in user control works fine in explorer but not in Safari/Firefox



Hi everyone,

I've used some Jquery scripts for toggling image on a web user control, it work fine in explorer but got no signs of life in firefox!

Here the code for a test form in plain html (this works on every browser):

<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/toggle.js"></script>

<div id="invisible">
   <a href="images/accurate.gif" class="swap" rel="lightbox"><img src="images/polaroid_control.gif" id="showimage" /></a>
But i need to use it in a user control so i got:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="gallery_admin_search.ascx.cs" Inherits="CMS_GalleryControl" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<div id="invisible">
    <img src="images/polar

Access gridview row using javascript (row/cell index works in IE not in Firefox )


Hello All,

I have a gridview with checkboxes and textboxes. When i click on a checkbox i want the associated textbox to be enabled/disabled. I wrote the for following javascript that.

 for (var i = 1; i <= grid.rows.length - 1; i++) {
                   if (grid.rows[i].cells[0].childNodes[2].checked) {
                       grid.rows[i].cells[1].childNodes[0].disabled = false;
                   else {
                       grid.rows[i].cells[1].childNodes[0].disabled = true;

Login control is suddenly broken in IE7 but works perfectly on Firefox (It works on both browsers lo


Hey Guys,

 I'm new around and I thought this is probably the best place to help me solve my dilemma, I am developing a website for almost a year now and the login control was implemented a logn time ago, however all of a sudden it will not authenticate on Internet Explorer 7 when the application is published, it doesn't even provide a message that authentication was unseccssful or throws any error, it just refreshes the same page. however this problem doesn't occure when I try the same website on FireFox 2.0...Also when I run the page locally on Cassini it work great on both browsers...This is one of the weirdest errors I have ever faced. what could have gone wrong on the server side to cause this? knowing nothing changed on the server-side...I'll provide a snapshot of the login control below

<asp:Login ID="LoginControl" runat="server" BackColor="Trans

Has anyone experienced problems using a reorder list control in Chrome/Firefox?


I have three reorder lists on a page, one does not want to work. It is no different to the others, but is behaving like it is not enabled.

All working fine in IE 7 + 8.

Any ideas appreciated :)

this my query works fine, i need to eliminate when resultset zero

hithis is the query working fineSELECT a.Selection,a.SizeRange,a.Thickness,       ISNULL(a.Assotment,0) - ISNULL(b.Issue,0)  AS difference1      FROM ( SELECT Selection,SizeRange,Thickness,                SUM(Pcs) AS Assotment            FROM  dbo.WBCAssortDescp where LotNo='LWC2'          group by Selection,SizeRange,Thickness) AS a LEFT OUTER   JOIN (SELECT Selections,SizeRange,Thickness,                SUM(Pieces) AS Issue            FROM dbo.WBIssue Where LotNo='LWC2'           group by Selections,SizeRange,Thickness) AS b on b.Selections=a.Selection and b.SizeRange=a.SizeRange and a.Thickness=b.ThicknessSELECT a.Se,a.Si.Th,      ISNULL(a.ent,0) - ISNULL(b.Ise,0)  AS difference1   FROM ( SELECT Se,Si,Th,               SUM(Pcs) AS ent           FROM  dbo.Table1where No='C2'         group by Se,Si,Th) AS aLEFT OUTER  JOIN (SELECT Ses,Si,Th,               SUM(Pieces) AS Ise         &nbs

TopNavFlyOuts won't display in IE but will display in FireFox, Chrome etc

My company decided it would like to add 1 level flyouts to the website which seems easy enough but I have an issue I just can't figure out. I changed the master to display 1 level and added CSS to format the flyouts. In Internet Explorer, the flyouts are a big blank white box and no text that can be clicked, no colors, nothing, but the width of the flyouts is just as expected and it's placed on the page as expected. So it picked up a couple of properties in the CSS but nothing else. In FireFox, Chrome and Safari, the flyouts are showing up just fine. This is just wacky to me. Has anyone run across? Any ideas? Thanks in advance.

SharePoint 2010 AD FS 2.0 Integration - login works then fails, looping back to the adfs server

Hello, I setup SharePoint 2010 Claims auth with AD FS 2.0 following this post: http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-end-to-end.aspx.  I have no access to the ADFS server, but I think they followed the steps as outlined.  If I do an iisreset (or just recycle the app pool of the SharePoint site) I can login successfully using the remote credentials.  Also I can under security in SharePoint search for and find users and roles from the remote ADFS server. If I close my browser, open a new browser and go to the site I am prompted to login again (this is fine).  I do, using the same credentials, and the login fails because I am redirected between the SP and ADFS servers until the ADFS server stops the redirecting.  I have been doing some digging and I found this post: http://blogs.technet.com/b/speschka/archive/2010/08/09/setting-the-login-token-expiration-correctly-for-sharepoint-2010-saml-claims-users.aspx, which describes the situation I have in point # 3 at the bottom.  I have tried setting the token time out as low as 1 second but this hasn't helped. I have also, just to see, tried setting all the other lifetime settings to 1 second - but no luck.  Because the initial login works I think the setup is correct, but something is maintaining some state that is causing the loop

MDX works fine in SSMS but not in query designer

Hi all,   I am trying to include this query in my query designer in SSRS. The query below is as follows:WITH MEMBER [Time].[Fiscal Month].[All].[ Subtotal] AS ' AGGREGATE( EXISTING { [Time].[Fiscal Month].[All].CHILDREN }) ', SOLVE_ORDER = 1000  SELECT NON EMPTY { { { { [Time].[Fiscal Month].[All].CHILDREN }, { [Time].[Fiscal Month].[All].[ Subtotal] } } * { { [Measures].[SKU Distinct Count] } } } } ON COLUMNS , NON EMPTY { [Sales Force].[Retailer Code].[All].CHILDREN } ON ROWS  FROM [Sales]CELL PROPERTIES VALUE, FORMATTED_VALUE, CELL_ORDINAL The error i am getting isThe query cannot be prepared: The query must have at least one axis. The first axis of the query should not have multiple hierarchies, nor should it reference any dimension other than the Measures dimension..Please let me know where am i going wrong.Thanks and regards,ram

Changing Firefox values in about:config via Javascript

Hi WebGurus, I am currently facing a problem with Mozilla firefox JavaScript window.close() not working / does not work in firefox Is there any way of changing the values in about:config (specifically dom.allow_scripts_to_close_windows ) using Javascript, or via any other method when a page loads? Basically, I need a way of telling Firefox to close the window. If there is a better way of doing this please give me some guidelines regarding it. Thanks In Advance,Santosh

Backup through Central Admin fails; works using stsadm

Hi, I'm trying to schedule automatic backups of my SharePoint 2007 site.  I wrote a .vbs script that does the backup with the following line:   objShell.Run "cmd /c stsadm.exe -o backup -directory """ & BACKUP_DIR & SITE_DIR & """ -backupmethod full -item ""Farm\Windows SharePoint Services Web Application\SharePoint - SharePointSites"" > """ & CURR_DIR & "log.txt""", 0, True   I ran the vbs script from the command line and everything worked fine.  I used the Windows Task schedule to run the script as a scheduled task.  The script ran fine and the backup completed successfully (according to the logs), but now if I go to the Central Admin page and try to do a restore, I get the error:   The backup/restore job failed. In order to rerun the backup/restore the timer job must be deleted from the Timer Job Definitions page. Failure Message: Backup or restore is already running.   The odd thing is I can do another backup or restore using stsadm at the command line and it works fine.  I can also run the scheduled task to do another backup and that works fine too.  I just can't do any backups or restores from Cetnral Admin anymore.   Any suugestions or ideas? Thanks. -Cynthia

Custom masterpage Layout works fine, but WIDE sharepoint lists flow through, over design

Hello all, and thanks in advance for any help. We've built a custom masterpage layout and so far it works great.  We have specified a layout based on tables that fix the width at 960pixels.  The tables are centered on the screen and have a particular background that is different from the page's background to make the content pop.  It works fine in most cases and still displays all MOSSs dynamic contents like the quicklaunch bar at left, etc.  The theme sort of looks like this : http://www.sharepointpackages.com/index.php?main_page=product_info&cPath=65&products_id=268&zenid=a045f5b7dba91fdab94d754569e0b611 The problem is that when a list has too many columns and is therefore wider than the 700 or so pixels that are left over for the placeholders inside the table, the list continues on, but does not affect the table itself.  In other words it appears as if the content was placed OVER the tables in the layout.  This is odd first of all, but it is actually bad in a way, because even if I use styles on the table cells that hold these placeholders, and have the overflow use scrolls, the table ACTUALLY does not see an overflow and the contents continue to run through without activating the scrollbars (they don't even show up).  Can anyone help.  Please, Please, I've been looking at HTML for two days straight now trying to fi

uploading a file with wcf works fine with local drive, but only 4096 kb uploaded when I use unc stor

Hello I'm writing a wcf service for uploading files to a server. It works fine when I try to upload the file to the servers local c:/ drive, but if I use a UNC path only 4096 kb is stored. It actually looks like part of the file is lost while storing it with writeStream.Write(buffer, 0, bytesRead);, because I wrote the bytesread to an sql table and the number of elements are always the same no matter how many times I upload the file, but the stored file is always different sizes, ranging from 1996 kb to 4092 kb.   I'm using IIS 7.5 on a windows 7 enterprise machine. My IIS is using a administrator account for the application pool, so it should not be a problem with permissions.   My wcf method uses Stream to upload the file in chunks    public void UploadFile(RemoteFileInfo request)         { //some methods to set the filepath                                   int chunkSize = 4096;                                 byte[] buffer = new byte[chunkSize];                                 Stream writeStream = new FileStream(filePath, FileMode.CreateNew, FileAccess.Write);  &

RSS feed - Web request fails in 4.0 whereas it works in 3.5

I am trying to get RSS feed from Microsoft blogs thro' web proxy. The Web request fails in .net 4.0 whereas all work fine in .net 3.5... Anything extra to be done in 4.0 while sending the credentials to proxy? Please help me. Code: namespace     testrssfeeder {     /// <summary>     /// Interaction logic for MainWindow.xaml     /// </summary>     public partial class MainWindow : Window {     public MainWindow() { InitializeComponent();     AuthenticationManager.CredentialPolicy = new Proxycredentials (); }     private void Window_Loaded(object sender, RoutedEventArgs e) {     XmlTextReader rssReader;     XmlDocument rssDoc;     Uri httpSite = new Uri("http://www.microsoft.com/communities/rss.aspx?&Title=Blogcasts&CMTYSvcSource=MSCOMBlogPosts&CMTYRawShape=list&Params=%7eCMTYDataSvcParams%5e%7eArg+Name%3d'DateFormat'+Value%3d'MMM+d%2c+yyyy'%2f%5e%7eArg+Name%3d'CategoryGuid'+Value%3d'b286f1d2-c540-405f-abb8-c386d4815f32'%2f%5e%7e%2fCMTYDataSvcParams%5e&NumberOfItems=50");     // Create the request object.     WebRequest wreq = WebRequest.Create(httpSite); wreq.Credentials =   CredentialCa

hide gridview column using javascript. working in ie and firefox but In firefox, gridview data is sh


function EnableDisableGridViewColumn() {
               var AdvanceSearch = document.getElementById('<%= chkboxlist1.ClientID %>');
               var chkList = AdvanceSearch.getElementsByTagName("input");
               var dgTest = document.getElementById("gridview1")
               if (dgTest != null)
                   for (var i = 1; i < dgTest.rows.length; i++) {

                       if (chkList[0].checked == true && chkList[1].checked == true) {
                           dgTest.rows[0].cells[0].style.display = "block";

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend