Solved

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

Posted on 1998-10-14
6
179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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…
Six Sigma Control Plans

717 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