This content has been marked as final. Show 24 replies
Im using Scott's example from the Wiki to display a word verification and have a text box for the >user to type it in.Can you give a link for that? Or are you referring to this -
In that example, you can store the value generated anywhere you like (in a table for example).
By the way, that's my example, not 'Scott's' (my surname is Scott, perhaps that's where you got confused?)
By the way, that's my example, not 'Scott's' (my surname is Scott, perhaps that's where you got confused?)For the second time today some people think something from Jes is coming from Scott ;-)
Scott is a too popular name in this forum, we have
- Scott Spendolini
- Scott Spadafore
and... John Scott
You could become confused after a while ;-)
This thread is taken into account for the weekly forum wrap-up (funny part).
Okay, I was looking through some of Carl's examples and saw where he showed doing a SVG Chart from an application process and decided that's what I wanted to do, but I'm having a time getting it to work.
Here's what I've done:
1) Create application level process:
v_random := trunc(dbms_random.value(100000,999999));
owa_util.mime_header( ccontent_type => 'image/svg+xml', bclose_header => FALSE, ccharset => 'utf-8');
htp.p('Expires: Thu, 29 Oct 2000 17:04:19 GMT');
htp.p('<?xml version="1.0" standalone="no"?>');
htp.p('<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg" version="1.1">');
htp.p('<desc>Image generation demo</desc>');
htp.p('<rect x="1" y="1" width="99" height="99" fill="yellow" stroke="navy" stroke-width="1" />');
htp.p('<text x="10" y="50" font-size="20" fill="blue">');
Process Point: On Demand
Type: PL/SQL Anonymous Block
In the region footer of the page I'm working on, I changed the code to look like this:
<embed src="f?p=&APP_ID.:0:&APP_SESSION.:APPLICATION_PROCESS=word_verification" width="70" height="40" type="image/svg+xml" />
I've noted that word_verification is the correct name for my process, but I'm not getting anything back. It doesn't appear that the process is running.
To test that theory, I added an insert statement to the process and I don't seem to get any results from that either.
I do have a page zero (ID of 0 - name of Page Zero) in my app, but I didn't do anything to it for this procedure? Do I need to?
By the way, the link to what I was looking at is here:
Well I was doing that....but here, it's working. :/
The one difference. Here, I was logging into the application before the process was being called.
On my actual app, I'm trying to display this on a registration page, so they aren't logged in yet.
Is it not possible to call application level processes without being logged in? I tried removing the &APP_SESSION. and that didn't work, so my guess it I can't get there from here. :)
Well duh. I spend all this time worrying about web stuff I forget about the simple database side. :)
The reason it wouldn't work is apex_public_user didn't have the privilege to run it. Once I granted it, it worked!
Now...to prevent people from just reading the page source code and running the code themselves.
Well after a bit of digging around, I've stumbled onto another option!
This one takes advantage of something built right into the database already! If you want to know what it looks like, all you need to do is sign up for an account on apex.oracle.com.
Here's a bit of how it appears to work:
To add an image you put the following code in your html:
img width="40" height="60" ,="" src="FLOWS_030000.wwv_flow_image_generator.get_image?p_position=X&p_sessionid=&APP_SESSION."
Don't forget the < at the beginning and the /> at the end. I tried putting them in, and the board kept eating them. :)
Replace X for p_position with a valid number from 1 through 100.
When the image is generated, the string is stored in a table called wwv_flow_request_verifications. Along with the string is the session id number.
What I haven't determined yet is if you are responsible for deleting the values out of there when you're finished or something else runs later to get rid of them. From what I'm seeing so far it appears as though you're responsible.
1) I cannot reproduce example (http://htmldb.oracle.com/pls/otn/f?p=24935:2), login data:
2) desc wwv_flow_request_verifications
gave me "Object to be described could not be found.", regardless I'm working on Oracle WEB SQl worksheet
Any help to make it work?
Your user doesn't have permissions to see it -
SQL> conn flows_030000@testdb
SQL> desc wwv_flow_request_verifications;
Name Null? Type
----------------------------------------- -------- ----------------------------
SESSION_ID NOT NULL NUMBER
VERIFICATION_STRING NOT NULL VARCHAR2(100)