It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Java Forum

Trying to modify the value of a CSAction, dependent on the v

Trying to modify the value of a CSAction, dependent on the v

Postby Kaylub on Sat Jan 23, 2010 4:23 am

I'm kind of an idiot when it comes to javascript, so sorry if this question seems stupid. 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";}
}
Kaylub
 
Posts: 1
Joined: Sat Jan 23, 2010 4:19 am

Who is online

Users browsing this forum: No registered users and 3 guests