Skip to main content

document.createElement not working on Firefox

document.createElement not working on Firefox




Javascript method document.createElement() worked perfectly in all browsers other than FireFox. I changed this part


   1: var newElement = document.createElement("<input name='"+elementName+"' id='" + elementName + "' type='hidden'>");


to this:




   1: var newElement = document.createElement("input");



   2:  newElement.setAttribute('name',elementName);



   3:  newElement.setAttribute('id',elementName);



   4:  newElement.setAttribute('type','hidden');


and now its working with all browsers


Firefox For Dummies Firefox Secrets: A Need-To-Know Guide Foxfire [VHS] JavaScript, A Beginner's Guide, Third Edition (Beginner's Guide (Osborne Mcgraw Hill))

Comments

Popular posts from this blog

Call User-defined Function on Linked Server :SQL Server

If you try to invoke a user-defined function (UDF) through a linked server in SQL Server by using a "four-part naming" convention (server.database.dbo.Function), you may receive error message.  The reason is User-defined function calls inside a four-part linked server query are not supported in SQL Server. Thats why error message indicates that the syntax of a Transact-SQL statement is incorrect.  To work around this problem, use the Openquery function instead of the four-part naming convention. For example, instead of the following query Select * from Linked_Server.database.dbo.Function(10) run a query with the Openquery function: Select * from Openquery(Linked_Server,'select database.dbo.Function(10)') If the user-defined function takes variable or scalar parameters, you can use the sp_executesql stored procedure to avoid this behavior.  For example: exec Linked_Server.database.dbo.sp_executesql N'SELECT database.dbo.Function(@input)',N'@input...

Microsoft SQL Server 2005 Service Pack 3 for Windows 7 (64 bit)

You can download from here Microsoft SQL Server 2005 Service Pack 3 Overview Service Pack 3 for Microsoft SQL Server 2005 is now available. SQL Server 2005 service packs are cumulative, and this service pack upgrades all service levels of SQL Server 2005 to SP3. You can use these packages to upgrade any of the following SQL Server 2005 editions: Enterprise Enterprise Evaluation Developer Standard Workgroup Download Size: 326.0 MB http://www.microsoft.com/downloads/details.aspx?FamilyID=ae7387c3-348c-4faa-8ae5-949fdfbe59c4&displaylang=en Microsoft SQL Server Management Studio Express Service Pack 3 Overview Microsoft SQL Server Management Studio Express (SSMSE) is a free, easy-to-use graphical management tool for managing SQL Server 2005 Express Edition and SQL Server 2005 Express Edition with Advanced Services. SSMSE can also manage instances of the SQL Server Database Engine created by any edition of SQL Server 2005. Note: SSMSE cannot manage SQL Server Analysis ...

Import Data from Excel sheet in SQL Server

https://www.microsoft.com/en-us/download/details.aspx?id=54920 SELECT * FROM OPENROWSET( 'Microsoft.ACE.OLEDB.12.0', 'Excel 8.0;HDR=NO;Database=D:\temp\Test.xlsx', 'select * from [sheet1$]') Before doing that, make sure you are a local admin in SQL Server and execute the following EXEC sp_configure 'show advanced options', 1 RECONFIGURE GO EXEC sp_configure 'ad hoc distributed queries', 1 RECONFIGURE GO Sometimes you may receive Microsoft OLEDB error, GO EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1 GO EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1 GO EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DisallowAdHocAccess', 0 GO To Get list of all sheets in a workbook, use the following declare @FileName varchar(max) = 'test-file' declare @...