1
votes

Im working with Oracle Application Express (APEX). I have a page with a link and a page with a Text Field (in simple terms). When i click on that link, a JavaScript function puts a coordinate to the second page with the Text Field. The coordinates should appear in that Text Field. The point is: They really appear, but only a part of them. I can show you that:

This should appear in the Text Field:

LatLng(48.30247, 16.02837)

But the Text Field shows only this:

LatLng(48.30247

I realised the problem: Apex thinks, that it should stop writing something in a Text Field, when there is a "," (comma). But I need that "," for my Database. So my question: Is there another way to write the comma? Or can I tell Apex to not do anything when a comma appears?

Thanks for your help! :)

1
How exactly are you passing your values? - Bacs
With this function: function paste_coord(){ window.location = 'f?p=&APP_ID.:202:&APP_SESSION.::NO::P202_Text_Field:' + popup_coord; } When I look into the link in my browser on the new page, I see P202_TEXT_FIELD:LatLng(48.30247,%2016.02837) so that should be right. The popup_coord is my string where the coordinates are stored. - Jandroide
Hi, shouldn't be: P202_TEXT_FIELD:'LatLng(48.30247,%2016.02837)' ? - Typo
@Typo I don't think so - but I'm not sure. I don't know what to type in, to look like this :\ I can't type ' ' ' + popup_coord + ' ' ' :D Or do you mean it should look like this in the link, to work? - Jandroide

1 Answers

1
votes

Parameters in an Apex URI are colon separated, but multi-value parameters, such as lists of page items to set, are comma separated. Apex thinks you are trying to set the value of P202_TEXT_FIELD to "LatLng(48.30247" and the value of a second, unspecified page item to ", 16.02837)".

You can escape commas in an Apex URI by enclosing the value in backslashes, ie:

"\"+popup_coord+"\"