Search and Replace values in the text field before values are stored to DB

Hi,
In my application there is a question - text area and answer - text field. Problem is, some answers are stored with the single quotes to the DB and I have a problem while retrieving it from the DB. I need to replace the 1 single quotes with 2 single quotes. The values are stored to the DB when the submit button is clicked.
So I am using the following javascript code:
italics
<script type="text/javascript">
function test()
var str="&P2_S1.";
document.write(escape(str));
</script>
italics
I need to call this javascript function, when the submit button is clicked but BEFORE the values are stored to the DB. How can i get this done?
Please let me know.

Hi,
Thanks for the reply.
Yeah I planned to drop the Javascript idea.
Now, I am using the PL/SQL code. This is what I am planning to do.
When the user enters any word like this, Test's, this single quote should be replaced by some special character, #@@#, - what is the PL/SQL code for this?
Right now my PL/SQL code is:
begin
update test set S1=:P2_S1 where name=:APP_USER;
end;
so the replacing part should come somewhere before the update statement.... how can I do it?
from the DB when the values are retrieved, I use the following code:
select REPLACE(s1,'''','') from test where NAME=:APP_USER; // this works fine.
Please help me with the replace of the single quote before the update process...

Similar Messages

  • I can't enter any value in the Text field, after loading flash files

    Hi to all,
    In my Java application, I'm using a text field and a panel to load flash files. I'm using JDIC 0.9.1 to load the flash files in the panel. The flash files are created by Flash CS4.
    While running the application, I can't enter any value in the Text field, after minimize and maximize the application I can enter the values.
    This problem happens after change the jre version from 1.6 to 1.7.
    I'm getting the following exception while running the application.
    org.jdesktop.jdic.init.JdicInitException: java.io.IOException: The filename, directory name, or volume label syntax is incorrect
    at org.jdesktop.jdic.init.JdicManager.initBrowserNati ve(Unknown Source)
    at org.jdesktop.jdic.browser.WebBrowser.<clinit>(Unkn own Source)
    pls give me a solution.
    Thanks in advance...:)

    I can't enter any values in JTextField after loading the flash files., locking.

  • Search and Replace String throwing the wrong error message with regexp?

    This came up in a LAVA thread, and I'm not sure if there's a bug here or not. When using Search and Replace string, and using a regular expression of [(G[b|i])], LabVIEW throws error -4622, "There is an unmatched parenthesis in a regular expression."  There are obviously no unmatched parenthesis in that expression, so it seems to me that the wrong error is being thrown. I'm just not sure if that's a syntactically valid regexp. The problem seems to be with nesting [ ]'s inside ( )'s inside [ ]'s. I've tried a couple of regexp resources on the Web, and one suggests it's valid, while the other seems to think it isn't.
    Message Edited by eaolson on 03-13-2007 10:33 AM
    Attachments:
    ATML_StandardUnit2.vi ‏10 KB
    regexp.png ‏5 KB

    adambrewster wrote:
    I think your regexp is invalid.
    In regexps, brackets are not the same as parentheses.  Parens are for grouping, while brackets are for matching one of a class of characters.  Brackets can not be nested.
    If the regexp is replaced with [G[bi]], there is no error, so it's not a matter of nested brackets. I couldn't find anything on the PCRE man page that forbids nested brackets specifically, but it makes sense.
    Your expression "[(G[bi])]", therefore parses as a character class which matches '(', 'G', '[', 'b', or 'i' followed by an unmatched paren, and an unmatched bracket.
    I don't believe that's the case. Replace the regexp with [(Gbi)], and the error goes away. So it's not a matter of the '(' being literal, and then encountering a ')' without a matching '('.
    daveTW wrote:
    what string exactly you want to replace? I think the round braces are not right in this case, since they mark partial matches which are given back by "match regular expression". But you don't want to extract parts of the string, you want to replace them (or delete, with empty <replace string>). So if you leave the outer [( ... )] then your RegEx means all strings with either "Gb" or "Gi".
    It's not my regular expression. A poster at LAVA was having problems with one of his (a truly frightening one), and this seemed to be the element that was causing the problem. I'm pretty sure that the originator of the regexp meant to use G(b|i), which seems like a complicated way of matching "Gb" or "Gi", if you ask me.

  • I created a Custom list New Form and need to make the text fields read only

    When I use SharePoint Designer and add the read only attribute  to the  SharePoint form field, then it throws  a web part error.
    but here is the thing, I have current user Filters populating the Form Fields. So the form fields  populate First name , last name etc. and I need these fields read-only....
    the Client doesn t want the end user to Change those fields.  Is there any way to "LOCK" the form fields?
    As I have only 7 text fields that need to be locked down. and one field is a signature line that is a true input field.. where the  user has to inter their initials.
    Any ideas? as I have tried most of the items available thru searches nothing works, or it throws that web part error message.
    Steve Athey

    Daniel: ( I'm now at work, a different ID is logged on for me)
    I used SharePoint Designer.
    Steps:
     created a web part page
    then on the SharePoint Designer ribbon I then went to insert:
    new item form
    Then I selected my data source (list)
    then I placed the 8 columns on the page
    a page viewer web part to pull the manual that people have to read.
    and 7 current user filter webparts. (1 for each form field) Yes it is over kill, but I'm trying to keep this straight out of box as much as possible...
    then for the form fields
    I added a parameter and the read only tag see below in bold:
    <asp:TextBox runat="server" text="{$ParamEmployID}" id="ff17{$Pos}" __designer:bind="{ddwrt:DataBind('i',concat('ff17',$Pos),'Text','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Employee_x0020_ID')}" 
    ReadOnly="True" />
    I also  added the parameters in the ribbon area
    the error message doesn't tell me much, it just send me to web part maintenance page... 
    if I removed the  ReadOnly = True then the error  goes away.....   So I was trying to find a  quick simple  JQuery and or javascript   code item that would  make  the 7 text fields readonly and leave the
    8th  text field alone  to allow people to place their initials on the page to say that they read the manual.
    I have  created hundreds of these types of pages .. this is the first time I have run into this issue, but it also the first time I have tried to use the ReadOnly = True item.
    Any Ideas  and or thought on how to make the  items read only? and not throw the error.
    Steve

  • Search and Replace vi adds new text behind initial input when search critera is a empty string.

    Can anyone tell me what I am doing wrong?
    Want output to show N/A when nothing is entered in input string and to show the input string if something exists...
    The output of the attached VI is expected it to be Larron, but instead is outputting LarronN/A.
    Is there a way to make this VI do this without having to make a VI with an and/or component added to it?
    Attachments:
    SNR EX.vi ‏7 KB

    Right-Click the S&R function and select 'Regular Expression'
    Search for ^$, replace with 'N/A'

  • Can I set a default font and font color for the text field properties?

    I am setting up applications, some of the information I fill in prior to sending it to the client; I would like that text to always be in a specific font and color so it is clear to the client what information I filled in for them when they are reviewing the document.
    Thank you

    Not at this time, but I've asked the product team to consider adding it as a feature. Thanks for the suggestion.

  • I need to get the value of a text field that is located in another page JSP

    I need to get the value of a text field that is located in another page JSP. How do I do that?

    Well you see, I have a page at angelfire.com, which
    does not support JSP. I want to call a script located
    at mycgisever and then, when pressing a link on the
    former page, the JSP page is loaded, and the script
    get the value from the text field on the OTHER page.
    Is this possible?I know nothing about cgi. But that should not prevent me from understanding what can and cannot be done, assuming cgi is sort of comparable with jsps.
    I'm unable to understand your description clearly. Try to explain it better. Give precise steps that you intend to follow and I should be able to help you further.
    So you have a page1.
    You hit submit from page1.
    That goes to the cgiserver.
    From the cgiserver, programmatically load up the jsp.
    search this for the text field.
    Display it on your page2.
    Is that what you are trying to do?
    BTW, won't be able to help you with cgi scripting at all. Can help with Java and Jsp.

  • Search and Replace in Dreamweaver

    Dreamweaver CS3has a nice search and replace tool allowing for search and replacement of very large text strings.
    Does anyone know of a good notepad editor that can handle that large of replace text strings.
    Seems like most cant handle that much code in terms of search and replace.
    thanks

    If you're looking for something free/cheap that handles multi-line search and replace in source code, then there's always TextWranger if you're on a Mac:
    http://www.barebones.com/products/TextWrangler/
    There are plenty of Windows equivalents, but none I've used extensively and could recommend. This one is free:
    http://www.htmlkit.com/
    ...and has a button to expand the find/replace fields for multi-line content.
    That being said, they're not really going to do anything DW can't if you're already using DW.

  • Xml search and replace for 'Session Variables' in column title view

    Hi Experts,
    I have around 10 reports where measure column titles are displayed based the session variable.
    Below is the syntax I have used in the column title
    @{biServer.variables['NQ_SESSION.VariableName']}
    Now I would like to replace the above syntax with some static text. To do this, I am trying to use the xml search and replace feature in the catalog manager.
    For some reason, catalog manager is unable to find the syntax in the xml file. I have tried using escape character also for the apostrophe by using &apos, but no luck.
    Any pointers on how to replace the text?
    Thanks

    Using Analysis get the xml conversion for @{biServer.variables['NQ_SESSION.VariableName']} from Advanced tab's xml code
    use this code to find in catalog manager, if you able to find then go for search and replace option.
    I think this should work for you.

  • How do I 'commit' a value in a text field with GUI scripting?

    I have a script to change the dates of a "Roll" in iPhoto. I can insert the text into the proper field, but it doesn't 'stick'. When I click on another item, the text field returns to the old date. If I click on the text field before I run the script, then a Tab or Return from the keyboard will set the field properly.
    Do I need to programatically set the 'focus' on the field first? Without setting the focus first, a "keystroke return" is caught by the top window and either beeps or opens a photo for edit (as one might expect).
    tell text field 2
    set value to rDate -rDate is a string "4/30/06"
    keystroke return
    end tell

    Thanks for the reply. Backstory: My iPhoto library got corrupted, so I created a new one and dragged in the old Library. The Rolls all have the date the new rolls (directories) were created; all the same in this case. Sorting the rolls by date is thus nonsensical. The AppleScript for iPhoto doesn't handle what I want to accomplish, but the UI scripting might help me out.
    When the whole Library is picked, you can 'view' by "Film Rolls" and the date appears in the bar above each roll of photos. You can change the date in the "Information" area available at the lower left. (The same area you change the title of the rolls or photos, too.) I want to change the roll dates to match the photos' dates.
    So I fired up UI scripting and figured out that I can fetch the date range of the photos in a roll and then set a date for the roll. I can see the date change in the text field, but it doesn't 'stick'. Only if the field has been clicked on prior to running the script, can I "keystroke return" to 'enter' the field. Otherwise I'm looking for suggestions.
    Slightly off topic: The whole right side of the iPhoto screen is a big black hole for UI events. You can't tell anything about it with the UI Element Inspector. I can't automagically 'pick' anything in there, so I can't 'select' the rolls from a script. I'll settle for clicking on a roll and then running a script to correct its date.
    Here's the whole script, without a bit that verifies that the 'assistive devices' box has been checked in the Universal Access pref.
    tell application "iPhoto"
    activate
    end tell
    tell application "System Events"
    tell process "iPhoto"
    activate
    tell window "iPhoto - rebuilt Library"
    tell group 1
    tell splitter group 1
    tell splitter group 1
    tell static text 5 --either 'from' or 'date'
    set theLabel to value
    end tell
    if theLabel is "date" then
    tell static text 6
    set rDate to value
    end tell
    else --get date from 'to' field
    tell static text 8
    set rDate to value
    end tell
    end if
    tell text field 2 --roll's date
    set value to rDate
    keystroke return --might not work
    end tell
    end tell
    end tell
    end tell
    end tell
    end tell
    end tell

  • Search and replacing a url...

    I just ran across an issue last night, my hyperlinks added a space at the end of the url. Does anyone know how to do a search and replace for the hyperlink window? I ended up editing every one of them. It probably wouldn't be so bad but that is a lot of repetition that InDesign should be doing.
    Edit: I should mention that I am using CS3 on Windows XP. I am thinking I hit a bug with the above, the spaces should not have been there.

    The document was imported from word 97. Last night I deleted the text and reimported it as I updated a few of the links. (Yeah I know about linking the document) I also added a few directly in InDesign. All hyperlinks except 2 had a space after them, those 2 were imported. Which makes me believe the problem was not with the importing(placing) but perhaps a bug in InDesign. This document use to export to pdf just fine. One thing I had noticed was the paragraph mark on all but those two were marked as a hyperlink. Even though I did a search and replace on all the paragraph marks to remove the hyperlink, the space remained in the url. So I ended up double clicking on each hyperlink in the hyperlink window and manually removing the space at the end of each url.

  • Photos moved from an external HDD to another: Search and replace paths?

    Hi everyone,
    I've been using iPhoto for a few years now and today I have iPhoto '09. I never let iPhoto copy my photos in its library when importing them, since I have most of them stored on an external hard drive. (Also, if the folders within the library would be properly dated like "2008-09-07" and not named like "7-Sep-2008" and "8-Apr-2008" making the former getting listed before the later, and if I could easily manage external volumes, I would be happy. But, I suppose that's a job for Aperture or Lightroom.)
    I have moved my photos from a small 160GB external hard drive to a new 2TB external hard drive. The problem right now is most of my photos in iPhoto can no longer be displayed. It offers me the option to locate a file every time I open a photo, which I can do, but doing the same task for each and every picture among thousands is daunting.
    To manage photos not stored within its library, iPhoto creates an alias to each picture file. I found a Bash script allowing me to perform a search and replace on all symbolic links in a specific directory. However, the problem is aliases are not the same as symbolic links.
    Is there any way for me to perform a search and replace on all the aliases within the iPhoto library in order to make them point to the new hard drive now containing the pictures?
    By the way, I'm also having a similar problem with iTunes:
    http://discussions.apple.com/thread.jspa?threadID=2190505

    This issue is the main reason why I never recommend a Referenced Library. Some folks have had success using an app called _[File Buddy|http://www.skytag.com/filebuddy]_ to reconnect the aliases. If that fails then I'm afraid then you will find yourself reconnecting them manually.
    Running a Managed Library this issue simply doesn;t arise. And of course, you can easily run a Library from an external disk and easily move Libraries between disks.
    Should you wish to consider converting from a Referenced to a Managed library, then AliasHerder is an application that will replace these aliases with the actual files, and so preserve your Library and all your work in it. As always: back up first.
    (Also, if the folders within the library would be properly dated like "2008-09-07" and not named like "7-Sep-2008" and "8-Apr-2008" making the former getting listed before the later, and if I could easily manage external volumes, I would be happy. But, I suppose that's a job for Aperture or Lightroom.)
    How iPhoto names the folders within the Library Package is irrelevant as you never access them that way.
    There are many, many ways to access your files in iPhoto:
    *For Users of 10.5 and later*
    You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    Uploaded with plasq's Skitch!
    You can access the Library from the New Message Window in Mail:
    Uploaded with plasq's Skitch!
    *For users of 10.4 and later* ...
    Many internet sites such as Flickr and SmugMug have plug-ins for accessing the iPhoto Library. If the site you want to use doesn’t then some, one or any of these will also work:
    To upload to a site that does not have an iPhoto Export Plug-in the recommended way is to Select the Pic in the iPhoto Window and go File -> Export and export the pic to the desktop, then upload from there. After the upload you can trash the pic on the desktop. It's only a copy and your original is safe in iPhoto.
    This is also true for emailing with Web-based services. However, if you're using Gmail you can use iPhoto2GMail
    If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    *If you want to access the files with iPhoto not running*:
    For users of 10.6 and later:
    You can download a free Services component from MacOSXAutomation which will give you access to the iPhoto Library from your Services Menu. Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and later:
    Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    1. *Drag and Drop*: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. *File -> Export*: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    3. *Show File*: Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.
    Regards
    TD

  • RH 11: Search and replace in files: options are grayed out

    Hello to all,
    just wanted to replace a string in my RH Project. Using the Dialog "search and replace in files", the Option "ignore HTML-Tags" is grayed out.
    Even if i create a new, empty Project: the same Problem.
    Is this Option generally not available in RH11 or what is the Trigger to gray the Option out?
    Sorry if I dont hit the English terminology used in RH, I'm using the German Version...
    Regards,
    Julian

    Hi Julian. This sounds like you have the Advanced options displayed. try going back to the Basic options by clicking the double arrow icon in the top right hand corner:

  • Invalid text value. A text field contains invalid data. Check the value and try again

    Hello,
    I am having a problem with the error mentioned in the title. I see alot of others have experienced the same problem, but I have quite a twist to it.
    I see the problem when I try to edit a list item, and then try to save the changes.
    Here what I see in the ULS log:
    System.Runtime.InteropServices.COMException: Invalid text value. A text field contains invalid data. Check the value and try again  
    at Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId,
    Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter
    pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)   
    at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean
    bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback,
    ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)
    I have 3 front end servers(fx wfe1, wfe2, wfe3).  And here is the twist.
    If I access the library directly through wfe1 and wfe2, I get the error. If I access the library via wfe3 if works just fine.
    So because of this, I think it is safe to assume that is has nothing to do with the character limit of 255. Nor does it have anything to do with the field type, since it is already set to mulitible lines of text.
    So. Any ideas?
    Regards,
    Michael
    mic

    Check if there is any change in web.config of these servers
    http://support.microsoft.com/kb/2880758
    To work around this issue, limit the length of the personal message in the invitation to 256 characters or less.
    This is a known issue. Microsoft is working to resolve this issue.
    http://social.msdn.microsoft.com/Forums/en-US/7bb16e51-e7cc-439e-a8b3-755683ccac1a/max-length-on-custom-field-types
    To solve the problem you may have to change the field's parent type to "note". To do that you have to open your fldtypes... file under Templates/xml and change the line to:
    "<Field Name="ParentType">Note</Field>" from "<Field Name="ParentType">Text</Field>"
    You might also have to add a sql type if your text needs to be longer than 255 characters
    <Field Name=”SQLType”>ntext</Field>
    and inherit from SPFieldMultiLineText instead of SPFieldText
    If this helped you resolve your issue, please mark it Answered

  • Limitations when pasting into the replace field when search and replacing?

    Hi,
    I seem to be unable to paste ALL of the code from my pasteboard when  searching and replacing, is there a way to increase the characters?
    Thank you.

    Replacing 500 lines of code is not possible with Find and Replace. The underlying functionality relies on JavaScript. Cramming 500 lines of code into a JavaScript replace command is likely to give Dreamweaver the screaming heebie-jeebies.
    What I suggest you do is to use the Find and Replace dialog box to find what you want to delete, and replace it with something immediately recognizable, such as:
                    PASTE HERE
    You can insert new lines in the Replace field by holding down the Shift key and pressing Enter/Return.
    Then locate the placeholder, and paste in your 500 lines of code.

Maybe you are looking for

  • LiveCycle Designer ES Not Working-Acrobat 9

    I am using an older version of LiveCycle and Acrobat to create forms.. ES8.2; however, it has stopped working.  When I go to create or edit a form, it will not launch the form and states there is problem. (see below).  Can someone let me know how to

  • Photo quality from Aperture to iDVD output problems

    What is the best option for burning a simple slideshow to a disc for viewing with a DVD player. I have tried several ways resulting in a disc that does play without problem but the quality of the photos is very poor, nothing even close to the preview

  • Best way to add a new section in the middle of a tune?

    hi, what's best way to add a new section in the middle of a tune? I think I came up with an interesting transition to a tune... what's the best way to try it out? please be specific. if it's just select all and cut and move - I already know that one.

  • Maximum no. of XA Connection pools

    Hi, Is there any limitation on number of XA Connection pools (NOT number of connections in a pool) that can be created in a weblogic 8.1 server ? Thanks in advance, Reji

  • Mapping query for context change without UDF

    Hi, My requirement is as below: Input queues are 4319, 4319,4320,4321,4321 M1,M1,M1,M2,M2,M2 Required output is 4319,4320,CC,4321 COntext change is to be inserted when there is a change in value in second queue. regards, Anirudh.