Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Flex Application Problem

Former Member
0 Likes
429

Hello Experts,

I have a Problem with my Flex Application. I want to send data as a String from a Flex Combobox to a Webservice. But the String has before and after the value inverted comma's (").

How can I replace this inverted comma with a blank?

Here the Code how I get the Data from the ComboBox:

comboBox.dataProvider = auswahl;

str = ObjectUtil.toString(cb.selectedLabel.toUpperCase());

Thanks for your answers in advance!!!

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
403

to remove the inverted comma from the string use action script replace method.


public function fixstring():void
			{
				var str:String ;
				var str1:String ;
				str = "\"test\"" ;
				var pattern:RegExp = /\"/gi;
				str1 = str.replace(pattern,"");
				Alert.show(str1);
			}

for more on this read this online help

http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Part...

2 REPLIES 2
Read only

athavanraja
Active Contributor
0 Likes
404

to remove the inverted comma from the string use action script replace method.


public function fixstring():void
			{
				var str:String ;
				var str1:String ;
				str = "\"test\"" ;
				var pattern:RegExp = /\"/gi;
				str1 = str.replace(pattern,"");
				Alert.show(str1);
			}

for more on this read this online help

http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Part...

Read only

0 Likes
403

Thank you that solved the problem!!! )))