Solved

can't use target="right" in perl ?

Posted on 1998-10-14
6
175 Views
Last Modified: 2012-05-04
This is part of a perl script. It is in a left frame but I want result in right frame. Can I do that . Thanks
print &PrintHeader;
print<<"print_tag";
<html>
<head>
<title> output</title>
</head>
<body>
<img src=../$jpgfile target="right">
</body>
</html>
print_tag
0
Comment
Question by:aja101498
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:rajgn
ID: 1205341
An IMG tag cannot have 'target' atribute unless it's a link. In your case it's not a link. Hence target will not work. If you want to make the image as a link, targetted to right, replace

<img src=../$jpgfile target="right">
      with
<A HREF='something.html' target='right'><img src=../$jpgfile></A>
0
 

Author Comment

by:aja101498
ID: 1205342
No, I don't want a link. Is there a way to display the image in the right frame witout clicking anything. Do the calcualtion and immediately place the image in th desired frame . thanx
0
 
LVL 2

Accepted Solution

by:
shchuka earned 100 total points
ID: 1205343
Yes, you can do it with javascript.  You can do the following to achive your goal (the code assumes that you have a frame named "right"):

print &PrintHeader;
print<<"print_tag";
<html>
<head>
<script language="JavaScript">
<!--
top.right.location="../$jpgfile";
//-->
</script>
</head>
</html>
print_tag

0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

Author Comment

by:aja101498
ID: 1205344
Ok, good. If I copy & past your code in a PERL script, it is going to work provided that there is a frame called right. Is that right ?

I have n't seen a javascript in a perl program before. I hope that is feasible. Thanks
0
 
LVL 2

Expert Comment

by:shchuka
ID: 1205345
Yes - I tested my code before pasting it here.
My main html page looked like this:
<html>
<frameset cols="50%,50%">
    <frame name="left" src="left.html">
    <frame name="right" src="right.html">
</frameset>

the left.html file had something like this:
<html>
<form method=post action="test.pl">
<input type=submit value="submit">
</form>
</html>

And finally my test.pl file contained the code that I pasted in my answer.
Hope, this helps,
-Aleks.
0
 

Author Comment

by:aja101498
ID: 1205346
thanks
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Strange perl issue 6 128
collecting information 2 158
Edit Odbc.ini using perl module 2 83
Ned Perl Snippet to Read Files in Directory 5 69
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question