Jump to content

Trying to modify the value of a CSAction dependent on a variable's value


Kaylub

Recommended Posts

Is it possible to change the value of a csaction using javascript?

 

I'm trying to change the link value of a new window when the csaction opens the new window.

 

My csaction looks like this:

<csactions>

<csaction name="186f68c67" class="Open Window" type="onevent" val0="../../USER_DOWNLOADS/Recording%20Artists%20Manual%20E.mpg" val1="_blank" val2="800" val3="600" val4="true" val5="true" val6="true" val7="true" val8="true" val9="true" val10="true" urlparams="1"></csaction>

</csactions>

<csscriptdict import="import">

<script type="text/javascript" src="../../css/CSScriptLib.js"></script>

</csscriptdict>

<csactiondict>

<script type="text/javascript"><!--

CSAct[/*CMP*/ '186f68c67'] = new Array(CSOpenWindow,/*URL*/ '../../USER_DOWNLOADS/Recording%20Artists%20Manual%20E.mpg','_blank',800,600,true,true,true,true,true,true,true);

 

 

So anyways, I was wondering, is it possible to change the link location using a javascript function I could call when the user mouses over the button depending on the value of "infoReady"?

I know this is completely wrong, but is ANYTHING at all like the following possible?:

Or does anyone have another idea?

 

Here's the example i had in mind, (the incorrect one, but the one I'm using as an example of what I'm trying to accomplish).

function MovieChooser() {

var Navigator=document.formRegister.infoReady.value

if (Navigator=="RAYes") {

document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_A.mpg";}

if (Navigator=="RANo1") {

document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_B.mpg";}

if (Navigator=="RANo2") {

document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_C.mpg";}

if (Navigator=="RANo3") {

document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_D.mpg";}

if (Navigator=="RANo4") {

document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_E.mpg";}

if (Navigator=="RANo5") {

document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_F.mpg";}

if (Navigator=="RANo6") {

document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_G.mpg";}

}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.