![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Querying, Constructing, and Transforming XML with XQuery | iBot | Oracle Updates (RSS) | 0 | 04-06-2008 06:10 AM |
| Help Required In Transforming A File | anju | Shell Programming and Scripting | 3 | 01-15-2008 02:47 AM |
| transforming a multiline record to single line | anju | Shell Programming and Scripting | 9 | 01-14-2008 07:55 AM |
| javascript injection | fed.linuxgossip | Shell Programming and Scripting | 20 | 08-21-2007 07:46 AM |
| javascript onClick help | k@ssidy | UNIX for Dummies Questions & Answers | 1 | 10-12-2005 09:18 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
transforming small javascript into perl
Quote:
Could someone help me archive this? |
|
||||
|
Why do you think Javascript can be rewritten into Perl? Javascript is executed by the client side (browser) while Perl code is executed at the server side. You can use Perl to generate Javascript (because that is just text) on the server side, but that is not using Perl to replace Javascript because they serve totally different purposes.
|
|
||||
|
Then that is a client-side Javascript problem. It has nothing to do with Perl even though Perl is used to generate the Javascript.
If what you want to do is to execute different bits of Javascript depending on condition. That is possible with Javascript alone. People are doing that all over the Web to address different browsers. Sometimes you may need to wrap the code in a try ... catch block to catch exceptions so that you can try several variations until finding one that works! Of course, unless you have reasons to generate dynamic Javascript from Perl, moving all the javascript away from the HTML to a separate .js file that is sourced from the HTML esp. if you have lots of javascript. Then you can serve that JS file with Apache directly rather than wasting resources generating JS from Perl. |
|
||||
|
Looks like this thread has now migrated to if and else
|
|
||||
|
Correction; that other thread was closed by the moderator as a duplicate of this one.
Comment #2 in the other thread has some sort of answer (I hope). Last edited by era; 04-30-2008 at 02:39 PM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|