Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 1:07 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Not sure of a script
PostPosted: November 12th, 2004, 5:52 pm 
Offline

Joined: November 3rd, 2004, 11:08 am
Posts: 14
i have written a function but im not sure if it works because it seems to be working sometimes, and sometimes not...

if(usedec==1)
{
if(decorset==1)
{
var temptile = detailfav1
detailfav1 = eval("SYSTEM_PUBLICATION_DIR"+"+temptile"+"")
this.SetImage(detailfav1)
decorset=0
}
}


Is this a correct way?


For this message DeMoN has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 12th, 2004, 7:38 pm 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Hi ,
Problem is probably the eval statement-- a simple example of usage would have helped :-)
I will assume you want a path out of the eval statement.

no forward slashes to indicate the path rom "SYSTEM_PUBLICATION_DIR" to "temptile"
why is the last set of quotes added to the end of the eval statement?
why an extra + attached to temptile between the quotes ?

I am presuming this is a script action attached to an object, not a script object because you have used the keyword "this" in "this.SetImage"?

If you had posted a small 1 page pub that indicates what you are trying to do, you would have got it back working, and I would have spent less time looking at it.
Understanding what you are trying to achieve makes it much easier for anyone to offer relevant advice.

This might be correct using the limited information I have::

if(usedec==1)
{
if(decorset==1)
{
var temptile = detailfav1
detailfav1 = eval("SYSTEM_PUBLICATION_DIR\\"+"temptile")
this.SetImage(detailfav1)
decorset=0
} // end inner if
} // end outer if


paul


For this message Paul has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group