473,385 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to retrieve data with quotes from database without any quotes in it in JavaScript

Expand|Select|Wrap|Line Numbers
  1. var str = document.forms[0].elements['requestBean.text'].value;  
  2.                   // alert("Str length"+str.length);
  3.                   var str1 =str.replace(/['"]/g,'');;
  4.                   // alert("Str1 length "+str1.length);
  5.                   document.forms[0].elements['requestBean.text'].value =  str1;
  6.                   // alert("b4 submit "+document.forms[0].elements['requestBean.text'].value);
  7.  
  8.                document.forms[0].elements['requestBean.actionStatus'].value ="insertWhiteBoard";
  9.                document.forms[0].action="
  10.                  // alert(document.forms[0].action);
  11.                document.forms[0].submit();
  12.              }
Nov 30 '12 #1
2 1792
Dormilich
8,658 Expert Mod 8TB
since JavaScript does not query the DB directly, remove the quotes on the server level where the DB interaction takes place.
Nov 30 '12 #2
Anas Mosaad
185 128KB
You may use escape and unescape java script functions.
Jan 5 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: vighnesh | last post by:
Hello EveryOne In my project I have to parse a string in Quotes as without Quotes.I tried the following code but it didn't work to me. I again getting the string with Quotes, Can Anybody suggest...
1
by: kishored | last post by:
Hi Everybody This is Kishore. I am new to .net. I need your help regarding Vb.net coding: I have designed MS Access database, I place some textboxes and a button on the form, When the user enters...
1
by: ariel gons | last post by:
This is one of my project and also my thesis in school. How can I get data on database MYSQL using javascript function? Is there anybody here can help me with this problem.. Can anyone give...
11
by: AishaKhalfan | last post by:
Hi all, I have to populate combo box that retrieve data from database in windows based application. I have two tables which are type and CD. Type has type ID and Category. CD has type ID as...
1
by: jyothi1105 | last post by:
Hi Guys, I need your help on retrieving data from DB. Iam working on WebAppl with VB.net and SQL 2000. I want to fill my form(textboxes) with details from the database table when the user...
1
by: Amita Singh | last post by:
Hi, How to retrieve data from database in data table?
10
by: Ghanathe | last post by:
Hiii, can any one tell how to retrieve information of particular person from database and display it in text boxes, i mean if i enter name of employee name it should display all information about...
2
by: John | last post by:
I am having trouble getting this code to work, and was wondering if someone could tell me what I am doing wrong. -------------------------------------- CODE--------------------------------------...
12
lifeisgreat20009
by: lifeisgreat20009 | last post by:
I am a newbie to Struts and JSP...I have been working on the code below for 5 hours now..I googled a lot but couldn't get much help so finally I am here.. Hoping of getting my problem solved. Please...
9
by: StarLavender | last post by:
Hi. I have a calculate.js javascript file where all the function that execute the calculation is consist in this file. Now, I want to retrieve a data from the database for calculation and be done in...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.