I think a static text Href with some JavaScript to submit the form.
This Non ND HTML Code seems to work for me.
You could use a static text for the HREFs.
You could use a ND control for the hidden which gets the value and submit
button.
mysub is static and could live in the htm file.
You write a single generic mysub which takes the destination field and
button as arguments.
You could then put it in some generic JS file.
You could also write a static text subclass MyHtml control which generated
the HTML and had a value and label properties.
<FORM NAME="pgFred">
<SCRIPT LANGUAGE="JavaScript">
// <!--
function mysub(val)
{
document.pgFred.hdFred.value = val;
document.pgFred.elements["SOME_STUFF"].click();
return false;
}
// -->
</SCRIPT>
<P><A HREF="" onClick="return mysub(1);">LABEL 1</A>
<P><A HREF="" onClick="return mysub(2);">LABEL 2</A>
<P><A HREF="" onClick="return mysub(3);">LABEL 3</A>
<P><A HREF="" onClick="return mysub(4);">LABEL 4</A>
<P><A HREF="" onClick="return mysub(5);">LABEL 5</A>
<P><A HREF="" onClick="return mysub(6);">LABEL 6</A>
<INPUT TYPE=HIDDEN NAME="hdFred" VALUE="">
<P> <INPUT TYPE="SUBMIT" NAME="SOME_STUFF">
</FORM>
Brendan Johnston
TeamND
-----Original Message-----
From: Niels Voll [SMTP:[EMAIL PROTECTED]]
Sent: Tuesday, June 22, 1999 3:00 AM
To: [EMAIL PROTECTED]
Subject: Re: [ND] Attempt to grab a href value and store it
as a session variable seems to fail
I don't think HREF's pass along the name value pairs from the form.
Only
buttons and images do.
For example, note that each ND generated HREF needs to pass along
the
SPIDERSESSION in the URL, which at times even makes it fail (due to
ND4
packing all kinds of stuff into SPIDERSESSION, and the browsers
having
tighter limits on URL length than on name value pairs being passed
via
"SUBMIT".
So while the HREF is a wonderfully intuitive use for drilldowns,
since ND4
it has become a problem, because it may not work due to becoming too
long.
TechSupport from ND can't suggest much better than to use buttons.
And due to the increased length of ND4 SPIDERSESSIONS, a page
listing 500
rows of 100 bytes of HTML code Which would normally represent a 50k
page.
With ND4 SPIDERSESSION tags often being close to 1k, sometimes 2-3k
each(!)
So our original 50k page with ND4 style HREFS(let's say there a 2
HREF's on
each line), can easily grow into a page of .5 MB to 1MB.
To compound the issue, the SPIDERSESSION in a name value pair
contains a
number of characters (since it really is an encrypted binary field),
which
need to be escaped via %nn (nn being the ASCI code), when passed in
the URL.
So for a number of positions in the SPIDERSESSION, the HREF needs to
send 3
bytes through the URL, whereas the button sends 1 in the name value
pair).
Have a look at a ND page with both: HREF(s) and button(s) - you'll
see the
difference between the SPIDERSESSIONs immediately.
This may not be much of a problem over a 100BaseT intranet which
isn't
saturated, but over a modem line or a coporate WAN with 32kbs -
128kbs
throughput, the above sample page becomes quite a lengthy load. Or
even on a
fast network, on older, slower machines even the browser takes
longer to
load these big pages. It is quite remarkable to see the difference.
That's why buttons or repeating small images (image is only sent
once, if it
is reused) tend to be more efficient on downloading the page to the
browser.
(Even if the GUI is not as nice).
I suspect, this is inherent in the HTTP protocol definition, and I'm
not
aware of any way to modify this behaviour (i.e. make an HREF send
name value
pairs).
If one should desire to have the nice GUI of the HREF, yet make
pages
efficient, one would probably have to write some JavaScript to
intercept the
clicking on the HREF, but then fake the pressing of a button.
If one would like to do that, one would have to manually code the
HREF,
instead of using the ND Studio generated one (to prevent attaching
the
SPIDERSESSION to each repeating HREF).
A big caveat: I don't consider myself a HTTP/HTML guru, but I've
checked
into this, and for the life of me couldn't figure out any way of
making name
value pairs transmitted along with the HREF. Thus I'm humbly
assuming it's
not possible, but would be grateful to be proven wrong, by a real
HTML/HTTP
guru.
-----Original Message-----
From: Curt Springer [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 21, 1999 11:21 PM
To: [EMAIL PROTECTED]
Subject: Re: [ND] Attempt to grab a href value and store it as a
session
variable seems to fail
Hi,
I don't claim to know all all the ins and outs of the ND
pointy-clicky
hrefs. We rarely use them. We sometimes build ours by generating
html
from static text fields, so that we have control over what is
happening.
But I don't believe that the source values of the pointy-clicky href
are
available as web vars. You could verify this by executing
CSpider.getWebVars(), which gives you a list of all the current web
vars.
-- Curt Springer, Team ND
At 09:44 PM 6/21/99 -0800, [EMAIL PROTECTED] wrote:
>
>HI ALL,
>
>Can somebody tell me why this code below dosen't seem to work??
>I could be missing something here.
>Its a simple attempt to grab a href value and store it as a session
variable.
>Then retrieve the session variable value on the target page's
ON_BEFORE_DISPLAY_EVENT.
>
>public int hrefOfferID_onWebEvent(CSpWebEvent event)
> {
> int command = PROCEED;
> command = doAction(event);
> CSpValue cspvOfferID =
CSpider.getWebVar("doSPSelect.hrefOfferID");
> CSpider.putUserSessionObject("ssOfferID",
cspvOfferID);
> CSpLog.send(this, CSpLog.CRITICAL,
CSpider.getWebVar("doSPSelect.hrefOfferID"));
> return(command);
> }
>
>
>I tried to see what was being passed as the CGI name value pair and
it
seemed to be okay
>Here is the URL string
>
>http://24.0.21.70:2080/cgi-bin/ndCGI.exe/MSOAdminDraft10/
>pgSPSelection.hrefOfferID_onWebEvent(hrefOfferID)?hrefOfferID=1280%2e0&
>/* this is what i am looking for - hrefOfferID = 1280 */
>
>/* string contd..*/
>SPIDERSESSION=%3f%3f%3f%3f%3f%5f%3f%3f%3f%40%5b%3f%3f%3f%3fBOs
>%5cH%3f%3f%3f%3f%3f%3f%3f%3f%3fLaHv%3fhfnKz%7c%7b%5f%3f%3f%3fPC%3fIQLGGpobQ
%
>40a%7dXoDeQaxG%5bC%60k%3fUsWX%60loQqLGJRSbQFCWSFdGG%40PxTvobHOWiDqXLYPHyBQ%
>7bL%5e%40KuOaxU%5c%3ftwXvtIND%5cp%5brpAYf%3fLPehLHotGGs%5fbECg%7dOFsJQFtgGs
%5fbEC%
>7blPfloJvLJRUXU%5cSg%7bRFXONotTPO%5cp%5csgdRTpkEuH%7bCvcbECGyPUoaQAKiGS%5fb
ECGlTvtpDcXgRbtk%
>5e%60GkBVXmXf%40VR%40hSYu%5beSVdFASxpSuXCQt%5bmCa%60%3fJT%5cp%5b%40%60E%5cA
DGGp%
>60LHqKW%5bPXEYAXGGqWQJ%3ftsOatV%5eS%3flREhOIT%5cISADR%5cEgkSDpmXf%40VUadE%5
eE%
>5beSVdFASxpSuXCQt%5bmCa%60%3fJT%5cp%5b%40%60E%5cCsfEAKdQAG&%5euniqueValue=9
30025844315
>
>
>The above code bombs with an error as follows:
>On the page where i try to get the user session value - which seems
to be
null
>
>spider.event.adapters.CSpPageEventAdapter.relayGenericEventProcessing:
Unexpected exception from an event (java.lang.NullPointerException).
This
is when
>invoking method this_onBeforeDisplayEvent for event
spider.event.CSpDisplayEvent [ON_BEFORE_DISPLAY_EVENT] on pgPreview:
>spider.event.adapters.CSpPageEventAdapter.relayGenericEventProcessing:
Unexpected Exception (java.lang.NullPointerException) caught. Top of
stack:
>|java.lang.NullPointerException at spider.util.CSpLog._log(Compiled
Code)
at spider.util.CSpLog.send(Compiled Code) at
>
> and that is explained below .. bcos the getWebVar returned a null
value!!
>
>spider.event.adapters.CSpPageEventAdapter.relayGenericEventProcessing:
Unexpected exception from an event (java.lang.NullPointerException).
This
is when
>invoking method hrefOfferID_onWebEvent for event
spider.event.CSpWebEvent[ON_BEFORE_WEB_EVENT,
>Method=MSOAdminDraft10.pgSPSelection.hrefOfferID_onWebEvent
(hrefOfferID)]
on spider.visual.CSpHref:
>spider.event.adapters.CSpPageEventAdapter.relayGenericEventProcessing:
Unexpected Exception (java.lang.NullPointerException) caught. Top of
stack:
>|java.lang.NullPointerException at
MSOAdminDraft10.pgSPSelection.hrefOfferID_onWebEvent(pgSPSelection.java:80)
at
>
>
>Thanx in advance for all who take time to review the code.
>- Art
>_________________________________________________________________________
>
>For help in using, subscribing, and unsubscribing to the discussion
>forums, please go to:
http://www.netdynamics.com/support/visitdevfor.html
>
>For dire need help, email: [EMAIL PROTECTED]
>
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to:
http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to:
http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]