None of the above. I am aware that the PSTAG bit is processed on the
server, and based upon my own experimentation, processed after the page
has completing loading.
WRONG!
The server side processing MUST take place BEFORE the page is delivered
to the browser. That's the whole point of server side processing, you
include directives to the server side processor in amongst your html
markup, and the pre-processor that is invoked server side replaces those
directives with some content before handing the result to the server to
send across the internet to the browser.
If you are seeing the pstag element in the browser, then the server you
are using to serve the code is not handling the pstag element / doing the
server-side pre-processing properly.
<pstag:... is not a recognised element for any web browser.
So what I have is essentialy a SPAN tag, a
database value, and a SPAN end tag. That's not the sort of HTML I"m used
to.
IT! IS! NOT! HTML!
Not just some sort of html you're not used to, but NOT HTML AT ALL!
What you should have in the output from the server is the span tag
enclosing whatever markup was generated by the server side pre-processor
in response to the complete said:
Without other tags, this would just be a string on the page, and
the usefulness of that seems questionable to me. Least wise, in other
web technologies, it would be.
What it should actually be is some piece of content generated by the pre-
processor on the server that handles the <pstag:... directive.
<pstag

rofile value="Individuals.CS-ApplBiographic.Primary_Last_Nm"
poutput="Text" />
I would guess from the parameters of the pstag directive that what is
meant to appear there is either someone's last name, or first and last
names, as text.
In other words, what should be delivered to the browser is probably
something like either:
<div id="field-lastnamehidden"><span class="value">McMahon</span></div>
or:
<div id="field-lastnamehidden"><span class="value">Denis McMahon</span></
div>
and given the id of the div, I'd go with the former - it's meant to be
someone's lastname!
You can probably refer to it in javascript with:
document.getElementById("field-lastnamehidden").firstChild.innerHTML;
Where:
document.getElementById("field-lastnamehidden") references the <div
id="field-lastnamehidden"> element.
document.getElementById("field-lastnamehidden").firstChild references the
<span> within that div.
document.getElementById("field-lastnamehidden").firstChild.innerHTML
references the content of that span.
But I'm still troubled that you don't seem to understand the sequences
that things happen in or comprehend the roles played by different
software components on the web server and client browser that are
involved in the process of converting the file on the server platform
hard disc to something displayed in a client browser window.
Broadly speaking, this is what happens when a web page is requested (and
yes, I know at least one poster will post a comment that I'm wrong,
without actually saying what part of the sequence I got wrong, and at
bleats one poster will probably post an incorrect correction, but it's
possible that some other poster will actually correct some
misunderstanding on my part):
1) Client browser requests url from web server
2) Web server converts the url into a file name (possibly with some
additional request parameters)
3) Webserver gets the file from wherever it's stored and either (a) sends
the file straight to the client browser as is, or (b) calls one or more
external program(s) by some means to process the file (and any additional
request parameters), and sends the eventual output of the program(s) to
the client browser.
4) The client browser renders the page, which includes processing any js
in the header, included js files or the page itself, as well as all
relevant css, subject to any constraints on css and js set in the client
browser.
5) The client browser executes any "onload" js subject to any constraints
on js etc per 4.
6) The page now reacts to the viewer filling in form fields, clicking
things etc.
The oracle crm in this scenario kicks in (or should do) at 3(b) in the
above 6-step description of how a web page loads. Javascript is not
executed until step 4 and onload events step 5. User action initiated
function code triggers at step 6 in response to user input.
I wouldn't write a JSP to try to grab or
process in any way a simple string on a web page. I tried looking at
the source of the page when I only brought up the page, but that didn't
help. I'm working on seeing what gets generated in reality but it's
difficult in the environment I am in (PS CRM 9.0).
As far as referring to the crm data in the generated output with
javascript, I've given you a method to do that. However, that's in the
generated output, not the source file!
I've actually been
trying most of the morning's to get Oracle's Dialog Execution Server in
CRM accept the new version I made of the page and let me run the app.
That hasn't worked so far (it's a CRM thing, not an HTML or JavaScript
thing).
If you are having issues with the oracle crm platform and the syntaxes
that apply to it, ask the oracle crm system helpdesk or in a forum or
newsgroup that's dedicated to that forum.
Rgds
Denis McMahon