[ic] Maintaining Session

Kyle Cook interchange-users@interchange.redhat.com
Wed Oct 17 04:50:01 2001


At 11:06 AM 10/17/01, you wrote:
>hi all,
>     can any one tell me how i can use [item-code ] tag in javascript. when i
>tried using this tag in javascript, it shows an error.
>
>thanks in advance.
>joyce.j.

Joyce,

This is a very open ended question,
but for the sake of an example:

<SCRIPT LANGUAGE="JavaScript"><!--
function item_code(e) {
         alert ("Item code is: \n" + e );
         return false;
}
//--></SCRIPT>

<a href="[item-code]"
onMouseOver="item_code('[item-code]')">
[item-code]</a>

simply test via hard-coded (ie replace [item-code] above
with 1234 for example) until the javascript works, then replace
the [item-code].

Obviously [item-code] must be used within a context for which
it is meant like a search or loop list see:

http://interchange.redhat.com/cgi-bin/ic/dev-4.8/ictags_3.html#sub_PREFIX-code

Just remember you CAN use quotes within ic tags within javascript, because
the parser will convert (hopefully ;-) your ic code into a value which will 
then
be placed within the javascript code before the browser ever sees it.

Hope this helps,

(If this doesn't help, please post a sample of the code in question)

Kyle Cook